Skip to content

Commit f10bc9d

Browse files
committed
Build project explicitly in codeql job
1 parent c4476cf commit f10bc9d

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/codeql.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: codeql
2-
32
on:
43
push:
54
pull_request:
65
schedule:
76
- cron: '0 5 * * 3'
8-
97
jobs:
108
codeql:
119
runs-on: ubuntu-latest
@@ -21,8 +19,19 @@ jobs:
2119
with:
2220
languages: cpp
2321
queries: +security-and-quality
24-
- name: Build
22+
- name: Install doctest
2523
shell: bash
26-
run: script/ci.sh run_build
24+
run: |
25+
cd "${{ github.workspace }}"
26+
git clone --depth=1 --branch=v2.4.11 https://github.com/doctest/doctest
27+
cd doctest && mkdir -p build && cd build
28+
cmake .. -DDOCTEST_WITH_TESTS=OFF -DDOCTEST_WITH_MAIN_IN_STATIC_LIB=OFF -DCMAKE_INSTALL_PREFIX="$HOME/.local"
29+
make -j "$(nproc)" install
30+
- name: Configure Project (for CodeQL)
31+
shell: bash
32+
run: cmake -S . -B codeql_build -D CMAKE_BUILD_TYPE=Release -D CMAKE_PREFIX_PATH="$HOME/.local"
33+
- name: Build Project (for CodeQL)
34+
shell: bash
35+
run: cmake --build codeql_build -j "$(nproc)"
2736
- name: CodeQL Analysis
28-
uses: github/codeql-action/analyze@v3
37+
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)