-
Notifications
You must be signed in to change notification settings - Fork 0
170 lines (157 loc) · 5.12 KB
/
codeql.yml
File metadata and controls
170 lines (157 loc) · 5.12 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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: ${{ matrix.runner }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- name: C/C++ POSIX
language: c-cpp
runner: ubuntu-latest
build_mode: manual
category: /language:c-cpp-posix
build_command: |
cmake -S . -B build-codeql-posix -DCMAKE_BUILD_TYPE=Debug
cmake --build build-codeql-posix --parallel --target \
netipc_protocol \
netipc_uds \
netipc_shm \
netipc_service \
test_protocol \
interop_codec_c \
fuzz_protocol \
test_uds \
interop_uds_c \
test_shm \
interop_shm_c \
test_service \
test_service_extra \
test_service_payload_limits \
test_service_method_limits \
test_multi_server \
interop_service_c \
test_stress \
test_ping_pong \
test_chaos \
test_hardening \
test_cache \
interop_cache_c \
bench_posix_c
- name: C/C++ Windows
language: c-cpp
runner: windows-latest
build_mode: manual
category: /language:c-cpp-windows
msys2: true
build_command: |
cmake -S . -B build-codeql-windows -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=/usr/bin/gcc \
-DCMAKE_CXX_COMPILER=/usr/bin/g++
cmake --build build-codeql-windows \
--parallel "$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 4)" \
--target \
netipc_protocol \
netipc_named_pipe \
netipc_win_shm \
netipc_service_win \
test_named_pipe \
interop_named_pipe_c \
test_win_shm \
test_win_service \
test_win_service_extra \
test_win_service_payload_limits \
test_win_service_guards \
test_win_service_guards_extra \
test_win_stress \
interop_win_shm_c \
interop_service_win_c \
interop_cache_win_c \
bench_windows_c
- name: Go POSIX
language: go
runner: ubuntu-latest
build_mode: manual
category: /language:go-posix
build_command: |
for module in src/go tests/fixtures/go bench/drivers/go; do
(cd "$module" && go test ./...)
done
- name: Go Windows
language: go
runner: windows-latest
build_mode: manual
category: /language:go-windows
msys2: true
build_command: |
for module in src/go tests/fixtures/go bench/drivers/go; do
(cd "$module" && CGO_ENABLED=0 go test ./...)
done
- name: Rust
language: rust
runner: ubuntu-latest
build_mode: none
category: /language:rust
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: Set up MSYS2
if: matrix.msys2 == true
uses: msys2/setup-msys2@e9898307ac31d1a803454791be09ab9973336e1c # v2
with:
msystem: MSYS
update: true
path-type: inherit
install: >-
base-devel
gcc
cmake
ninja
git
- 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' && matrix.msys2 != true
run: ${{ matrix.build_command }}
- name: Build for CodeQL on MSYS2
if: matrix.build_mode == 'manual' && matrix.msys2 == true
shell: msys2 {0}
run: ${{ matrix.build_command }}
- name: Analyze
uses: github/codeql-action/analyze@87557b9c84dde89fdd9b10e88954ac2f4248e463 # v4.36.1
with:
category: ${{ matrix.category }}