-
Notifications
You must be signed in to change notification settings - Fork 35
56 lines (45 loc) · 1.27 KB
/
codeql.yml
File metadata and controls
56 lines (45 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Run weekly on Sunday at 00:00 UTC
- cron: '0 0 * * 0'
# Cancel in-progress runs for the same PR/branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
security-events: write
jobs:
analyze:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache toolchain
uses: actions/cache@v5
id: cache-toolchain
with:
path: riscv
# Share cache with main CI workflow
key: riscv32-gnu-${{ hashFiles('.ci/setup-toolchain.sh') }}
- name: Setup toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: .ci/setup-toolchain.sh gnu
- name: Configure toolchain environment
run: |
echo "$PWD/riscv/bin" >> "$GITHUB_PATH"
echo "CROSS_COMPILE=riscv32-unknown-elf-" >> "$GITHUB_ENV"
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: cpp
- name: Build
run: make -j$(nproc)
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v4