Skip to content

Commit df9f538

Browse files
committed
fix(coverage): more dynamic rustflags for tarpaulin
1 parent 64a640b commit df9f538

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ jobs:
3131
with:
3232
python-version: "3.13"
3333

34-
- name: Set up uv Python env
35-
run: |
36-
pip install uv
37-
uv venv
38-
source .venv/bin/activate
39-
uv pip install maturin
40-
4134
- name: Install cargo-tarpaulin
4235
run: cargo install cargo-tarpaulin --version 0.26.0
4336

@@ -46,7 +39,9 @@ jobs:
4639

4740
- name: Run tests and generate coverage report
4841
run: |
49-
export RUSTFLAGS="-L $(python3-config --libdir) -lpython$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'))"
42+
LIBDIR=$(python3 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
43+
VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
44+
export RUSTFLAGS="-L $LIBDIR -lpython$VERSION"
5045
cargo tarpaulin --all-features --out Xml --output-dir ./coverage
5146
5247
- name: Upload coverage to Codecov

0 commit comments

Comments
 (0)