Skip to content

Commit ce1de8d

Browse files
committed
Run Xcode check on self-hosted runners
1 parent 9410c4a commit ce1de8d

3 files changed

Lines changed: 0 additions & 48 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/languages/traced.test.ts‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -346,38 +346,6 @@ test.serial(
346346
}),
347347
);
348348

349-
test("checkRunnerSupportsTracedAnalysis doesn't perform Xcode check on self-hosted runners", async (t) =>
350-
withTmpDir(async (tmpDir) => {
351-
const logger = new RecordingLogger();
352-
const env = getTestEnv();
353-
env.set(ActionsEnvVars.RUNNER_TEMP, tmpDir);
354-
env.set(ActionsEnvVars.RUNNER_ENVIRONMENT, "self-hosted");
355-
const features = createFeatures([Feature.CheckUnsupportedTracedAnalysis]);
356-
357-
const codeql = await getCodeQLWithTracedStub(
358-
"codeql-for-testing",
359-
logger,
360-
env,
361-
);
362-
sinon.stub(codeql, "getVersion").resolves(makeVersionInfo("2.27.0"));
363-
364-
await checkRunnerSupportsTracedAnalysis(
365-
initAllState({
366-
logger,
367-
platform: "darwin",
368-
osRelease: "26.0.0",
369-
env,
370-
features,
371-
}),
372-
createTestConfig({ tempDir: tmpDir, languages: [BuiltInLanguage.go] }),
373-
codeql,
374-
);
375-
376-
checkExpectedLogMessages(t, logger.messages, [
377-
"Skipping traced analysis compatibility check for Xcode because we are on a self-hosted runner.",
378-
]);
379-
}));
380-
381349
// `addDiagnostic` changes global state and we must stub it, so this test must be serial.
382350
test.serial(
383351
"checkRunnerSupportsTracedAnalysis doesn't add a diagnostic if Xcode version is supported",

‎src/languages/traced.ts‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as semver from "semver";
22

33
import type { ActionState, Logger } from "../action-common";
4-
import { isSelfHostedRunner } from "../actions-util";
54
import type { CodeQL } from "../codeql";
65
import type { ActionConfig } from "../config/action-config";
76
import { addDiagnostic, makeDiagnostic } from "../diagnostics";
@@ -191,15 +190,6 @@ export async function checkRunnerSupportsTracedAnalysis(
191190
return;
192191
}
193192

194-
// Skip if we are on a self-hosted runner since the current Xcode version detection
195-
// is only validated on hosted runners.
196-
if (isSelfHostedRunner(action.env)) {
197-
action.logger.debug(
198-
"Skipping traced analysis compatibility check for Xcode because we are on a self-hosted runner.",
199-
);
200-
return;
201-
}
202-
203193
// Determining whether the Xcode version is supported only makes sense on macOS, so we only do it
204194
// after determining that we are running on macOS. We first try to obtain the version of Xcode itself
205195
// starting with the cheapest approach and then call out to an external program. If neither works, we try

0 commit comments

Comments
 (0)