Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Wheels for other OSs #147

Open
clbarnes opened this issue Jun 1, 2020 · 6 comments
Open

Wheels for other OSs #147

clbarnes opened this issue Jun 1, 2020 · 6 comments

Comments

@clbarnes
Copy link
Collaborator

clbarnes commented Jun 1, 2020

I was experimenting with github actions today for another maturin-based library and it's not too bad to get wheels for everything built together:

https://github.com/clbarnes/ncollpyde/blob/master/.github/workflows/ci.yml

@pattonw
Copy link
Owner

pattonw commented Jun 2, 2020

Nice, that looks pretty clean and easy to use. If you deploy on windows/mac, should you run the tests on them too or is it fairly safe to assume that rust/python wheels will behave the same?
It looks pretty similar to Travis except the macOS/Windows part. Are there any other differences that make github actions better or worse?

@clbarnes
Copy link
Collaborator Author

clbarnes commented Jun 2, 2020

One probably should run the tests on the whole matrix, although I haven't yet for ncollpyde (debugging CI workflows is a pain so I was trying to keep the build time down).

Positives

I've found github CI to be a little faster (travis' 4-job restriction feels pretty tight when you've got more than one project on the go). Being able to delegate e.g. rust setup to an external Action saves us some maintenance, and that ecosystem will only get stronger. It's nice to define your own sections too, rather than the prescribed before_install, install, script etc. that travis has.

Negatives

I'm not sure the matrix builds are fully isolated from each other - they seem to clash/ leave artifacts around, which is why I had to put the wheels in different directories https://github.com/clbarnes/ncollpyde/blob/master/.github/workflows/ci.yml#L60

The logging is... different. Maybe I'm just used to travis.

@pattonw
Copy link
Owner

pattonw commented Jun 3, 2020

"Being able to delegate e.g. rust setup to an external Action" Oh this is cool. I couldn't find the actions-rs/toolchain on the github actions marketplace, looks like its just a regular git repository. It doesn't look particularly trivial to create a new action for others to use, but definitely much better than having to write each travis.yaml mostly from scratch.

The isolation issue will be annoying though

@clbarnes
Copy link
Collaborator Author

clbarnes commented Jun 3, 2020

Yes, creating a new action is either writing a whole docker container or writing a system tool in node with some extra metadata. It doesn't look like actions can depend on others (e.g. it would be nice to write a maturin action which is a thin wrapper over actions-rs/toolchain and actions/setup-python).

One probably should run the tests on the whole matrix,

Unsurprisingly trying to get all of the dependencies built and accessible on all 3 systems is a pain...

@pattonw
Copy link
Owner

pattonw commented Jun 3, 2020

Yeah I looked through the logs to see what you meant by them being different. Looks like windows is being annoying

@clbarnes
Copy link
Collaborator Author

clbarnes commented Jun 3, 2020

Yeah. Some of it is issues with the packages themselves - if those packages were PEP517 compliant (i.e. they specified their own build dependencies in a pyproject.toml) then they wouldn't be so dependent on wheels (which exist for some OSs and not others). On the plus side, supporting other OSs if you're using travis means writing a whole separate config file and sending it to a different CI host - with github workflows any single step can be conditional on OS name so you only have to split out the bare minimum. In the case of ncollpyde, the tricky dependencies are optional ones, but choosing to just not install the optional dependencies at all means the tests don't cover everything.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants