From 007acfcf5fa68f28b3de736d32ffede7aadf2426 Mon Sep 17 00:00:00 2001 From: Craig Drummond Date: Wed, 23 Feb 2022 17:45:16 +0000 Subject: [PATCH] Fat binary --- .github/workflows/macos.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d97f287..57dee4c 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -22,14 +22,28 @@ jobs: - name: Install deps run: | brew install ffmpeg@5 - brew link ffmpeg@5 + + - name: Install Rust support for ARM64 & prepare environment + run: | + rustup target add aarch64-apple-darwin - name: Build run: | mkdir releases cargo build --release strip target/release/bliss-analyser - cp target/release/bliss-analyser releases/bliss-analyser + cp target/release/bliss-analyser releases/bliss-analyser-x86_64 + cargo build --target=aarch64-apple-darwin --release + strip target/aarch64-apple-darwin/release/bliss-analyser + cp target/aarch64-apple-darwin/release/bliss-analyser releases/bliss-analyser-arm64 + ls -alR /usr/local/Cellar/ + + - name: Build fat binary + run: | + lipo -create \ + -arch x86_64 releases/bliss-analyser-x86_64 \ + -arch arm64 releases/bliss-analyser-arm64 \ + -output releases/bliss-analyser - name: Upload artifacts uses: actions/upload-artifact@v2