Closed kokroo closed 5 months ago
@lpsinger I would love to know your thoughts about this. If you agree with it, I will open a PR for this change first, so that macOS, Windows, and musllinux wheels can be merged easily later.
Yes, that's what I asked for here: https://github.com/nasa/radbelt/pull/58#issuecomment-1695456255
@lpsinger Can I open this as a separate PR?
Whatever you like. I think it would be simpler to do that in #58, since this is what I asked for in review of #58.
Fixed by #69.
While working on Apple Silicon (https://github.com/nasa/radbelt/pull/58) and Windows builds for radbelt, it was discovered that some extra steps are needed in both cases.
For Apple Silicon, we need to set up a forked compiler while for Windows, some DLL files need to be linked. While building musllinux wheels, some dependencies are compiled from the source, which can be overcome by linking their pre-compiled versions.
To accommodate all of these steps, we can encapsulate them into reusable GitHub actions as proposed by @lpsinger
The current GitHub workflow file uses cibuildwheel without explicitly specifying combinations of operating systems and architectures. Since cibuildwheel does not expose any way to detect the current target architecture being built, there is no way to utilize custom steps for macOS, Windows, and musllinux as proposed above.
To overcome this limitation, the following can be done:
This kind of workflow will allow us to detect the OS and arch, while allowing for custom build steps in a clean fashion.
As seen here (https://pypistats.org/packages/astropy), astropy is downloaded between 15000 and 30000 times daily, with Windows and macOS users accounting for around 5% each daily, which is significant. Making radbelt available on all these platforms will benefit all these potential users.