From a502761fe0f88650076252d4796510d6501439ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jank=C5=AF?= Date: Tue, 19 Mar 2024 22:16:16 +0100 Subject: [PATCH] ci: build fat meesign_crypto library for macos --- .github/workflows/flutter-ci.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flutter-ci.yml b/.github/workflows/flutter-ci.yml index 3bc2646..059e5b0 100644 --- a/.github/workflows/flutter-ci.yml +++ b/.github/workflows/flutter-ci.yml @@ -142,6 +142,12 @@ jobs: bash ./tool/cargo-config-gen-android.sh >> ~/.cargo/config.toml cat ~/.cargo/config.toml + - name: Set up Rust for macOS + if: matrix.target == 'macOS' + run: rustup target add \ + x86_64-apple-darwin \ + aarch64-apple-darwin + - name: Install Linux dependencies if: matrix.target == 'Linux' run: | @@ -193,9 +199,12 @@ jobs: OPENSSL_STATIC: 1 run: | cd meesign_native/native/meesign-crypto/ - cargo build --release - cp target/release/libmeesign_crypto.dylib ../../../build/macos/Build/Products/Release/meesign_client.app/Contents/Frameworks/ - + cargo build --release --target x86_64-apple-darwin + cargo build --release --target aarch64-apple-darwin + lipo -create -output libmeesign_crypto.dylib \ + target/x86_64-apple-darwin/release/libmeesign_crypto.dylib \ + target/aarch64-apple-darwin/release/libmeesign_crypto.dylib + cp libmeesign_crypto.dylib ../../../build/macos/Build/Products/Release/meesign_client.app/Contents/Frameworks/ # Package the build. - name: Copy VC redistributables to release directory for Windows