@@ -105,7 +105,7 @@ jobs:
105
105
declare -A rust_target_map=( ["amd64"]="x86_64-unknown-linux-musl" ["arm64"]="aarch64-unknown-linux-musl" ["ppc64le"]="powerpc64le-unknown-linux-gnu")
106
106
RUST_TARGET=${rust_target_map[${{ matrix.arch }}]}
107
107
cargo install --locked --version 0.2.5 cross
108
- make -e RUST_TARGET_STATIC=$RUST_TARGET -e CARGO=cross static-release
108
+ RUSTFLAGS="-C instrument-coverage" make -e RUST_TARGET_STATIC=$RUST_TARGET -e CARGO=cross static-release
109
109
- name : Build Nydus RISC-V
110
110
if : matrix.arch == 'riscv64'
111
111
run : |
@@ -188,6 +188,21 @@ jobs:
188
188
sudo tar xzf nydus-static-$version_arch.tgz -C nydus-$version
189
189
sudo cp -r nydus-$version/nydus-static/* /usr/bin/nydus-$version/
190
190
done
191
+ - name : Free Disk Space
192
+ uses : jlumbroso/free-disk-space@main
193
+ with :
194
+ # this might remove tools that are actually needed,
195
+ # if set to "true" but frees about 6 GB
196
+ tool-cache : true
197
+
198
+ # all of these default to true, but feel free to set to
199
+ # "false" if necessary for your workflow
200
+ android : true
201
+ dotnet : true
202
+ haskell : true
203
+ large-packages : true
204
+ docker-images : true
205
+ swap-storage : true
191
206
- name : Setup Golang
192
207
uses : actions/setup-go@v5
193
208
with :
@@ -215,6 +230,16 @@ jobs:
215
230
216
231
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin v1.64.8
217
232
sudo -E make smoke-only
233
+ - name : Generate integration test code coverage
234
+ run : |
235
+ cargo +stable install grcov --locked
236
+ grcov . -s . --binary-path ./target/x86_64-unknown-linux-musl/release -t covdir --branch --ignore-not-existing -o ./lcov.info
237
+ - name : Upload nydus coverage file
238
+ uses : actions/upload-artifact@v4
239
+ with :
240
+ name : integration-test-coverage-artifact
241
+ path : |
242
+ lcov.info
218
243
219
244
nydus-unit-test :
220
245
runs-on : ubuntu-latest
@@ -254,7 +279,7 @@ jobs:
254
279
- name : Upload contrib coverage file
255
280
uses : actions/upload-artifact@v4
256
281
with :
257
- name : contrib-test-coverage-artifact
282
+ name : contrib-unit- test-coverage-artifact
258
283
path : |
259
284
contrib/nydusify/coverage.txt
260
285
@@ -283,27 +308,31 @@ jobs:
283
308
- name : Upload nydus coverage file
284
309
uses : actions/upload-artifact@v4
285
310
with :
286
- name : nydus-test-coverage-artifact
311
+ name : nydus-unit- test-coverage-artifact
287
312
path : |
288
313
codecov.json
289
314
290
315
upload-coverage-to-codecov :
291
316
runs-on : ubuntu-latest
292
- needs : [contrib-unit-test-coverage, nydus-unit-test-coverage]
317
+ needs : [contrib-unit-test-coverage, nydus-unit-test-coverage, nydus-integration-test ]
293
318
steps :
294
319
- uses : actions/checkout@v4
295
- - name : Download nydus coverage file
320
+ - name : Download nydus unit test coverage file
321
+ uses : actions/download-artifact@v4
322
+ with :
323
+ name : nydus-unit-test-coverage-artifact
324
+ - name : Download contrib unit test coverage file
296
325
uses : actions/download-artifact@v4
297
326
with :
298
- name : nydus -test-coverage-artifact
299
- - name : Download contrib coverage file
327
+ name : contrib-unit -test-coverage-artifact
328
+ - name : Download integration test coverage file
300
329
uses : actions/download-artifact@v4
301
330
with :
302
- name : contrib -test-coverage-artifact
331
+ name : integration -test-coverage-artifact
303
332
- name : Upload coverage to Codecov
304
333
uses : codecov/codecov-action@v4
305
334
with :
306
- files : ./codecov.json,./coverage.txt
335
+ files : ./codecov.json,./coverage.txt,./lcov.info
307
336
token : ${{ secrets.CODECOV_TOKEN }}
308
337
verbose : true
309
338
fail_ci_if_error : true
0 commit comments