Add a github action to check cross-compilation from Linux#38
Add a github action to check cross-compilation from Linux#38mitchmindtree wants to merge 1 commit intoRustAudio:masterfrom
Conversation
simlay
left a comment
There was a problem hiding this comment.
This is good aside from CI not passing.
| - name: Add apple target | ||
| run: rustup target add x86_64-apple-darwin | ||
| - name: Download SDK | ||
| run: curl -sL https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.13.sdk.tar.xz | tar -Jxf -; export COREAUDIO_SDK_PATH="$PWD/MacOSX10.13.sdk" |
There was a problem hiding this comment.
How do we feel about maxing this a jobs.<job_id>.strategy.matrix option and having a couple versions of the SDK being tested? One nice thing about linux -> macos cross compilation is that it's easy to get a bunch of SDKs and test against.
There was a problem hiding this comment.
Sounds good!
I guess one important thing to note is that if we want to make sure documentation builds successfully, we'll need to be able to recreate the same cross compilation approach (with same version targets etc) that docs.rs use, otherwise there's a chance the docs build will fail despite our CI passing. See rust-lang/docs.rs#853.
|
Hi folks, just thought I'd mention that I don't have plans to finish this off in the near future, but would be more happy for someone to take over / finish this small PR 👍 |
This is a port of the old travis-ci cross-compile check, which currently does not seem to be working.
Downloading the SDK works fine, but initially building produces a "missing libclang.so" error.
On NixOS I threw together a small nix shell to get fix the clang error by setting
LIBCLANG_PATHand automating the SDK install, however I ran into another error where bindgen seems unable to find the "AudioToolbox/AudioToolbox.h" for some reason. I don't have time to dive deeper into this atm, but thought I'd post my efforts so far in case someone finds them useful.Nix exprs
Here are my nix expressions in case anyone using nix happens to be digging into this. Using these are not necessary to solve the CI build issues though.
macosx-sdk.nix - Simple package that downloads and "installs" the SDK
coreaudio-dev.nix - Simple shell that includes macosx-sdk, libclang and sets the environment variables