diff --git a/autobuild/action.yml b/autobuild/action.yml index a6586e31f9..a7cafe4933 100644 --- a/autobuild/action.yml +++ b/autobuild/action.yml @@ -12,6 +12,17 @@ inputs: working directory. If this input is not set, the autobuilder runs with $GITHUB_WORKSPACE as its working directory. required: false + cpp-autoinstall-dependencies: + description: >- + Experimental input, the API may change in the future. + Set to true to enable trying to automatically detect and install + dependencies when running the C/C++ autobuilder, set to anything else + to explicitly disable it. This only works when running on Ubuntu and + is automatically disabled otherwise. If this input is not set the + default is currently driven by the cpp_dependency_installation_enabled + feature flag or the CODEQL_CPP_DEPENDENCY_INSTALLATION environment + variable. + required: false runs: using: 'node16' main: '../lib/autobuild-action.js' diff --git a/lib/autobuild.js b/lib/autobuild.js index af9818b8a5..102bef2431 100644 --- a/lib/autobuild.js +++ b/lib/autobuild.js @@ -1,8 +1,37 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); exports.runAutobuild = exports.determineAutobuildLanguages = void 0; +const core = __importStar(require("@actions/core")); +const actions_util_1 = require("./actions-util"); +const api_client_1 = require("./api-client"); const codeql_1 = require("./codeql"); +const feature_flags_1 = require("./feature-flags"); const languages_1 = require("./languages"); +const repository_1 = require("./repository"); +const util_1 = require("./util"); async function determineAutobuildLanguages(config, logger) { // Attempt to find a language to autobuild // We want pick the dominant language in the repo from the ones we're able to build @@ -70,9 +99,44 @@ async function determineAutobuildLanguages(config, logger) { return languages; } exports.determineAutobuildLanguages = determineAutobuildLanguages; +async function setupCppAutobuild(codeql, logger) { + const envVar = "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES"; + const actionInput = (0, actions_util_1.getOptionalInput)("cpp-autoinstall-dependencies"); + const featureName = "C++ automatic installation of dependencies"; + if (actionInput === "true") { + if (!(await (0, util_1.codeQlVersionAbove)(codeql, "2.15.0"))) { + logger.warning(`${featureName} was explicitly requested but is only available starting from CodeQL version 2.15.0, disabling it`); + core.exportVariable(envVar, "false"); + } + else { + logger.info(`${actionInput === "true" ? "Enabling" : "Disabling"} ${featureName} explicitly requested`); + core.exportVariable(envVar, actionInput); + } + } + else if (process.env["RUNNER_ENVIRONMENT"] === "self-hosted") { + logger.info(`Disabling ${featureName} which is the default for self-hosted runners`); + core.exportVariable(envVar, "false"); + } + else { + const gitHubVersion = await (0, api_client_1.getGitHubVersion)(); + const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY")); + const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), logger); + if (await features.getValue(feature_flags_1.Feature.CppDependencyInstallation, codeql)) { + logger.info(`Enabling ${featureName}`); + core.exportVariable(envVar, "true"); + } + else { + logger.info(`Disabling ${featureName}`); + core.exportVariable(envVar, "false"); + } + } +} async function runAutobuild(language, config, logger) { logger.startGroup(`Attempting to automatically build ${language} code`); const codeQL = await (0, codeql_1.getCodeQL)(config.codeQLCmd); + if (language === languages_1.Language.cpp) { + await setupCppAutobuild(codeQL, logger); + } await codeQL.runAutobuild(language); logger.endGroup(); } diff --git a/lib/autobuild.js.map b/lib/autobuild.js.map index 06638fbd8a..ec9552bcd5 100644 --- a/lib/autobuild.js.map +++ b/lib/autobuild.js.map @@ -1 +1 @@ -{"version":3,"file":"autobuild.js","sourceRoot":"","sources":["../src/autobuild.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAErC,2CAAyD;AAGlD,KAAK,UAAU,2BAA2B,CAC/C,MAA0B,EAC1B,MAAc;IAEd,0CAA0C;IAC1C,mFAAmF;IACnF,oFAAoF;IACpF,4EAA4E;IAC5E,MAAM,kBAAkB,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACvD,IAAA,4BAAgB,EAAC,CAAC,CAAC,CACpB,CAAC;IAEF,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,CAAC,IAAI,CACT,iEAAiE,CAClE,CAAC;QACF,OAAO,SAAS,CAAC;KAClB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,2BAA2B,GAAG,kBAAkB,CAAC,MAAM,CAC3D,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,oBAAQ,CAAC,EAAE,CACzB,CAAC;IAEF,MAAM,SAAS,GAAe,EAAE,CAAC;IACjC,yEAAyE;IACzE,UAAU;IACV,IAAI,2BAA2B,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE;QAChD,SAAS,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC;KAChD;IACD,uEAAuE;IACvE,wCAAwC;IACxC,IAAI,kBAAkB,CAAC,MAAM,KAAK,2BAA2B,CAAC,MAAM,EAAE;QACpE,SAAS,CAAC,IAAI,CAAC,oBAAQ,CAAC,EAAE,CAAC,CAAC;KAC7B;IAED,MAAM,CAAC,KAAK,CAAC,kBAAkB,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAE3D,2EAA2E;IAC3E,4EAA4E;IAC5E,2CAA2C;IAC3C,uEAAuE;IACvE,2EAA2E;IAC3E,uEAAuE;IACvE,yCAAyC;IACzC,IAAI,2BAA2B,CAAC,MAAM,GAAG,CAAC,EAAE;QAC1C,MAAM,CAAC,OAAO,CACZ,oCAAoC,SAAS,CAAC,IAAI,CAChD,OAAO,CACR,8BAA8B,2BAA2B;aACvD,KAAK,CAAC,CAAC,CAAC;aACR,IAAI,CACH,OAAO,CACR,kFAAkF;YACnF,4BAA4B;YAC5B,0NAA0N,CAC7N,CAAC;KACH;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAtFD,kEAsFC;AAEM,KAAK,UAAU,YAAY,CAChC,QAAkB,EAClB,MAA0B,EAC1B,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,qCAAqC,QAAQ,OAAO,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AATD,oCASC"} \ No newline at end of file +{"version":3,"file":"autobuild.js","sourceRoot":"","sources":["../src/autobuild.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,iDAAyE;AACzE,6CAAgD;AAChD,qCAA6C;AAE7C,mDAAoD;AACpD,2CAAyD;AAEzD,6CAAkD;AAClD,iCAAiE;AAE1D,KAAK,UAAU,2BAA2B,CAC/C,MAA0B,EAC1B,MAAc;IAEd,0CAA0C;IAC1C,mFAAmF;IACnF,oFAAoF;IACpF,4EAA4E;IAC5E,MAAM,kBAAkB,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACvD,IAAA,4BAAgB,EAAC,CAAC,CAAC,CACpB,CAAC;IAEF,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,CAAC,IAAI,CACT,iEAAiE,CAClE,CAAC;QACF,OAAO,SAAS,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C,MAAM,EAAE,OAAO,CAAC,CAAC;SACtC;KACF;AACH,CAAC;AAEM,KAAK,UAAU,YAAY,CAChC,QAAkB,EAClB,MAA0B,EAC1B,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,qCAAqC,QAAQ,OAAO,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,IAAI,QAAQ,KAAK,oBAAQ,CAAC,GAAG,EAAE;QAC7B,MAAM,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACzC;IACD,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AAZD,oCAYC"} \ No newline at end of file diff --git a/lib/feature-flags.js b/lib/feature-flags.js index eb927f3d77..e674ef72a6 100644 --- a/lib/feature-flags.js +++ b/lib/feature-flags.js @@ -54,6 +54,7 @@ var Feature; Feature["AnalysisSummaryV2Enabled"] = "analysis_summary_v2_enabled"; Feature["CliConfigFileEnabled"] = "cli_config_file_enabled"; Feature["CodeqlJavaLombokEnabled"] = "codeql_java_lombok_enabled"; + Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled"; Feature["DisableKotlinAnalysisEnabled"] = "disable_kotlin_analysis_enabled"; Feature["DisablePythonDependencyInstallationEnabled"] = "disable_python_dependency_installation_enabled"; Feature["EvaluatorIntraLayerParallelismEnabled"] = "evaluator_intra_layer_parallelism_enabled"; @@ -73,6 +74,11 @@ exports.featureConfig = { minimumVersion: "2.14.0", defaultValue: false, }, + [Feature.CppDependencyInstallation]: { + envVar: "CODEQL_CPP_DEPENDENCY_INSTALLATION", + minimumVersion: "2.15.0", + defaultValue: false, + }, [Feature.DisableKotlinAnalysisEnabled]: { envVar: "CODEQL_DISABLE_KOTLIN_ANALYSIS", minimumVersion: undefined, diff --git a/lib/feature-flags.js.map b/lib/feature-flags.js.map index 9d51842e2c..801db4fde9 100644 --- a/lib/feature-flags.js.map +++ b/lib/feature-flags.js.map @@ -1 +1 @@ -{"version":3,"file":"feature-flags.js","sourceRoot":"","sources":["../src/feature-flags.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,+CAAiC;AAEjC,6CAA4C;AAE5C,0DAA4C;AAG5C,6CAA+B;AAE/B,MAAM,mCAAmC,GAAG,yBAAyB,CAAC;AACtE,MAAM,mCAAmC,GAAG,UAAU,CAAC;AAEvD;;GAEG;AACU,QAAA,4CAA4C,GAAG,QAAQ,CAAC;AAErE;;GAEG;AACU,QAAA,kCAAkC,GAAG,QAAQ,CAAC;AAE3D;;GAEG;AACU,QAAA,sCAAsC,GAAG,QAAQ,CAAC;AAgB/D;;;;GAIG;AACH,IAAY,OAWX;AAXD,WAAY,OAAO;IACjB,mEAAwD,CAAA;IACxD,2DAAgD,CAAA;IAChD,iEAAsD,CAAA;IACtD,2EAAgE,CAAA;IAChE,wGAA6F,CAAA;IAC7F,8FAAmF,CAAA;IACnF,kEAAuD,CAAA;IACvD,iEAAsD,CAAA;IACtD,sDAA2C,CAAA;IAC3C,mEAAwD,CAAA;AAC1D,CAAC,EAXW,OAAO,uBAAP,OAAO,QAWlB;AAEY,QAAA,aAAa,GAGtB;IACF,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE;QAClC,MAAM,EAAE,mCAAmC;QAC3C,cAAc,EAAE,0CAAkC;QAClD,YAAY,EAAE,KAAK;KACpB;IACD,CAAC,OAAO,CAAC,uBAAuB,CAAC,EAAE;QACjC,MAAM,EAAE,oBAAoB;QAC5B,cAAc,EAAE,QAAQ;QACxB,YAAY,EAAE,KAAK;KACpB;IACD,CAAC,OAAO,CAAC,4BAA4B,CAAC,EAAE;QACtC,MAAM,EAAE,gCAAgC;QACxC,cAAc,EAAE,SAAS;QACzB,YAAY,EAAE,KAAK;KACpB;IACD,CAAC,OAAO,CAAC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M,CAAC,OAAO,CACjB,gGAAgG;oBAC9F,oEAAoE;oBACpE,qFAAqF;oBACrF,kFAAkF,CAAC,CAAC,OAAO,EAAE,CAChG,CAAC;gBACF,IAAI,CAAC,6BAA6B,GAAG,KAAK,CAAC;gBAC3C,OAAO,EAAE,CAAC;aACX;iBAAM;gBACL,kFAAkF;gBAClF,8EAA8E;gBAC9E,2FAA2F;gBAC3F,eAAe;gBACf,MAAM,IAAI,KAAK,CACb,sEAAsE,CAAC,EAAE,CAC1E,CAAC;aACH;SACF;IACH,CAAC;CACF;AAED;;;GAGG;AACI,KAAK,UAAU,0BAA0B,CAC9C,MAAc,EACd,QAA2B;IAE3B,OAAO,MAAM,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;AACvE,CAAC;AALD,gEAKC;AAEM,KAAK,UAAU,0BAA0B,CAC9C,MAAc,EACd,QAA2B,EAC3B,MAAc;IAEd,IAAI,MAAM,0BAA0B,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;QACtD,MAAM,CAAC,IAAI,CACT,qEAAqE,CACtE,CAAC;KACH;SAAM;QACL,MAAM,CAAC,IAAI,CACT,wEAAwE,CACzE,CAAC;KACH;AACH,CAAC;AAdD,gEAcC"} \ No newline at end of file +{"version":3,"file":"feature-flags.js","sourceRoot":"","sources":["../src/feature-flags.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,+CAAiC;AAEjC,6CAA4C;AAE5C,0DAA4C;AAG5C,6CAA+B;AAE/B,MAAM,mCAAmC,GAAG,yBAAyB,CAAC;AACtE,MAAM,mCAAmC,GAAG,UAAU,CAAC;AAEvD;;GAEG;AACU,QAAA,4CAA4C,GAAG,QAAQ,CAAC;AAErE;;GAEG;AACU,QAAA,kCAAkC,GAAG,QAAQ,CAAC;AAE3D;;GAEG;AACU,QAAA,sCAAsC,GAAG,QAAQ,CAAC;AAg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AACI,KAAK,UAAU,0BAA0B,CAC9C,MAAc,EACd,QAA2B;IAE3B,OAAO,MAAM,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;AACvE,CAAC;AALD,gEAKC;AAEM,KAAK,UAAU,0BAA0B,CAC9C,MAAc,EACd,QAA2B,EAC3B,MAAc;IAEd,IAAI,MAAM,0BAA0B,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;QACtD,MAAM,CAAC,IAAI,CACT,qEAAqE,CACtE,CAAC;KACH;SAAM;QACL,MAAM,CAAC,IAAI,CACT,wEAAwE,CACzE,CAAC;KACH;AACH,CAAC;AAdD,gEAcC"} \ No newline at end of file diff --git a/src/autobuild.ts b/src/autobuild.ts index ff4f9b48ab..6f3d28bac8 100644 --- a/src/autobuild.ts +++ b/src/autobuild.ts @@ -1,7 +1,14 @@ -import { getCodeQL } from "./codeql"; +import * as core from "@actions/core"; + +import { getOptionalInput, getTemporaryDirectory } from "./actions-util"; +import { getGitHubVersion } from "./api-client"; +import { CodeQL, getCodeQL } from "./codeql"; import * as configUtils from "./config-utils"; -import { Language, isTracedLanguage } from "./languages"; +import { Feature, Features } from "./feature-flags"; +import { isTracedLanguage, Language } from "./languages"; import { Logger } from "./logging"; +import { parseRepositoryNwo } from "./repository"; +import { codeQlVersionAbove, getRequiredEnvParam } from "./util"; export async function determineAutobuildLanguages( config: configUtils.Config, @@ -91,6 +98,50 @@ export async function determineAutobuildLanguages( return languages; } +async function setupCppAutobuild(codeql: CodeQL, logger: Logger) { + const envVar = "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES"; + const actionInput = getOptionalInput("cpp-autoinstall-dependencies"); + const featureName = "C++ automatic installation of dependencies"; + if (actionInput === "true") { + if (!(await codeQlVersionAbove(codeql, "2.15.0"))) { + logger.warning( + `${featureName} was explicitly requested but is only available starting from CodeQL version 2.15.0, disabling it`, + ); + core.exportVariable(envVar, "false"); + } else { + logger.info( + `${ + actionInput === "true" ? "Enabling" : "Disabling" + } ${featureName} explicitly requested`, + ); + core.exportVariable(envVar, actionInput); + } + } else if (process.env["RUNNER_ENVIRONMENT"] === "self-hosted") { + logger.info( + `Disabling ${featureName} which is the default for self-hosted runners`, + ); + core.exportVariable(envVar, "false"); + } else { + const gitHubVersion = await getGitHubVersion(); + const repositoryNwo = parseRepositoryNwo( + getRequiredEnvParam("GITHUB_REPOSITORY"), + ); + const features = new Features( + gitHubVersion, + repositoryNwo, + getTemporaryDirectory(), + logger, + ); + if (await features.getValue(Feature.CppDependencyInstallation, codeql)) { + logger.info(`Enabling ${featureName}`); + core.exportVariable(envVar, "true"); + } else { + logger.info(`Disabling ${featureName}`); + core.exportVariable(envVar, "false"); + } + } +} + export async function runAutobuild( language: Language, config: configUtils.Config, @@ -98,6 +149,9 @@ export async function runAutobuild( ) { logger.startGroup(`Attempting to automatically build ${language} code`); const codeQL = await getCodeQL(config.codeQLCmd); + if (language === Language.cpp) { + await setupCppAutobuild(codeQL, logger); + } await codeQL.runAutobuild(language); logger.endGroup(); } diff --git a/src/feature-flags.ts b/src/feature-flags.ts index 0d62c806b7..2e49b736d1 100644 --- a/src/feature-flags.ts +++ b/src/feature-flags.ts @@ -51,6 +51,7 @@ export enum Feature { AnalysisSummaryV2Enabled = "analysis_summary_v2_enabled", CliConfigFileEnabled = "cli_config_file_enabled", CodeqlJavaLombokEnabled = "codeql_java_lombok_enabled", + CppDependencyInstallation = "cpp_dependency_installation_enabled", DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled", DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled", EvaluatorIntraLayerParallelismEnabled = "evaluator_intra_layer_parallelism_enabled", @@ -74,6 +75,11 @@ export const featureConfig: Record< minimumVersion: "2.14.0", defaultValue: false, }, + [Feature.CppDependencyInstallation]: { + envVar: "CODEQL_CPP_DEPENDENCY_INSTALLATION", + minimumVersion: "2.15.0", + defaultValue: false, + }, [Feature.DisableKotlinAnalysisEnabled]: { envVar: "CODEQL_DISABLE_KOTLIN_ANALYSIS", minimumVersion: undefined,