Browse Source

ci: use Apple Silicon machines when useful (#550)

* ci: add Apple Silicon build

* ci: let the CI build Apple Silicon binaries
Kévin Dunglas 1 year ago
parent
commit
5da805d9ee
2 changed files with 8 additions and 9 deletions
  1. 8 4
      .github/workflows/static.yaml
  2. 0 5
      release.sh

+ 8 - 4
.github/workflows/static.yaml

@@ -214,8 +214,12 @@ jobs:
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
   build-mac:
-    name: Build macOS x86_64 binaries
-    runs-on: macos-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        platform: ['arm64', 'x86_64']
+    name: Build macOS ${{ matrix.platform }} binaries
+    runs-on: ${{ matrix.platform == 'arm64' && 'macos-14' || 'macos-13' }}
     needs: [ prepare ]
     env:
       HOMEBREW_NO_AUTO_UPDATE: 1
@@ -254,5 +258,5 @@ jobs:
         if: github.ref_type == 'branch'
         uses: actions/upload-artifact@v3
         with:
-          name: frankenphp-mac-x86_64
-          path: dist/frankenphp-mac-x86_64
+          name: frankenphp-mac-${{ matrix.platform }}
+          path: dist/frankenphp-mac-${{ matrix.platform }}

+ 0 - 5
release.sh

@@ -47,8 +47,3 @@ tags=$(git tag --list --sort=-version:refname 'v*')
 previous_tag=$(awk 'NR==2 {print;exit}' <<< "${tags}")
 
 gh release create --draft --generate-notes --latest --notes-start-tag "${previous_tag}" --verify-tag "v$1"
-
-if [[ "$(uname -s)" = "Darwin" ]]; then
-    rm -Rf dist/*
-    FRANKENPHP_VERSION=$1 RELEASE=1 ./build-static.sh
-fi