From 9c7112ff0720e11a94cc99e4f892dc5cf2c2e652 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sun, 26 Jan 2025 21:10:06 +0100 Subject: [PATCH 1/2] Add CodeQL nightly job --- .github/workflows/codeql.yml | 59 ++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..865b5ec0f --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,59 @@ +name: "CodeQL" + +on: + push: # REMOVE + pull_request: # REMOVE + schedule: + - cron: '0 0 * * *' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: + - cpp + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup environment + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt-get update + sudo apt-get install -y gcc-14 g++-14 ninja-build mpich libomp-dev valgrind + python3 -m pip install -r requirements.txt + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-gcc + create-symlink: true + max-size: 1G + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + - name: CMake configure + run: > + cmake -S . -B build + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache + -G Ninja -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON + -D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON + -D CMAKE_BUILD_TYPE=RELEASE + env: + CC: gcc-14 + CXX: g++-14 + - name: Build project + run: | + cmake --build build --parallel + env: + CC: gcc-14 + CXX: g++-14 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 From 6fda23793b997ab78a7ee98adcca5c002042ab61 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sun, 26 Jan 2025 22:36:55 +0100 Subject: [PATCH 2/2] Update .github/workflows/codeql.yml --- .github/workflows/codeql.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 865b5ec0f..35035851c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,8 +1,6 @@ name: "CodeQL" on: - push: # REMOVE - pull_request: # REMOVE schedule: - cron: '0 0 * * *'