Replies: 3 comments 4 replies
-
Thanks for opening that can of worms, @liuliu 😆 We currently have a workaround for this in place for Linux (see "Images for Linux" in this blog post) but it's not automatic. For builds on Apple platforms this would be pretty much infeasible at the moment, because the runners are not running in throw-away virtual envs. I.e. if two builds were to be scheduled on the same runner installing incompatible or conflicting dependencies they would interfere. Leaving aside that they'd also leave their dependencies behind! I think the only way to tackle this would be to use a dedicated virtualised macOS runner for packages the require dependencies that we can reset. This would allow us to continue with the rest of the setup unchanged. It's doable but quite a bit of work. |
Beta Was this translation helpful? Give feedback.
-
As someone with a package that doesn't build if a library isn't installed, I'm interested in this being solved. I can provide the library as a binary & header, or an installer pkg, or even a homebrew formula, though not one in the homebrew-core tap. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the additional perspective @CamJN We are considering a change to our build system right now which may make this more feasible. I'm not at the stage where I can promise anything yet, and if/when we go ahead with it, we also will need time to get the new system stable before supporting custom environments like this, but we are doing active work in this area, and so all hope is not lost! |
Beta Was this translation helpful? Give feedback.
-
This can be controversial, because it just opens another can of worms. But anyway, would like to open for discussion and may be I can learn something new or help to contribute the CI pipeline update.
Some niche packages, for example, my own: https://github.com/liuliu/swift-mujoco/blob/main/Package.swift#L27 has systemLibrary dependency that can be satisfied through brew / apt installation. This helps people who use library on the same platform they compile to use new capabilities.
However, this does limit cross-compilation effectiveness. And because you can add any packages, this is getting dangerously close to letting SPI run as a CI tool, which I guess the maintainers don't want that to be.
Here is the middle-ground suggestion: because SwiftPM supports this in a very limited fashion anyway, it seems reasonable to simply install through
.systemLibrary
's instruction and let it go wherever it takes.apt
installation most of the time are very reasonable (all binary distributions, and the size is well controlled),brew
is a bit tricky as some times it may install from source (???, not exactly sure about this assertion). But seems we can time / size limit the pre-run step to make sure it is reasonable.Beta Was this translation helpful? Give feedback.
All reactions