Update build-codeql.yaml #511
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Continuous integration action for the CodeQL components of this repo. | |
# This downloads the CodeQL CLI and then builds all the queries in the "windows-drivers" folder. | |
name: Build and Publish Windows CodeQL queries | |
on: | |
# Triggers the workflow on push or pull request events but only for the main and development branches | |
push: | |
branches: [ main, development, jacob-ronstadt/github_actions_update ] | |
pull_request: | |
branches: [ main, development ] | |
# Allow manual scheduling | |
workflow_dispatch: | |
env: | |
CODEQL_VERSION: "2.15.4" | |
jobs: | |
build: | |
runs-on: windows-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Enable long git paths | |
shell: cmd | |
run: git config --global core.longpaths true | |
- name: Clone self (windows-driver-developer-supplemental-tools) | |
uses: actions/checkout@v4 | |
with: | |
path: . | |
fetch-depth: 0 | |
- name: CodeQL Download | |
run: Invoke-WebRequest -Uri "https://github.com/github/codeql-cli-binaries/releases/download/v${{ env.CODEQL_VERSION }}/codeql-win64.zip" -OutFile codeql-win64.zip | |
- name: Unzip CodeQL CLI | |
run: Expand-Archive -Path codeql-win64.zip -DestinationPath .\codeql-zip -Force | |
- name: Move CodeQL CLI folder to main subdirectory | |
shell: cmd | |
continue-on-error: true # Required because robocopy returns 1 on success | |
run: robocopy /S /move .\codeql-zip\codeql .\codeql-cli\ | |
# - name: Install CodeQL pack dependencies | |
# shell: cmd | |
# run: | | |
# pushd .\src | |
# ..\codeql-cli\codeql.cmd pack install | |
# popd | |
# - name: codeql version test | |
# run: .\codeql-cli\codeql.exe version | |
# - name: Build must-fix driver suite | |
# shell: cmd | |
# run: .\codeql-cli\codeql.cmd query compile --check-only windows_mustfix_partial.qls | |
# - name: Build recommended driver suite | |
# shell: cmd | |
# run: .\codeql-cli\codeql.cmd query compile --check-only windows_recommended_partial.qls | |
# - name: Build CA ported queries | |
# shell: cmd | |
# run: .\codeql-cli\codeql.cmd query compile --check-only ported_driver_ca_checks.qls | |
# - name: Build all Windows queries | |
# shell: cmd | |
# run: .\codeql-cli\codeql.cmd query compile --check-only .\src | |
test: | |
runs-on: windows-latest | |
needs: build | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: codeql version test | |
run: .\codeql-cli\codeql.exe version | |