Repository navigation
273 lines (230 loc) · 7.68 KB
/
Copy pathci_runtime.yml
File metadata and controls
273 lines (230 loc) · 7.68 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
name: ci_runtime
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
autoconf \
automake \
pkg-config \
autotools-dev \
libncurses5-dev \
libparted-dev \
libconfig-dev \
libconfig++-dev \
dmidecode \
smartmontools \
hdparm \
util-linux
- name: Install meson build system
run: sudo apt-get install -y meson ninja-build libjson-c-dev
- name: Build libnvme dependency
run: |
wget https://github.com/linux-nvme/libnvme/archive/refs/tags/v1.16.1.tar.gz
tar xvfz v1.16.1.tar.gz
cd libnvme-1.16.1
meson setup .build
meson compile -C .build
sudo meson install -C .build
sudo ldconfig
- name: Create Autoconf files
run: ./autogen.sh
- name: Configure
run: ./configure CFLAGS='-O0 -g -Wall -Wextra' CXXFLAGS='-O0 -g -Wall -Wextra'
- name: Build
run: make -j"$(nproc)"
- name: Run deterministic unit tests
run: |
make -C src test_round_size
./src/test_round_size
- name: Run CLI unit smoke test (executes nwipe --nogui)
run: |
chmod +x tests/ci/loopback_e2e.sh
sudo -E env NWIPE_CI_ARTIFACT_DIR="$PWD/ci-artifacts/unit-cli" \
tests/ci/loopback_e2e.sh smoke ./src/nwipe
- name: Upload unit CLI artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-cli-smoke-logs
path: ci-artifacts/unit-cli
if-no-files-found: ignore
integration-loopback:
runs-on: ubuntu-latest
needs: unit-tests
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
autoconf \
automake \
pkg-config \
autotools-dev \
libncurses5-dev \
libparted-dev \
libconfig-dev \
libconfig++-dev \
dmidecode \
smartmontools \
hdparm \
util-linux
- name: Install meson build system
run: sudo apt-get install -y meson ninja-build libjson-c-dev
- name: Build libnvme dependency
run: |
wget https://github.com/linux-nvme/libnvme/archive/refs/tags/v1.16.1.tar.gz
tar xvfz v1.16.1.tar.gz
cd libnvme-1.16.1
meson setup .build
meson compile -C .build
sudo meson install -C .build
sudo ldconfig
- name: Create Autoconf files
run: ./autogen.sh
- name: Configure
run: ./configure CFLAGS='-O0 -g -Wall -Wextra' CXXFLAGS='-O0 -g -Wall -Wextra'
- name: Build
run: make -j"$(nproc)"
- name: Build STS suite (legacy FFT mode)
run: |
git clone --depth 1 https://github.com/arcetri/sts.git /tmp/sts
CCACHE_DIR=/tmp/ccache make -C /tmp/sts legacy
- name: Run loopback integration tests
run: |
chmod +x tests/ci/loopback_e2e.sh
sudo -E env \
NWIPE_CI_ARTIFACT_DIR="$PWD/ci-artifacts/integration" \
NWIPE_STS_BIN="/tmp/sts/sts_legacy_fft" \
NWIPE_STS_MIN_RATIO="0.9" \
NWIPE_STS_ITERATIONS="32" \
NWIPE_STS_RETRIES="1" \
tests/ci/loopback_e2e.sh full ./src/nwipe
- name: Upload integration artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: integration-loopback-logs
path: ci-artifacts/integration
if-no-files-found: ignore
fault-injection:
runs-on: ubuntu-latest
needs: unit-tests
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
autoconf \
automake \
pkg-config \
autotools-dev \
libncurses5-dev \
libparted-dev \
libconfig-dev \
libconfig++-dev \
dmidecode \
smartmontools \
hdparm \
util-linux \
dmsetup
- name: Install meson build system
run: sudo apt-get install -y meson ninja-build libjson-c-dev
- name: Build libnvme dependency
run: |
wget https://github.com/linux-nvme/libnvme/archive/refs/tags/v1.16.1.tar.gz
tar xvfz v1.16.1.tar.gz
cd libnvme-1.16.1
meson setup .build
meson compile -C .build
sudo meson install -C .build
sudo ldconfig
- name: Create Autoconf files
run: ./autogen.sh
- name: Configure
run: ./configure CFLAGS='-O0 -g -Wall -Wextra' CXXFLAGS='-O0 -g -Wall -Wextra'
- name: Build
run: make -j"$(nproc)"
- name: Run fault injection tests
run: |
chmod +x tests/ci/fault_injection.sh
sudo -E env NWIPE_CI_ARTIFACT_DIR="$PWD/ci-artifacts/fault-inj" \
tests/ci/fault_injection.sh ./src/nwipe
- name: Upload fault injection artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: fault-injection-logs
path: ci-artifacts/fault-inj
if-no-files-found: ignore
sanitizer-smoke:
runs-on: ubuntu-latest
needs: unit-tests
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
autoconf \
automake \
pkg-config \
autotools-dev \
libncurses5-dev \
libparted-dev \
libconfig-dev \
libconfig++-dev \
dmidecode \
smartmontools \
hdparm \
util-linux
- name: Install meson build system
run: sudo apt-get install -y meson ninja-build libjson-c-dev
- name: Build libnvme dependency
run: |
wget https://github.com/linux-nvme/libnvme/archive/refs/tags/v1.16.1.tar.gz
tar xvfz v1.16.1.tar.gz
cd libnvme-1.16.1
meson setup .build
meson compile -C .build
sudo meson install -C .build
sudo ldconfig
- name: Create Autoconf files
run: ./autogen.sh
- name: Configure (ASan + UBSan)
run: |
./configure \
CFLAGS='-O1 -g -Wall -Wextra -fno-omit-frame-pointer -fsanitize=address,undefined' \
CXXFLAGS='-O1 -g -Wall -Wextra -fno-omit-frame-pointer -fsanitize=address,undefined' \
LDFLAGS='-fsanitize=address,undefined'
- name: Build
run: make -j"$(nproc)"
- name: Run sanitizer smoke tests
env:
ASAN_OPTIONS: detect_leaks=0:abort_on_error=1:strict_string_checks=1
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
run: |
chmod +x tests/ci/loopback_e2e.sh
sudo -E env \
ASAN_OPTIONS="$ASAN_OPTIONS" \
UBSAN_OPTIONS="$UBSAN_OPTIONS" \
NWIPE_CI_ARTIFACT_DIR="$PWD/ci-artifacts/sanitizer" \
tests/ci/loopback_e2e.sh smoke ./src/nwipe
- name: Upload sanitizer artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: sanitizer-smoke-logs
path: ci-artifacts/sanitizer
if-no-files-found: ignore