Skip to content

ci: include coverage from running build scripts#6007

Merged
davidhewitt merged 25 commits into
PyO3:mainfrom
davidhewitt:build-script-coverage
May 16, 2026
Merged

ci: include coverage from running build scripts#6007
davidhewitt merged 25 commits into
PyO3:mainfrom
davidhewitt:build-script-coverage

Conversation

@davidhewitt
Copy link
Copy Markdown
Member

This attempts to improve coverage measurement of pyo3-build-config by measuring the coverage of invocation of build.rs files.

I refactored a few common pieces about coverage measurement into helper actions so that I could re-use them from test-version-limits job.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 30, 2026

Merging this PR will not alter performance

✅ 125 untouched benchmarks


Comparing davidhewitt:build-script-coverage (1bb7984) with main (072d544)

Open in CodSpeed

@ngoldbaum
Copy link
Copy Markdown
Contributor

Thanks for working on this! I noticed this looking at our clverage output for my build configuration PR. Happy to help out if you want a hand or an eye for review.

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label May 11, 2026
@davidhewitt davidhewitt added the CI-no-fail-fast If one job fails, allow the rest to keep testing label May 11, 2026
@davidhewitt
Copy link
Copy Markdown
Member Author

This depends on taiki-e/cargo-llvm-cov#493 merging & releasing first.

@davidhewitt
Copy link
Copy Markdown
Member Author

Just needs https://github.com/taiki-e/install-action to have a new release to pick this up (currently 2.77.7).

@davidhewitt
Copy link
Copy Markdown
Member Author

Looks like this worked. Might be useful to merge before #5807

@davidhewitt davidhewitt marked this pull request as ready for review May 15, 2026 15:22
@davidhewitt davidhewitt requested a review from ngoldbaum May 15, 2026 15:23
Copy link
Copy Markdown
Contributor

@ngoldbaum ngoldbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a little AI-assisted code review and spotted a few issues. See below.

Overall looks good and I'm happy with this going in although I'm not sure about the manylinux question below.

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/actions/prepare-coverage/action.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
- os: "ubuntu-latest"
target: "x86_64-unknown-linux-gnu"
flags: "-i python3.13"
manylinux: auto
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to install the needed packages on the manylinux containers? Otherwise we lose that we're checking compatibility with the manylinux ABI.

davidhewitt and others added 5 commits May 16, 2026 14:36
Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
@davidhewitt
Copy link
Copy Markdown
Member Author

I think I've managed to revert the manylinux stuff by forwarding appropriate env vars & cargo-llvm-cov binary into the manylinux container, will send to merge.

@davidhewitt davidhewitt added this pull request to the merge queue May 16, 2026
Merged via the queue into PyO3:main with commit 6d0c1ee May 16, 2026
90 checks passed
@davidhewitt davidhewitt deleted the build-script-coverage branch May 16, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-build-full CI-no-fail-fast If one job fails, allow the rest to keep testing CI-skip-changelog Skip checking changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants