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

Fix mac native build #107

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
path: ./rust-bindings/target/release/librust_bindings.so

build-native-macos:
runs-on: macos-12
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
Expand All @@ -41,13 +41,21 @@ jobs:
rustup default ${{ env.RUST_VERSION }}

- name: Build Rust Project
run: cargo build --manifest-path=./rust-bindings/Cargo.toml --release
run: |
# Build ARM64
rustup target add aarch64-apple-darwin
cargo build --release --manifest-path rust-bindings/Cargo.toml --target aarch64-apple-darwin
# Build x86_64
rustup target add x86_64-apple-darwin
cargo build --release --manifest-path rust-bindings/Cargo.toml --target x86_64-apple-darwin
# Produce universal library
lipo -create ./rust-bindings/target/aarch64-apple-darwin/release/librust_bindings.dylib ./rust-bindings/target/x86_64-apple-darwin/release/librust_bindings.dylib -output ./rust-bindings/target/librust_bindings.dylib

- name: Upload macos library
uses: actions/upload-artifact@master
with:
name: macos-library
path: ./rust-bindings/target/release/librust_bindings.dylib
path: ./rust-bindings/target/librust_bindings.dylib

build-native-windows:
runs-on: windows-latest
Expand Down