Skip to content

Build project explicitly in CodeQL job #315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: codeql

on:
push:
pull_request:
schedule:
- cron: '0 5 * * 3'

jobs:
codeql:
runs-on: ubuntu-latest
Expand All @@ -21,8 +19,19 @@ jobs:
with:
languages: cpp
queries: +security-and-quality
- name: Build
- name: Install doctest
shell: bash
run: script/ci.sh run_build
run: |
cd "${{ github.workspace }}"
git clone --depth=1 --branch=v2.4.11 https://github.com/doctest/doctest
cd doctest && mkdir -p build && cd build
cmake .. -DDOCTEST_WITH_TESTS=OFF -DDOCTEST_WITH_MAIN_IN_STATIC_LIB=OFF -DCMAKE_INSTALL_PREFIX="$HOME/.local"
make -j "$(nproc)" install
- name: Configure Project (for CodeQL)
shell: bash
run: cmake -S . -B codeql_build -D CMAKE_BUILD_TYPE=Release -D CMAKE_PREFIX_PATH="$HOME/.local"
- name: Build Project (for CodeQL)
shell: bash
run: cmake --build codeql_build -j "$(nproc)"
- name: CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v3