Skip to content

Commit bacac2c

Browse files
authored
[ci] Disable CodeQL on macOS, Linux, non-main jobs (#9111)
Attempt to save some build time on macOS and Linux by disabling CodeQL. This step will still run during the Windows build job in CI, as well as the macOS nightly build job. An explicit branch check has also been added to ensure CodeQL only runs against the main branch.
1 parent 000759c commit bacac2c

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

build-tools/automation/azure-pipelines.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ extends:
7474
binskim:
7575
scanOutputDirectoryOnly: true
7676
codeql:
77-
runSourceLanguagesInSourceAnalysis: true
77+
${{ if ne(variables['Build.SourceBranch'], 'refs/heads/main') }}:
78+
compiled:
79+
enabled: false
80+
justificationForDisabling: CodeQL disabled for non-main branch builds
7881
policheck:
7982
enabled: false
8083
justification: Built in task does not support multi-language scanning

build-tools/automation/yaml-templates/build-linux.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ stages:
3535
CC: gcc-10
3636
${{ if eq(parameters.use1ESTemplate, true) }}:
3737
templateContext:
38+
sdl:
39+
codeql:
40+
compiled:
41+
enabled: false
42+
justificationForDisabling: CodeQL runs against the Windows build and nightly macOS build
3843
outputs:
3944
- output: pipelineArtifact
4045
displayName: upload linux sdk

build-tools/automation/yaml-templates/build-macos.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ stages:
4343
clean: all
4444
${{ if eq(parameters.use1ESTemplate, true) }}:
4545
templateContext:
46+
sdl:
47+
codeql:
48+
compiled:
49+
enabled: false
50+
justificationForDisabling: CodeQL runs against the Windows build and nightly macOS build
4651
outputParentDirectory: ${{ parameters.xaSourcePath }}/bin
4752
outputs:
4853
- output: pipelineArtifact

0 commit comments

Comments
 (0)