@@ -43,10 +43,15 @@ jobs:
43
43
44
44
- name : Install Repo MSRV toolchain
45
45
run : |
46
- rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --target ${{ matrix.target }}
46
+ rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --target ${{ matrix.target }} --component llvm-tools
47
47
rustup override set ${{ env.MSRV }}
48
48
cargo -V
49
49
50
+ - name : Install `cargo-llvm-cov`
51
+ uses : taiki-e/install-action@v2
52
+ with :
53
+ tool : cargo-llvm-cov
54
+
50
55
- name : caching
51
56
uses : Swatinem/rust-cache@v2
52
57
with :
60
65
mkdir -p .cargo
61
66
cat <<EOF >> .cargo/config.toml
62
67
[profile.dev]
63
- debug = 1
68
+ debug = "line-tables-only"
64
69
EOF
65
70
66
71
- name : (Windows) Install DXC
@@ -71,12 +76,28 @@ jobs:
71
76
if : matrix.os == 'windows-2022'
72
77
uses : ./.github/actions/install-warp
73
78
with :
74
- target-dirs : " target/debug"
79
+ target-dirs : " target/llvm-cov-target/ debug"
75
80
76
81
- name : (Linux) Install Mesa
77
82
if : matrix.os == 'ubuntu-24.04'
78
83
uses : ./.github/actions/install-mesa
79
84
80
85
- name : run CTS
81
86
shell : bash
82
- run : cargo xtask cts
87
+ run : cargo xtask cts --llvm-cov
88
+
89
+ - name : Generate coverage report
90
+ id : coverage
91
+ shell : bash
92
+ continue-on-error : true
93
+ run : |
94
+ set -e
95
+
96
+ cargo llvm-cov report --lcov --output-path lcov.info
97
+
98
+ - name : Upload coverage report to Codecov
99
+ uses : codecov/codecov-action@v5
100
+ if : steps.coverage.outcome == 'success'
101
+ with :
102
+ files : lcov.info
103
+ token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments