Skip to content

Commit 771b2d0

Browse files
committed
Update Code QL workflow.
1 parent eef998b commit 771b2d0

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/codeql-analysis.yml

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,40 @@
1-
name: "CodeQL"
1+
name: Code QL
22

33
on:
44
push:
55
branches: [ "master" ]
66
pull_request:
77
branches: [ "master" ]
8+
workflow_dispatch:
89

910
jobs:
1011
analyze:
11-
name: Analyze
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
language: [ 'cpp' ]
16+
config: ['Release']
17+
name: Analyze ${{ matrix.language }} in ${{ matrix.config }}
1218
runs-on: ubuntu-latest
1319
permissions:
1420
actions: read
1521
contents: read
1622
security-events: write
17-
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
language: [ 'cpp' ]
22-
2323
steps:
2424
- name: Checkout repository
2525
uses: actions/checkout@v4
26-
2726
- name: Initialize CodeQL
2827
uses: github/codeql-action/init@v3
2928
with:
3029
languages: ${{ matrix.language }}
31-
- run: bash compile.sh Release
32-
30+
- name: Build and test in ${{ matrix.config }}.
31+
shell: bash
32+
run: |
33+
CMAKE_GENERATOR_PLATFORM_ARG=""
34+
if [ "$RUNNER_OS" == "Windows" ]; then
35+
CMAKE_GENERATOR_PLATFORM_ARG="-DCMAKE_GENERATOR_PLATFORM=x64"
36+
fi
37+
cmake -S. -Bbuild/${{ matrix.config }} -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DBUILD_TESTING=ON -DBUILD_MEMCHECK=ON ${CMAKE_GENERATOR_PLATFORM_ARG}
38+
cmake --build build/${{ matrix.config }} --config ${{ matrix.config }} --parallel 4 --target gtl_build
3339
- name: Perform CodeQL Analysis
3440
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)