Merge pull request #2568 from github/calumgrant/bmn-ff2
C++: Handle codeql_action_cpp_build_mode_none feature flag
This commit is contained in:
commit
b91f43b4e4
6 changed files with 26 additions and 20 deletions
12
lib/feature-flags.js
generated
12
lib/feature-flags.js
generated
|
|
@ -54,8 +54,7 @@ var Feature;
|
|||
(function (Feature) {
|
||||
Feature["ArtifactV4Upgrade"] = "artifact_v4_upgrade";
|
||||
Feature["CleanupTrapCaches"] = "cleanup_trap_caches";
|
||||
Feature["CppBuildModeNoneDisabled"] = "cpp_build_mode_none_disabled";
|
||||
Feature["CppBuildModeNoneEnabled"] = "cpp_build_mode_none";
|
||||
Feature["CppBuildModeNone"] = "cpp_build_mode_none";
|
||||
Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled";
|
||||
Feature["DiffInformedQueries"] = "diff_informed_queries";
|
||||
Feature["DisableCsharpBuildless"] = "disable_csharp_buildless";
|
||||
|
|
@ -78,14 +77,9 @@ exports.featureConfig = {
|
|||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.CppBuildModeNoneDisabled]: {
|
||||
[Feature.CppBuildModeNone]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE_DISABLED",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.CppBuildModeNoneEnabled]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE_ENABLED",
|
||||
envVar: "CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.CppDependencyInstallation]: {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
8
lib/init-action.js
generated
8
lib/init-action.js
generated
|
|
@ -316,6 +316,14 @@ async function run() {
|
|||
core.exportVariable(envVar, "false");
|
||||
}
|
||||
}
|
||||
// Set CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE
|
||||
if (config.languages.includes(languages_1.Language.cpp)) {
|
||||
const bmnVar = "CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE";
|
||||
const value = process.env[bmnVar] ||
|
||||
(await features.getValue(feature_flags_1.Feature.CppBuildModeNone, codeql));
|
||||
logger.info(`Setting C++ build-mode: none to ${value}`);
|
||||
core.exportVariable(bmnVar, value);
|
||||
}
|
||||
// For CLI versions <2.15.1, build tracing caused errors in MacOS ARM machines with
|
||||
// System Integrity Protection (SIP) disabled.
|
||||
if (!(await (0, util_1.codeQlVersionAtLeast)(codeql, "2.15.1")) &&
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -50,8 +50,7 @@ export interface FeatureEnablement {
|
|||
export enum Feature {
|
||||
ArtifactV4Upgrade = "artifact_v4_upgrade",
|
||||
CleanupTrapCaches = "cleanup_trap_caches",
|
||||
CppBuildModeNoneDisabled = "cpp_build_mode_none_disabled",
|
||||
CppBuildModeNoneEnabled = "cpp_build_mode_none",
|
||||
CppBuildModeNone = "cpp_build_mode_none",
|
||||
CppDependencyInstallation = "cpp_dependency_installation_enabled",
|
||||
DiffInformedQueries = "diff_informed_queries",
|
||||
DisableCsharpBuildless = "disable_csharp_buildless",
|
||||
|
|
@ -105,14 +104,9 @@ export const featureConfig: Record<
|
|||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.CppBuildModeNoneDisabled]: {
|
||||
[Feature.CppBuildModeNone]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE_DISABLED",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.CppBuildModeNoneEnabled]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE_ENABLED",
|
||||
envVar: "CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.CppDependencyInstallation]: {
|
||||
|
|
|
|||
|
|
@ -546,6 +546,16 @@ async function run() {
|
|||
}
|
||||
}
|
||||
|
||||
// Set CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE
|
||||
if (config.languages.includes(Language.cpp)) {
|
||||
const bmnVar = "CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE";
|
||||
const value =
|
||||
process.env[bmnVar] ||
|
||||
(await features.getValue(Feature.CppBuildModeNone, codeql));
|
||||
logger.info(`Setting C++ build-mode: none to ${value}`);
|
||||
core.exportVariable(bmnVar, value);
|
||||
}
|
||||
|
||||
// For CLI versions <2.15.1, build tracing caused errors in MacOS ARM machines with
|
||||
// System Integrity Protection (SIP) disabled.
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue