@@ -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 : |
@@ -158,9 +158,9 @@ jobs:
158
158
steps :
159
159
- name : Checkout
160
160
uses : actions/checkout@v4
161
- - name : Docker Cache
162
-
163
- continue-on-error : true
161
+ # - name: Docker Cache
162
+
163
+ # continue-on-error: true
164
164
- name : Download Nydus
165
165
uses : actions/download-artifact@v4
166
166
with :
@@ -193,6 +193,21 @@ jobs:
193
193
with :
194
194
go-version-file : ' go.work'
195
195
cache-dependency-path : " **/*.sum"
196
+ - name : Free Disk Space
197
+ uses : jlumbroso/free-disk-space@main
198
+ with :
199
+ # this might remove tools that are actually needed,
200
+ # if set to "true" but frees about 6 GB
201
+ tool-cache : false
202
+
203
+ # all of these default to true, but feel free to set to
204
+ # "false" if necessary for your workflow
205
+ android : true
206
+ dotnet : true
207
+ haskell : true
208
+ large-packages : true
209
+ docker-images : true
210
+ swap-storage : true
196
211
- name : Integration Test
197
212
run : |
198
213
sudo mkdir -p /usr/bin/nydus-latest /home/runner/work/workdir
@@ -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