|
26 | 26 |
|
27 | 27 | steps: |
28 | 28 | - name: Install Dependencies |
29 | | - run: sudo apt-get update; sudo apt-get install libarchive-dev protobuf-compiler socat |
| 29 | + run: sudo apt-get update; sudo apt-get install libarchive-dev protobuf-compiler socat; rustup component add llvm-tools-preview |
30 | 30 | - name: Checkout sources |
31 | 31 | uses: actions/checkout@v2 |
32 | 32 | - name: Install ${{ matrix.version }} |
@@ -119,20 +119,25 @@ jobs: |
119 | 119 | args: --locked --all --all-features --no-fail-fast -- --nocapture |
120 | 120 | env: |
121 | 121 | CARGO_INCREMENTAL: '0' |
122 | | - RUSTFLAGS: '-Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort' |
123 | | - - id: coverage |
| 122 | + RUSTFLAGS: '-Cinstrument-coverage' |
| 123 | + LLVM_PROFILE_FILE: 'target/coverage/%p-%m.profraw' |
| 124 | + |
| 125 | + - name: Generate coverage report |
124 | 126 | if: matrix.name == 'nightly' |
125 | | - uses: actions-rs/grcov@master |
| 127 | + run: | |
| 128 | + grcov target/coverage/ --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" --ignore "tests/*" -o target/coverage/lcov.info |
| 129 | +
|
126 | 130 | - name: Coveralls upload |
127 | 131 | if: matrix.name == 'nightly' |
128 | 132 | uses: coverallsapp/github-action@master |
129 | 133 | with: |
130 | 134 | github-token: ${{ secrets.GITHUB_TOKEN }} |
131 | | - path-to-lcov: ${{ steps.coverage.outputs.report }} |
| 135 | + format: lcov |
| 136 | + path-to-lcov: target/coverage/lcov.info |
132 | 137 | - name: Clear the coverage files from cache |
133 | 138 | if: matrix.name == 'nightly' |
134 | 139 | run: | |
135 | | - find target/ -name "*.gcda" -exec rm {} + |
| 140 | + find target/coverage/ -name "*.profraw" -exec rm {} + |
136 | 141 |
|
137 | 142 | - name: Clear the cargo caches |
138 | 143 | run: | |
|
0 commit comments