Skip to content

Conversation

@mhucka
Copy link
Contributor

@mhucka mhucka commented Nov 2, 2025

Changes:

  • Move more cibuildwheel settings into the pyproject.toml file, which both aligns with recommended practices and allows simplifications to ci.yml.

  • Get rid of preflight_check_dists job in ci.yml and make the twine check step be part of the upload_to_testpypi job. This simplifies and streamlines the workflow.

  • Get rid of references to vars.ACT in ci.yml, which turn out to be unnecessary.

  • Enhance local testability by adding support for using a local pypi server for testing in the upload_to_testpypi job.

  • Add an input variable upload_to_pypi to workflow_dispatch invocations to allow control over whether the upload to pypi.org is done during manual invocations.

  • Set skip-existing to true when using actions/gh-action-pypi-publish so that partial reruns of the workflow are possible.

  • Use explicit versions of runners instead of -latest.

  • Make miscellaneous small tweaks to ci.yml.

  • Add a README file to .github/workflows/ detailing how to do local testing of ci.yml, to document the process.

mhucka added 14 commits November 2, 2025 04:50
Changes:

- Remove the needless `preflight_check_dists` job
- Merge the wheel testing step into upload_to_testpypi
- Add the use of `check-wheel-contents` to the tests
- Make various changes to better support local testing
- Simplify some of the workflow syntax used
Update and add more details about the testing process.
If an error is reported, it's easier if it's obvious which of the two
programs produced it.
This will make the command show up in the run log as its own entry,
making it easier to locate in the output.
Some of the settings for building wheels can be put into
`pyproject.toml`. This fits with current best practices and lets us
further simplify `ci.yml`.
Turns out `vars.local_testing` is never needed.
`check-wheel-contents` complains about the wheel only on Windows and not
other architectures. I suspect there is a bug in `check-wheel-contents`.
Better to skip it for now.
@mhucka mhucka changed the title Improve ci.yml and enhance testability Improve ci.yml, enhance testability, and document the testing process Nov 2, 2025
@mhucka mhucka marked this pull request as ready for review November 2, 2025 20:20
@mhucka mhucka added the devops Involves build systems, CMake files, Make files, Bazel files, continuous integration, and/or related label Nov 2, 2025
I can't think of a good reason to cause the job to fail if an existing
file from the same release is already on pypi. This might happen if you
try to rerun the workflow because of a failure during one of the files.
Let's just let it give a warning and move on.
I realized that the values should be left unset in the default case.
In principle, that variable shouldn't need to be set. Let's try removing it.
Few people will want or need to test the test.pypi upload parts, yet it
complicated the instructions considerably. Let's skip that and focus on
the basics of running the other workflow jobs locally for testing.
Pin the version of the act runner Docker image in the instructions to a
specific hash.
We don't need to tell people to create `/tmp/act-artifacts`.
Go back to using the ubuntu-24.04 image rather than try to make do with
a smaller one. Also, add a couple more missing items to the Dockerfile
for building a customized local image.

Also, provide the `--no-recurse` flag to the invocation of `act`. That
flag shouldn't be necessary when using `-W`, but if the user starts
experimenting with changing the arguments, showing `--no-recurse` in the
example may help steer them in a direction that leads to fewer
mysterious problems.
What I wrote is misleading; Docker will use all CPU cores by default if
the application is such that it can use parallism, and the purpose of
`--cpus` is actually to limit the number of cores it uses. Let's just
let it uses its defaults.
@mhucka mhucka requested a review from Strilanc November 7, 2025 06:35
@mhucka mhucka enabled auto-merge November 7, 2025 07:13
@mhucka mhucka added this pull request to the merge queue Nov 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 7, 2025
@mhucka mhucka added this pull request to the merge queue Nov 7, 2025
Merged via the queue into quantumlib:main with commit d699423 Nov 7, 2025
48 checks passed
@mhucka mhucka deleted the mh-more-ci-work branch November 7, 2025 21:45
mhucka added a commit that referenced this pull request Dec 1, 2025
…ss (#41)

Changes:

* Move more `cibuildwheel` settings into the `pyproject.toml` file,
which both aligns with recommended practices and allows simplifications
to `ci.yml`.

* Get rid of `preflight_check_dists` job in `ci.yml` and make the `twine
check` step be part of the `upload_to_testpypi` job. This simplifies and
streamlines the workflow.

* Get rid of references to `vars.ACT` in `ci.yml`, which turn out to be
unnecessary.

* Enhance local testability by adding support for using a local pypi
server for testing in the `upload_to_testpypi` job.

* Add an input variable `upload_to_pypi` to `workflow_dispatch`
invocations to allow control over whether the upload to `pypi.org` is
done during manual invocations.

* Set `skip-existing` to `true` when using
`actions/gh-action-pypi-publish` so that partial reruns of the workflow
are possible.

* Use explicit versions of runners instead of `-latest`.

* Make miscellaneous small tweaks to `ci.yml`.

* Add a README file to `.github/workflows/` detailing how to do local
testing of `ci.yml`, to document the process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops Involves build systems, CMake files, Make files, Bazel files, continuous integration, and/or related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants