fix(ci): macOS build aarch64-only, drop x86_64 cross-compile

Cross-compiling x86_64 from aarch64 fails on openssl-sys (no
cross pkg-config). Apple Silicon only — Intel Macs use Rosetta 2.

cc
This commit is contained in:
victorrhgap committed 2026-03-24 20:14:47 -06:00
1 parent a347b39e07
commit a25bcb0e76
1 file changed
+6 -25
+6 -25
View File
@@ -13,16 +13,8 @@ on:
jobs:
build-macos:
strategy:
matrix:
include:
- runner: macos-latest
target: aarch64-apple-darwin
arch: aarch64
- runner: macos-latest
target: x86_64-apple-darwin
arch: x86_64
runs-on: ${{ matrix.runner }}
# Apple Silicon only — Intel Macs run via Rosetta 2
runs-on: macos-latest
permissions:
contents: write
steps:
@@ -86,7 +78,7 @@ jobs:
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
targets: aarch64-apple-darwin
- name: Rust cache
uses: Swatinem/rust-cache@v2
@@ -97,29 +89,18 @@ jobs:
run: npm ci
- name: Build DMG
run: npm run tauri build -- --target ${{ matrix.target }} --bundles dmg
run: npm run tauri build -- --target aarch64-apple-darwin --bundles dmg
- name: Collect artifacts
id: artifacts
env:
VERSION: ${{ steps.release.outputs.version }}
ARCH: ${{ matrix.arch }}
run: |
mkdir -p dist
cp -v src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg dist/ || true
# Rename with arch for clarity
for f in dist/*.dmg; do
if [[ -f "$f" && ! "$f" =~ "_${ARCH}" ]]; then
base=$(basename "$f" .dmg)
mv "$f" "dist/${base}_${ARCH}.dmg"
fi
done
cp -v src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg dist/ || true
ls -la dist
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: qbz-macos-${{ matrix.arch }}
name: qbz-macos-aarch64
path: dist/*
- name: Publish GitHub Release Assets