Skip to content

Commit

Permalink
First shot at building arm64 binaries on github's new M1 runners
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps authored Jan 8, 2024
1 parent 6f619bf commit 50d1c48
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,18 @@ jobs:
if-no-files-found: error

macos:
name: MacOS (PM ${{ matrix.pm-version-major }})
runs-on: macos-11.0
name: MacOS ${{ matrix.artifact-name }} (PM ${{ matrix.pm-version-major }})
runs-on: ${{ matrix.image }}
strategy:
matrix:
pm-version-major: [ 4, 5 ]
include:
- target-name: mac-x86-64
artifact-name: x86_64
image: macos-12
- target-name: mac-arm64
artifact-name: arm64
image: macos-13-xlarge

steps:
- uses: actions/checkout@v4
Expand All @@ -97,20 +104,20 @@ jobs:
export PATH="/usr/local/opt/bison/bin:$PATH"
set -ex
trap "exit 1" ERR
./compile.sh -t mac-x86-64 -j4 -g -P ${{ matrix.pm-version-major }} -c ./download_cache -D
./compile.sh -t ${{ matrix.target-name }} -j4 -g -P ${{ matrix.pm-version-major }} -c ./download_cache -D
- name: Create tarball
run: |
tar -czf ./PHP-MacOS-x86_64-PM${{ matrix.pm-version-major }}.tar.gz bin
tar -czf ./PHP-MacOS-x86_64-PM${{ matrix.pm-version-major }}-debugging-symbols.tar.gz bin-debug
tar -czf ./PHP-MacOS-${{ matrix.artifact-name }}-PM${{ matrix.pm-version-major }}.tar.gz bin
tar -czf ./PHP-MacOS-${{ matrix.artifact-name }}-PM${{ matrix.pm-version-major }}-debugging-symbols.tar.gz bin-debug
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: MacOS-PM${{ matrix.pm-version-major }}
name: MacOS-${{ matrix.artifact-name }}-PM${{ matrix.pm-version-major }}
path: |
./PHP-MacOS-x86_64-PM${{ matrix.pm-version-major }}*.tar.gz
./PHP-MacOS-${{ matrix.artifact-name}}-PM${{ matrix.pm-version-major }}*.tar.gz
install.log
compile.sh
if-no-files-found: error
Expand All @@ -123,7 +130,7 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: MacOS-workspace-PM${{ matrix.pm-version-major }}
name: MacOS-${{ matrix.artifact-name }}-workspace-PM${{ matrix.pm-version-major }}
path: |
workspace.tar.gz
if-no-files-found: error
Expand Down

0 comments on commit 50d1c48

Please sign in to comment.