-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (69 loc) · 2.07 KB
/
Copy pathcodeql.yml
File metadata and controls
80 lines (69 loc) · 2.07 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CodeQL
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "17 03 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze ${{ matrix.name }}
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- name: C/C++
language: c-cpp
build_mode: manual
build_command: |
cmake -S . -B build-codeql -DCMAKE_BUILD_TYPE=Debug
cmake --build build-codeql --parallel --target netipc_protocol netipc_uds netipc_shm netipc_service
- name: Go
language: go
build_mode: manual
build_command: |
for module in src/go tests/fixtures/go bench/drivers/go; do
(cd "$module" && go test ./...)
done
- name: Rust
language: rust
build_mode: none
build_command: ":"
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Set up Go
if: matrix.language == 'go'
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: src/go/go.mod
cache: false
- name: Initialize CodeQL
uses: github/codeql-action/init@87557b9c84dde89fdd9b10e88954ac2f4248e463 # v4.36.1
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build_mode }}
config-file: ./.github/codeql.yml
- name: Build for CodeQL
if: matrix.build_mode == 'manual'
run: ${{ matrix.build_command }}
- name: Analyze
uses: github/codeql-action/analyze@87557b9c84dde89fdd9b10e88954ac2f4248e463 # v4.36.1
with:
category: /language:${{ matrix.language }}