Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run CodeQL on the build, not on test collateral. #878

Merged
merged 1 commit into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions azure-pipelines/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ jobs:
value: $(Build.SourcesDirectory)\vcpkg-root
- name: Codeql.BuildIdentifier
value: vcpkg_cpp
- name: Codeql.Language
value: cpp
steps:
- task: Powershell@2
displayName: "Clone vcpkg repo to serve as root"
Expand All @@ -124,8 +126,6 @@ jobs:
$sha = (Get-Content vcpkg-init/vcpkg-scripts-sha.txt -Raw).Trim()
git clone https://github.com/microsoft/vcpkg $env:VCPKG_ROOT -n
git -C "$env:VCPKG_ROOT" checkout $sha
- task: CodeQL3000Init@0
displayName: 'CodeQL Initialize'
- task: Powershell@2
displayName: 'Format C++'
inputs:
Expand Down Expand Up @@ -154,6 +154,8 @@ jobs:
- script: npm install -g @microsoft/rush
displayName: Install Rush
workingDirectory: ce\common\config\rush
- task: CodeQL3000Init@0
displayName: 'CodeQL Initialize'
- task: CmdLine@2
displayName: "Build vcpkg with CMake"
inputs:
Expand All @@ -163,6 +165,8 @@ jobs:
cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_BENCHMARKING=ON -DVCPKG_BUILD_FUZZING=ON -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_ARTIFACTS_DEVELOPMENT=ON -B build.x86.debug
ninja.exe -C build.x86.debug all generate-message-map
failOnStderr: true
- task: CodeQL3000Finalize@0
displayName: 'CodeQL Finalize'
- script: build.x86.debug\vcpkg-test.exe
displayName: "Run vcpkg tests"
failOnStderr: true
Expand All @@ -174,5 +178,3 @@ jobs:
filePath: 'azure-pipelines/end-to-end-tests.ps1'
workingDirectory: '$(Build.SourcesDirectory)/build.x86.debug'
pwsh: true
- task: CodeQL3000Finalize@0
displayName: 'CodeQL Finalize'
12 changes: 6 additions & 6 deletions azure-pipelines/signing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ jobs:
pool:
name: 'VSEngSS-MicroBuild2022-1ES'
steps:
- task: CodeQL3000Init@0
displayName: 'CodeQL Initialize'
- task: Powershell@2
displayName: 'Lock VCPKG_BASE_VERSION'
name: versions
Expand Down Expand Up @@ -97,9 +95,13 @@ jobs:
- script: rush lint
displayName: Check vcpkg-artifacts for Linting Errors
workingDirectory: ce
- task: CodeQL3000Init@0
displayName: 'CodeQL Initialize'
- script: rush rebuild
displayName: Build vcpkg-artifacts Packages
workingDirectory: ce
- task: CodeQL3000Finalize@0
displayName: 'CodeQL Finalize'
- script: rush test
displayName: Run vcpkg-artifacts Tests
workingDirectory: ce
Expand Down Expand Up @@ -185,8 +187,6 @@ jobs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\staging'
ArtifactName: 'staging'
publishLocation: 'Container'
- task: CodeQL3000Finalize@0
displayName: 'CodeQL Finalize'
- job: macos_build
displayName: 'MacOS Build'
dependsOn:
Expand Down Expand Up @@ -298,6 +298,8 @@ jobs:
cmake.exe --version
cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_OFFICIAL_BUILD=ON -DVCPKG_PDB_SUFFIX="-arm64" "-DVCPKG_FMT_URL=$(fmt-tarball-url)" "-DVCPKG_CMAKERC_URL=$(cmakerc-tarball-url)" "-DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION)" "-DVCPKG_STANDALONE_BUNDLE_SHA=$(VCPKG_STANDALONE_BUNDLE_SHA)" "-DVCPKG_CE_SHA=$(VCPKG_CE_SHA)" -B "$(Build.BinariesDirectory)\arm64"
ninja.exe -C "$(Build.BinariesDirectory)\arm64"
- task: CodeQL3000Finalize@0
displayName: 'CodeQL Finalize'
- task: MicroBuildSigningPlugin@3
displayName: Install MicroBuild Signing
inputs:
Expand Down Expand Up @@ -463,8 +465,6 @@ jobs:
uploadRoslyn: false
uploadTSLint: false
condition: eq(variables['Build.SourceBranchName'], 'main')
- task: CodeQL3000Finalize@0
displayName: 'CodeQL Finalize'
# Publish everything to a Drop
- task: PublishBuildArtifacts@1
displayName: 'Publish Drop'
Expand Down