Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macOS M1 binary to release CI #200

Closed
simlay opened this issue Nov 17, 2023 · 2 comments · Fixed by #209
Closed

Add macOS M1 binary to release CI #200

simlay opened this issue Nov 17, 2023 · 2 comments · Fixed by #209

Comments

@simlay
Copy link
Contributor

simlay commented Nov 17, 2023

Was using cargo-binstall on CI with an M1 runner and it failed because the released CLI is built for intel macs. I'm not sure how binstall does it but they have a universal binary.

It'd be nice if aarch64-apple-darwin was there as well.

I might get around to doing this myself.

@briansmith
Copy link

I'm not sure how binstall does it but they have a universal binary.

cargo build --release --target=aarch64-apple-darwin && cargo build --release --target=x86_64-apple-darwin, then use lipo to merge them together into the universal binary. See their PR: cargo-bins/cargo-binstall#551, which makes it look straightforward.

From the users' point of view, a universal binary would be preferrable to separate ARM and x86-64 binaries, since it would allow users to avoid some conditional logic in their build scripts / CI configuration.

@briansmith
Copy link

briansmith commented Feb 20, 2024

My experience in GitHub Actions is that the prebuilt cargo-dignhy binary version 0.6.2 (presumably x86_64-only) works fine for macos-12 (x86_64) runners, and it runs on macos-14 (arm64) runners. However, it fails with error thread 'main' panicked at 'Failed to get the exit status line from lldb: "(lldb) command source -s 0.

So basically, the prebuilt release cannot be used from a macos-14 runner in GitHub Actions. To work around this, I used cargo install --version 0.6.2; the cargo installed version worked fine. See rust-random/getrandom#398.

``` Run cargo dinghy -p auto-ios-aarch64-sim -d 9F4E44B4-1F31-4AD1-ADFC-F6F9E196B07D test Targeting platform auto-ios-aarch64-sim and device 9F4E44B4-1F31-4AD1-ADFC-F6F9E196B07D Compiling libc v0.2.153 Compiling cfg-if v1.0.0 Compiling getrandom v0.2.[12](https://github.com/rust-random/getrandom/actions/runs/7979193242/job/21786032976#step:7:13) (/Users/runner/work/getrandom/getrandom) Finished test [unoptimized + debuginfo] target(s) in 19.47s Running unittests src/lib.rs (target/aarch64-apple-ios-sim/debug/deps/getrandom-98dae7d7b808a7aa) Installing getrandom-98dae7d7b808a7aa to 9F4E44B4-1F31-4AD1-ADFC-F6F9E196B07D Running getrandom-98dae7d7b808a7aa on 9F4E44B4-1F31-4AD1-ADFC-F6F9E196B07D

thread 'main' panicked at 'Failed to get the exit status line from lldb: "(lldb) command source -s 0 '/var/folders/1k/qq3pcbf12vb6vyblh81736p40000gn/T/mobiledevice-rs-lldb.3TdjnShyoMZI/lldb-script'\nExecuting commands in '/var/folders/1k/qq3pcbf12vb6vyblh81736p40000gn/T/mobiledevice-rs-lldb.3TdjnShyoMZI/lldb-script'.\n(lldb) attach 9993\n"', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/dinghy-lib-0.6.2/src/ios/device.rs:461:9
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

</details>

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

Successfully merging a pull request may close this issue.

2 participants