From 9b08b3915cfdb4ca3e2ead8be045d390ea7093aa Mon Sep 17 00:00:00 2001 From: Konrad Weiss Date: Tue, 9 Jun 2026 11:10:36 +0200 Subject: [PATCH 1/2] Building both targets on on one mac runner and removing one of the runners from the matrix build --- .github/workflows/build.yml | 7 ++----- rustast/build.sh | 19 ++++++------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db61b7a..921cc2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,11 +44,6 @@ jobs: runs-on: macos-latest ext: dylib - - arch: amd64 - os: macos - runs-on: macos-latest - ext: dylib - - arch: amd64 os: windows runs-on: windows-latest @@ -68,6 +63,8 @@ jobs: - name: Setup Rust if: matrix.project.name == 'rust' uses: dtolnay/rust-toolchain@stable + with: + target: x86_64-apple-darwin,aarch64-apple-darwin - name: Build shell: bash diff --git a/rustast/build.sh b/rustast/build.sh index f8bf394..1ef72f9 100755 --- a/rustast/build.sh +++ b/rustast/build.sh @@ -6,19 +6,12 @@ ARCH=$(uname -m) echo "Building on $OS for $ARCH" -if [ "$OS" = "darwin" ]; then - if [ "$ARCH" = "arm64" ]; then - cargo build --release - cp target/release/librustast.dylib ./librustast-arm64.dylib - - elif [ "$ARCH" = "x86_64" ]; then - cargo build --release - cp target/release/librustast.dylib ./librustast-amd64.dylib - - else - echo "Unsupported macOS architecture: $ARCH" - exit 1 - fi +if [ "$OS" = "darwin" ]; then + cargo build --release --target aarch64-apple-darwin + cargo build --release --target x86_64-apple-darwin + + cp target/aarch64-apple-darwin/release/librustast.dylib ./librustast-arm64.dylib + cp target/x86_64-apple-darwin/release/librustast.dylib ./librustast-amd64.dylib elif [ "$OS" = "linux" ]; then if [ "$ARCH" = "aarch64" ]; then From 05fbbdb8d3f7b2f9da3f98d504e3c25f2660e4c6 Mon Sep 17 00:00:00 2001 From: Konrad Weiss Date: Tue, 9 Jun 2026 11:49:31 +0200 Subject: [PATCH 2/2] Reestablish runner --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 921cc2c..e2772ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,6 +44,11 @@ jobs: runs-on: macos-latest ext: dylib + - arch: amd64 + os: macos + runs-on: macos-latest + ext: dylib + - arch: amd64 os: windows runs-on: windows-latest