PySCIPOpt icon indicating copy to clipboard operation
PySCIPOpt copied to clipboard

Add GH Actions workflow to build sdists and wheels, deploy to PyPI

Open mkoeppe opened this issue 2 years ago • 11 comments

wheel building via cibuildwheel, using Sage for installing SCIP from source.

Preview: https://github.com/mkoeppe/PySCIPOpt/actions/runs/4220475298

To deploy to PyPI, it will need an Actions secret PYPI_API_TOKEN

mkoeppe avatar Feb 20 '23 06:02 mkoeppe

@CGraczyk, could you please check how we can integrate this with the existing release workflow?

mattmilten avatar Feb 20 '23 17:02 mattmilten

@mattmilten more infrastructure

mkoeppe avatar Feb 20 '23 17:02 mkoeppe

ping @CGraczyk

matbesancon avatar May 19 '23 15:05 matbesancon

thanks a lot for the PR! This should really be added

matbesancon avatar May 19 '23 15:05 matbesancon

So i am not sure i understand what this actually adds to the pipeline. we already have the test and release package to pypi action - what does this actually provide?

CGraczyk avatar May 26 '23 14:05 CGraczyk

Wheels.

mkoeppe avatar May 26 '23 14:05 mkoeppe

Okay, so we would replace the old release action with this (this shouldnt influence users right?) - since the PYPI secret is already setup, this should be easy to do.

It would be best to test this workflow from a branch first - this should be possible if i remember correctly from back when we first setup the github actions @fschloesser ?

CGraczyk avatar May 30 '23 09:05 CGraczyk

Hi folks! I'm actually looking for information about macos-ARM/Apple Silicon builds — are there fundamental reasons why those don't exist (I notice this PR specifies x86 for the macos build)? Or it just hasn't been tried yet? 😬

re

To deploy to PyPI, it will need an Actions secret PYPI_API_TOKEN

I just wanted to point out the trusted-publishers mechanism on PyPI, which is super super nice and avoids the use of the API token. It just needs someone with maintainer access to the PyPI package to specify the build script here.

Thanks! 🙏

jni avatar Feb 19 '24 04:02 jni

Until recently, nobody had macOS arm64 runners, so any builds for that platform would have to be cross. Since early this year, GH Actions provides such runners though, so it has become easier

mkoeppe avatar Feb 19 '24 04:02 mkoeppe

any builds for that platform would have to be cross.

Sure, but cibuildwheel got those working which has been very valuable for many projects for some time now. At any rate, as you point out, now is a good time to add them, but I guess first getting this PR merged and then adding ARM wheels would be a good plan of attack. Hopefully this can get merged soon. 🙏 Thanks!

jni avatar Feb 19 '24 23:02 jni

cibuildwheel got those working which has been very valuable for many projects for some time now

Of course, but the CIBW_BEFORE_ALL script (where you build any library deps) needs to support cross compilation in that case.

mkoeppe avatar Feb 20 '24 00:02 mkoeppe

No longer needed.

mkoeppe avatar Mar 24 '24 20:03 mkoeppe