diff --git a/lib/entry-points.js b/lib/entry-points.js index 2a2537cf5..1445e238e 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -194117,12 +194117,6 @@ async function checkRunnerSupportsTracedAnalysis(action, config, codeql) { ); return; } - if (isSelfHostedRunner(action.env)) { - action.logger.debug( - "Skipping traced analysis compatibility check for Xcode because we are on a self-hosted runner." - ); - return; - } const xcodeVer = xcodeVersionFromLink(action.logger) ?? await xcodeVersionFromXcodeBuild(action.logger) ?? await xcodeSdkVersion(action.logger); if (xcodeVer !== void 0 && xcodeVer.major >= UNSUPPORTED_XCODE_FOR_TRACED) { handleUnsupportedVersion( diff --git a/src/languages/traced.test.ts b/src/languages/traced.test.ts index 08d529108..2b9d50dfa 100644 --- a/src/languages/traced.test.ts +++ b/src/languages/traced.test.ts @@ -346,38 +346,6 @@ test.serial( }), ); -test("checkRunnerSupportsTracedAnalysis doesn't perform Xcode check on self-hosted runners", async (t) => - withTmpDir(async (tmpDir) => { - const logger = new RecordingLogger(); - const env = getTestEnv(); - env.set(ActionsEnvVars.RUNNER_TEMP, tmpDir); - env.set(ActionsEnvVars.RUNNER_ENVIRONMENT, "self-hosted"); - const features = createFeatures([Feature.CheckUnsupportedTracedAnalysis]); - - const codeql = await getCodeQLWithTracedStub( - "codeql-for-testing", - logger, - env, - ); - sinon.stub(codeql, "getVersion").resolves(makeVersionInfo("2.27.0")); - - await checkRunnerSupportsTracedAnalysis( - initAllState({ - logger, - platform: "darwin", - osRelease: "26.0.0", - env, - features, - }), - createTestConfig({ tempDir: tmpDir, languages: [BuiltInLanguage.go] }), - codeql, - ); - - checkExpectedLogMessages(t, logger.messages, [ - "Skipping traced analysis compatibility check for Xcode because we are on a self-hosted runner.", - ]); - })); - // `addDiagnostic` changes global state and we must stub it, so this test must be serial. test.serial( "checkRunnerSupportsTracedAnalysis doesn't add a diagnostic if Xcode version is supported", diff --git a/src/languages/traced.ts b/src/languages/traced.ts index 08b886376..92eca5efe 100644 --- a/src/languages/traced.ts +++ b/src/languages/traced.ts @@ -1,7 +1,6 @@ import * as semver from "semver"; import type { ActionState, Logger } from "../action-common"; -import { isSelfHostedRunner } from "../actions-util"; import type { CodeQL } from "../codeql"; import type { ActionConfig } from "../config/action-config"; import { addDiagnostic, makeDiagnostic } from "../diagnostics"; @@ -191,15 +190,6 @@ export async function checkRunnerSupportsTracedAnalysis( return; } - // Skip if we are on a self-hosted runner since the current Xcode version detection - // is only validated on hosted runners. - if (isSelfHostedRunner(action.env)) { - action.logger.debug( - "Skipping traced analysis compatibility check for Xcode because we are on a self-hosted runner.", - ); - return; - } - // Determining whether the Xcode version is supported only makes sense on macOS, so we only do it // after determining that we are running on macOS. We first try to obtain the version of Xcode itself // starting with the cheapest approach and then call out to an external program. If neither works, we try