Skip to content

Commit 6f38aac

Browse files
authored
Merge pull request #3306 from eseiler/infra/codeql_ci
[INFRA] Add CodeQL CI
2 parents c289f7f + d99b1ae commit 6f38aac

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/workflows/ci_codeql.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2+
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
name: CodeQL
6+
7+
on:
8+
schedule:
9+
- cron: "0 6 * * SAT"
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: codeql-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
env:
17+
SEQAN3_NO_VERSION_CHECK: 1
18+
TZ: Europe/Berlin
19+
20+
defaults:
21+
run:
22+
shell: bash -Eeuxo pipefail {0}
23+
24+
jobs:
25+
codeql:
26+
name: CodeQL
27+
runs-on: ubuntu-latest
28+
permissions:
29+
security-events: write
30+
container:
31+
image: ghcr.io/seqan/gcc-14
32+
volumes:
33+
- /home/runner:/home/runner
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@v3
40+
with:
41+
languages: cpp
42+
build-mode: manual
43+
trap-caching: false
44+
45+
- name: Build tests
46+
run: |
47+
cmake test/analyse -DCMAKE_BUILD_TYPE=Release \
48+
-DCMAKE_CXX_FLAGS="-std=c++23" \
49+
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
50+
make -k
51+
52+
- name: Perform CodeQL Analysis
53+
uses: github/codeql-action/analyze@v3
54+
with:
55+
category: "/language:cpp"

test/analyse/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2+
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
cmake_minimum_required (VERSION 3.10...3.30)
6+
project (seqan3_test_analyze CXX)
7+
8+
include (../seqan3-test.cmake)
9+
10+
enable_testing ()
11+
12+
option (SEQAN3_GENERATE_SNIPPETS "" OFF)
13+
14+
add_subdirectory (../performance performance)
15+
add_subdirectory (../snippet snippet)
16+
add_subdirectory (../unit unit)

0 commit comments

Comments
 (0)