Use extraction via build mode in autobuild Action when available
This commit is contained in:
parent
e37d0f3e7c
commit
3d49faaabb
15 changed files with 114 additions and 75 deletions
|
|
@ -5,7 +5,12 @@ import { getGitHubVersion } from "./api-client";
|
|||
import { CodeQL, getCodeQL } from "./codeql";
|
||||
import * as configUtils from "./config-utils";
|
||||
import { EnvVar } from "./environment";
|
||||
import { Feature, featureConfig, Features } from "./feature-flags";
|
||||
import {
|
||||
Feature,
|
||||
featureConfig,
|
||||
FeatureEnablement,
|
||||
Features,
|
||||
} from "./feature-flags";
|
||||
import { isTracedLanguage, Language } from "./languages";
|
||||
import { Logger } from "./logging";
|
||||
import { parseRepositoryNwo } from "./repository";
|
||||
|
|
@ -154,6 +159,7 @@ export async function setupCppAutobuild(codeql: CodeQL, logger: Logger) {
|
|||
export async function runAutobuild(
|
||||
language: Language,
|
||||
config: configUtils.Config,
|
||||
features: FeatureEnablement,
|
||||
logger: Logger,
|
||||
) {
|
||||
logger.startGroup(`Attempting to automatically build ${language} code`);
|
||||
|
|
@ -161,7 +167,14 @@ export async function runAutobuild(
|
|||
if (language === Language.cpp) {
|
||||
await setupCppAutobuild(codeQL, logger);
|
||||
}
|
||||
await codeQL.runAutobuild(language, config.debugMode);
|
||||
if (
|
||||
config.buildMode &&
|
||||
(await features.getValue(Feature.AutobuildDirectTracingEnabled, codeQL))
|
||||
) {
|
||||
await codeQL.extractUsingBuildMode(config, language);
|
||||
} else {
|
||||
await codeQL.runAutobuild(language, config.debugMode);
|
||||
}
|
||||
if (language === Language.go) {
|
||||
core.exportVariable(EnvVar.DID_AUTOBUILD_GOLANG, "true");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue