@@ -27,12 +27,12 @@ jobs:
2727 with :
2828 toolchain : nightly
2929 override : true
30+ components : llvm-tools-preview
3031 - uses : actions-rs/cargo@v1
3132 with :
3233 command : build
33- args : --verbose
34+ args : --release -- verbose
3435 env :
35- CARGO_INCREMENTAL : ' 0'
3636 RUSTC_WRAPPER : ' ./scripts/codecoverage-rustc-wrapper.sh'
3737 - uses : actions/setup-python@v1
3838 with :
@@ -49,17 +49,23 @@ jobs:
4949 working-directory : ./extra_tests
5050 env :
5151 RUSTPYTHON_TESTS_NOBUILD : ' true'
52- RUSTPYTHON_DEBUG : ' true '
52+ LLVM_PROFILE_FILE : ' snippet-%p.profraw '
5353 - name : run cpython tests
54- run : target/debug /rustpython -m test -v
54+ run : target/release /rustpython -m test -v
5555 env :
5656 RUSTPYTHONPATH : ${{ github.workspace }}/Lib
57- - uses : actions-rs/grcov@v0.1
58- id : coverage
57+ LLVM_PROFILE_FILE : ' regrtest.profraw'
58+ - name : prepare code coverage data
59+ run : |
60+ rusttool() {
61+ local tool=$1; shift; "$(rustc --print target-libdir)/../bin/llvm-$tool" "$@"
62+ }
63+ rusttool profdata merge extra_tests/snippet-*.profraw regrtest.profraw --output codecov.profdata
64+ rusttool cov export --instr-profile codecov.profdata target/release/rustpython >codecov.lcov
5965 - name : upload to Codecov
6066 uses : codecov/codecov-action@v1
6167 with :
62- file : ${{ steps.coverage.outputs.report }}
68+ file : ./codecov.lcov
6369
6470 testdata :
6571 name : Collect regression test data
0 commit comments