Skip to content

Commit 9b3f1e9

Browse files
authored
[CI] Add CodeQL nightly job (#256)
1 parent 7a07725 commit 9b3f1e9

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/codeql.yml

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

0 commit comments

Comments
 (0)