-
Notifications
You must be signed in to change notification settings - Fork 82
30 lines (28 loc) · 1007 Bytes
/
coverage.yaml
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
name: Coverage
on: [pull_request, push]
jobs:
coverage:
runs-on: avx
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
components: rustfmt
toolchain: nightly-2024-01-04
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
# TODO: Merge coverage reports for tests on different architectures.
# <https://github.com/taiki-e/cargo-llvm-cov?tab=readme-ov-file#merge-coverages-generated-under-different-test-conditions>
- name: Generate code coverage
run: cargo +nightly-2024-01-04 llvm-cov --codecov --output-path codecov.json
env:
RUSTFLAGS: "-C target-feature=+avx512f"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true