Skip to content

Commit 9c7112f

Browse files
committed
Add CodeQL nightly job
1 parent 7872904 commit 9c7112f

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push: # REMOVE
5+
pull_request: # REMOVE
6+
schedule:
7+
- cron: '0 0 * * *'
8+
9+
jobs:
10+
analyze:
11+
name: Analyze
12+
runs-on: ubuntu-latest
13+
permissions:
14+
actions: read
15+
contents: read
16+
security-events: write
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
language:
21+
- cpp
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
submodules: recursive
26+
- name: Setup environment
27+
run: |
28+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
29+
sudo apt-get update
30+
sudo apt-get install -y gcc-14 g++-14 ninja-build mpich libomp-dev valgrind
31+
python3 -m pip install -r requirements.txt
32+
- name: ccache
33+
uses: hendrikmuhs/ccache-action@v1.2
34+
with:
35+
key: ${{ runner.os }}-gcc
36+
create-symlink: true
37+
max-size: 1G
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@v2
40+
with:
41+
languages: ${{ matrix.language }}
42+
- name: CMake configure
43+
run: >
44+
cmake -S . -B build
45+
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
46+
-G Ninja -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON
47+
-D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON
48+
-D CMAKE_BUILD_TYPE=RELEASE
49+
env:
50+
CC: gcc-14
51+
CXX: g++-14
52+
- name: Build project
53+
run: |
54+
cmake --build build --parallel
55+
env:
56+
CC: gcc-14
57+
CXX: g++-14
58+
- name: Perform CodeQL Analysis
59+
uses: github/codeql-action/analyze@v2

0 commit comments

Comments
 (0)