-
Notifications
You must be signed in to change notification settings - Fork 28
83 lines (64 loc) · 2.42 KB
/
build-codeql.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# 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
permissions:
contents: read
packages: write
steps:
- name: codeql version test
run: .\codeql-cli\codeql.exe version