Skip to content

Conversation

2bndy5
Copy link
Contributor

@2bndy5 2bndy5 commented Oct 13, 2025

Uses cibuildwheel to run unit tests on each binary wheel built (natively, without qemu).

This could replace the current tests.yml workflow as it more accurately represents user experience during tests.

If removing test.yml in favor of this patch, then I would also adjust the CI triggers for wheels.yml (to run in PR sync events). See also #1366 for additional proposal.

@2bndy5 2bndy5 marked this pull request as draft October 13, 2025 09:53
@2bndy5

This comment was marked as resolved.

@2bndy5 2bndy5 marked this pull request as ready for review October 13, 2025 11:29
@2bndy5
Copy link
Contributor Author

2bndy5 commented Oct 13, 2025

I had to fix an assertion that was too broad for the test requirements. I also have to skip testing wheels built when qemu is involved (ppc64le).

Otherwise, the tests are running fine on native built wheels (x86, x64, arm). 🎉

@jdavid jdavid merged commit d16e2f3 into libgit2:master Oct 13, 2025
8 checks passed
@2bndy5 2bndy5 deleted the wheels-test-with-cibuildwheel branch October 13, 2025 18:35
@jdavid
Copy link
Member

jdavid commented Oct 14, 2025

This is cool. Now as you said we could replace the tests workflow, and run this instead.
To do this I think we need two changes:

  • Most of the time is spent in the ppc build, this should only run in the master branch.
  • The tests workflow runs for the s390x platform too, but they fail. I think we should keep the tests workflow but run it only in the s390x platform, and only in master. If in the future the tests are fixed for this platform, then move it to the wheels. I would keep the workflow tests.yml so it does not add a new entry, and just change the name to "Tests (s390x)".

What do you think? Will you make a new PR?

@2bndy5
Copy link
Contributor Author

2bndy5 commented Oct 14, 2025

What do you think? Will you make a new PR?

Sure. That sounds rather easy enough.


BTW, What's the procedure for updating the CHANGELOG? Is that dependent on maintainers? Is there interest in auto-creating a GitHub release (when a tag is pushed) with auto-generated notes?

@jdavid
Copy link
Member

jdavid commented Oct 14, 2025

I maintain the changelog, so far it's not much of a burden, so I didn't bother with automating it.

@2bndy5
Copy link
Contributor Author

2bndy5 commented Oct 14, 2025

Yeah, automating the changelog is best done with conventional-commit messages (the format I've been using for all my PR titles).

It would be easy to add a step to wheels.yml pypi job:

    - name: Create GitHub Release
      env:
        GITHUB_TOKEN: ${{ github.token }}
        TAG: ${{ github.ref_name }}
        REPO: ${{ github.repository }}
      # https://cli.github.com/manual/gh_release_create
      run: >-
        gh release create ${TAG} 
        --verify-tag
        --repo ${REPO}
        --title ${TAG}
        --generate-notes

That way, people watching this repo will be notified when you push a new tag.

2bndy5 added a commit to 2bndy5/pygit2 that referenced this pull request Oct 14, 2025
per request from libgit2#1432 (comment)

### Changes

- remove all test jobs from test.yml workflow except the one that runs on s390x platform.
- rename the test.yml Display name accordingly: "Tests (s390x)"
- skip building ppc64le wheels when not triggered on master branch.
- reconfigure wheels.yml workflow triggers.
   The wheels.yml CI now runs for

   1. any push to master branch
   2. any change in a PR that targets master branch (excluding when PR changes only affect docs/ path)
   3. any tag (starting with "v") is pushed
- added step to job that deploys wheels to PyPI. This new step creates a GitHub Release for the tag that was pushed.
- added `skip-existing` param in case deployment to PyPI suffers a network error and the CI just needs to be re-run.
@2bndy5 2bndy5 mentioned this pull request Oct 14, 2025
2bndy5 added a commit to 2bndy5/pygit2 that referenced this pull request Oct 14, 2025
per request from libgit2#1432 (comment)

closes libgit2#1366

### Changes

- remove all test jobs from test.yml workflow except the one that runs on s390x platform.
- rename the test.yml Display name accordingly: "Tests (s390x)"
- skip building ppc64le wheels when not triggered on master branch.
- reconfigure wheels.yml workflow triggers.
   The wheels.yml CI now runs for

   1. any push to master branch
   2. any change in a PR that targets master branch (excluding when PR changes only affect docs/ path)
   3. any tag (starting with "v") is pushed
- added `skip-existing` param in case deployment to PyPI suffers a network error and the CI just needs to be re-run.
- cherry pick changes from PR libgit2#1366 (about CI triggers for lint and spell-check CI workflows)
- auto-cancel wheels CI if new run triggered on non-default branch
- added step to job that deploys wheels to PyPI. This new step creates a GitHub Release for the tag that was pushed.
2bndy5 added a commit to 2bndy5/pygit2 that referenced this pull request Oct 15, 2025
per request from libgit2#1432 (comment)

closes libgit2#1366

### Changes

- remove all test jobs from test.yml workflow except the one that runs on s390x platform.
- rename the test.yml Display name accordingly: "Tests (s390x)"
- skip building ppc64le wheels when not triggered on master branch.
- reconfigure wheels.yml workflow triggers.
   The wheels.yml CI now runs for

   1. any push to master branch
   2. any change in a PR that targets master branch (excluding when PR changes only affect docs/ path)
   3. any tag (starting with "v") is pushed
- added `skip-existing` param in case deployment to PyPI suffers a network error and the CI just needs to be re-run.
- cherry pick changes from PR libgit2#1366 (about CI triggers for lint and spell-check CI workflows)
- auto-cancel wheels CI if new run triggered on non-default branch
- added step to job that deploys wheels to PyPI. This new step creates a GitHub Release for the tag that was pushed.
2bndy5 added a commit to 2bndy5/pygit2 that referenced this pull request Oct 15, 2025
per request from libgit2#1432 (comment)

closes libgit2#1366

### Changes

- remove all test jobs from test.yml workflow except the one that runs on s390x platform.
- rename the test.yml Display name accordingly: "Tests (s390x)"
- skip building ppc64le wheels when not triggered on master branch.
- reconfigure wheels.yml workflow triggers.
   The wheels.yml CI now runs for

   1. any push to master branch
   2. any change in a PR that targets master branch (excluding when PR changes only affect docs/ path)
   3. any tag (starting with "v") is pushed
- added `skip-existing` param in case deployment to PyPI suffers a network error and the CI just needs to be re-run.
- cherry pick changes from PR libgit2#1366 (about CI triggers for lint and spell-check CI workflows)
- auto-cancel wheels CI if new run triggered on non-default branch
- use pytest.ini in cibuildwheel isolated env
- added step to job that deploys wheels to PyPI. This new step creates a GitHub Release for the tag that was pushed.
2bndy5 added a commit to 2bndy5/pygit2 that referenced this pull request Oct 19, 2025
per request from libgit2#1432 (comment)

closes libgit2#1366

### Changes

- remove all test jobs from test.yml workflow except the one that runs on s390x platform.
- rename the test.yml Display name accordingly: "Tests (s390x)"
- skip building ppc64le wheels when not triggered on master branch.
- reconfigure wheels.yml workflow triggers.
   The wheels.yml CI now runs for

   1. any push to master branch
   2. any change in a PR that targets master branch (excluding when PR changes only affect docs/ path)
   3. any tag (starting with "v") is pushed
- added `skip-existing` param in case deployment to PyPI suffers a network error and the CI just needs to be re-run.
- cherry pick changes from PR libgit2#1366 (about CI triggers for lint and spell-check CI workflows)
- auto-cancel wheels CI if new run triggered on non-default branch
- use pytest.ini in cibuildwheel isolated env
- added step to job that deploys wheels to PyPI. This new step creates a GitHub Release for the tag that was pushed. Uses release notes extracted from CHANGELOG.md (during sdist job)
2bndy5 added a commit to 2bndy5/pygit2 that referenced this pull request Oct 19, 2025
per request from libgit2#1432 (comment)

closes libgit2#1366

### Changes

- remove all test jobs from test.yml workflow except the one that runs on s390x platform.
- rename the test.yml Display name accordingly: "Tests (s390x)"
- skip building ppc64le wheels when not triggered on master branch.
- reconfigure wheels.yml workflow triggers.
   The wheels.yml CI now runs for

   1. any push to master branch
   2. any change in a PR that targets master branch (excluding when PR changes only affect docs/ path)
   3. any tag (starting with "v") is pushed
- added `skip-existing` param in case deployment to PyPI suffers a network error and the CI just needs to be re-run.
- cherry pick changes from PR libgit2#1366 (about CI triggers for lint and spell-check CI workflows)
- auto-cancel wheels CI if new run triggered on non-default branch
- use pytest.ini in cibuildwheel isolated env
- added step to job that deploys wheels to PyPI. This new step creates a GitHub Release for the tag that was pushed. Uses release notes extracted from CHANGELOG.md (during sdist job).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants