Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run coverage for the free-threaded build #4638

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

davidhewitt
Copy link
Member

@davidhewitt davidhewitt commented Oct 21, 2024

This is loosely related to #4635.

From what I've worked out experimenting with those PRs, I realise that we can run coverage on the merge commit in CI. The nice thing about this is that we can add all jobs (not just build) to coverage.

Most importantly for current work, this enables code coverage for the freethreaded job. cc @ngoldbaum

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Oct 21, 2024
Copy link

codspeed-hq bot commented Oct 21, 2024

CodSpeed Performance Report

Merging #4638 will degrade performances by 12.48%

Comparing davidhewitt:free-threaded-coverage (24ef718) with main (4bb4058)

Summary

❌ 1 regressions
✅ 82 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main davidhewitt:free-threaded-coverage Change
extract_hashbrown_map 18 ms 20.5 ms -12.48%

Copy link
Member Author

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

This looks like it's worked; I'm going to merge it so that it's available for the other in-flight freethreaded PRs. Will revert / amend if there are concerns.

Comment on lines +1 to +9
# This runs as a separate job because it needs to run on the `pull_request_target` event
# in order to access the CODECOV_TOKEN secret.
#
# This is safe because this doesn't run arbitrary code from PRs.

name: Set Codecov PR base
on:
# See safety note / doc at the top of this file.
pull_request_target:
Copy link
Member Author

Choose a reason for hiding this comment

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

cc @alex, I believe this use of pull_request_target to be safe (unlike my last time 🙈), but if you disagree, please ping and I'll revert!

Copy link
Contributor

Choose a reason for hiding this comment

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

As long as this doesn't run code from the PR, and only runs code from main/this .yml, it's fine. That looks true here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep that was my understanding too 👍

@davidhewitt davidhewitt added this pull request to the merge queue Oct 21, 2024
@ngoldbaum
Copy link
Contributor

Thanks David! It'll be nice to have coverage reports on PRs for Py_GIL_DISABLED blocks.

Merged via the queue into PyO3:main with commit 133eac8 Oct 21, 2024
43 of 44 checks passed
@davidhewitt davidhewitt deleted the free-threaded-coverage branch October 21, 2024 20:15
@ngoldbaum
Copy link
Contributor

Over on #4588 I'm seeing the coverage tests failing with a git error: fatal: refusing to fetch into branch 'refs/heads/main' checked out at '/home/runner/work/pyo3/pyo3'. I don't immediately see what's wrong...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-skip-changelog Skip checking changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants