Producing Mercurial wheels from Github Actions + modernize build process

PIERRE AUGIER pierre.augier at univ-grenoble-alpes.fr
Sun Oct 6 21:46:20 UTC 2024


----- Mail original -----
> De: "PIERRE AUGIER" <pierre.augier at univ-grenoble-alpes.fr>
> À: "mercurial" <mercurial at lists.mercurial-scm.org>
> Envoyé: Vendredi 4 Octobre 2024 22:25:05
> Objet: Re: Producing Mercurial wheels from Github Actions + modernize build process

> Hi George,
> 
> I agree that for a big repo like mercurial-devel, it makes sense to avoid the
> full conversion. However, for small repo, the Git mirroring is still useful, in
> particular for visibility.
> 
> For Mercurial, we "just" need:
> 
> - to have a job a Heptapod CI job that produces the sdist and pushes it
> somewhere where it can be downloaded. It is better because the sdist is
> produced from the hg repo.
> - a tiny repo on Githut (basically only a README, license and workflow files)
> with a workflow triggered by foss.heptapod.net which downloads the sdist,
> builds the wheels and tests them.
> 
> We need to figure out how cibuildwheel can build wheels from a sdist and not
> from a repo but that should be quite easy. I can check that with a sdist from
> PyPI.

I tried in https://github.com/paugier/mercurial-ga-ci

It works well with the archive https://foss.heptapod.net/mercurial/mercurial-devel/-/archive/branch/default/mercurial-devel-branch-default.tar.gz

For those interested, you can have a look at:

- https://github.com/paugier/mercurial-ga-ci/blob/main/.github/workflows/wheels.yml
- https://github.com/paugier/mercurial-ga-ci/actions/runs/11205302970

One can even try the wheels produced by the CI.

There is a small issue with https://pypi.io/packages/source/m/mercurial/mercurial-6.8.1.tar.gz on Windows, but it's a detail.

> We need to figure out how a job on foss.heptapod.net can trigger a job on
> Github, and if it is possible to send a bit of data (where the sdist has to be
> downloaded and if it is a simple commit or a release).

> For the release we can even download the sdist from PyPI. And we will even be
> able to use this workflow on a Mercurial version already released, to upload
> wheels for 6.8.1.

Unfortunately, there is an issue on Windows for this version, so I don't think it's going to be possible.

Anyway, this would be much better if all the uploads on PyPI are done from the same CI. Otherwise, there will be a amount of time during which for a particular version only the sdist would be available on PyPI, which is not a good practice for packages uploading wheels.



More information about the Mercurial mailing list