@@ -43,10 +43,15 @@ jobs:
4343
4444 - name : Install Repo MSRV toolchain
4545 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
4747 rustup override set ${{ env.MSRV }}
4848 cargo -V
4949
50+ - name : Install `cargo-llvm-cov`
51+ uses : taiki-e/install-action@v2
52+ with :
53+ tool : cargo-llvm-cov
54+
5055 - name : caching
5156 uses : Swatinem/rust-cache@v2
5257 with :
6065 mkdir -p .cargo
6166 cat <<EOF >> .cargo/config.toml
6267 [profile.dev]
63- debug = 1
68+ debug = "line-tables-only"
6469 EOF
6570
6671 - name : (Windows) Install DXC
@@ -71,12 +76,28 @@ jobs:
7176 if : matrix.os == 'windows-2022'
7277 uses : ./.github/actions/install-warp
7378 with :
74- target-dirs : " target/debug"
79+ target-dirs : " target/llvm-cov-target/ debug"
7580
7681 - name : (Linux) Install Mesa
7782 if : matrix.os == 'ubuntu-24.04'
7883 uses : ./.github/actions/install-mesa
7984
8085 - name : run CTS
8186 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