From f10bc9d13042208317b123858d441f22426277e4 Mon Sep 17 00:00:00 2001 From: Dobiasd Date: Mon, 7 Apr 2025 07:08:35 +0200 Subject: [PATCH] Build project explicitly in codeql job --- .github/workflows/codeql.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f7332645..3dc7526e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,11 +1,9 @@ name: codeql - on: push: pull_request: schedule: - cron: '0 5 * * 3' - jobs: codeql: runs-on: ubuntu-latest @@ -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 \ No newline at end of file