Skip to content

Update build-codeql.yaml #512

Update build-codeql.yaml

Update build-codeql.yaml #512

Workflow file for this run

# 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;
Expand-Archive -Path codeql-win64.zip -DestinationPath .\codeql-zip -Force;
Move-Item -Path .\codeql-zip\codeql -Destination .\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