Dynamically generating GitHub Actions matrix to avoid timeouts when emulating architectures #1261
Replies: 2 comments 18 replies
-
🤯 I didn’t know you could do that… this would be a handy composite action! I’d like some way to do a little grouping too, I think (like by Python version), but not critical. This seems really potentially useful. I wonder if we can simplify this a bit in a generic way? Maybe a way to format print-build-identifiers? |
Beta Was this translation helpful? Give feedback.
-
By the way, if the only reason to do this is emulated timeouts, you could look into the various platforms that provide native runners (Azure maybe, Cirrus CI, Travis, maybe others). But I also like it due to faster builds, and you can still get timeouts due to combining manylinx + musllinux + pypy, etc. |
Beta Was this translation helpful? Give feedback.
-
Hello! I maintain some Python bindings for jq, and use cibuildwheel to build its binary wheels. When trying to make a release recently, I ran into trouble since building the aarch64 wheels took more than six hours due to the slowness of the emulation.
To get around this, it seemed like the best approach would be to have multiple GitHub Actions jobs running in parallel, rather than one for each architecture on each OS. However, I didn't want to hard-code Python versions and similar into the workflow: I want cibuildwheel to take care of things like that for me.
Fortunately, GitHub Actions supports dynamically generating matrices, so I wrote a script that integrates with cibuildwheel to get the list of builds, and it then generates a matrix with one job per wheel.
Is this something that anyone else has done? Are there better ways of doing the same thing? Is this something that others would find useful as an example or somesuch? Or is this just a terrible idea?
Beta Was this translation helpful? Give feedback.
All reactions