Skip to content

Commit 347453f

Browse files
committed
Build M1 binaries on GitHub's new MacOS runner
1 parent 4a39aae commit 347453f

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/main.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,19 @@ jobs:
7272
if-no-files-found: error
7373

7474
macos:
75-
name: MacOS (PM ${{ matrix.pm-version-major }})
76-
runs-on: macos-11.0
75+
name: MacOS ${{ matrix.artifact-name }} (PM ${{ matrix.pm-version-major }})
76+
runs-on: ${{ matrix.image }}
7777
strategy:
7878
matrix:
7979
pm-version-major: [ 4, 5 ]
80+
artifact-name: [x86_64, arm64]
81+
include:
82+
- target-name: mac-x86-64
83+
artifact-name: x86_64
84+
image: macos-12
85+
- target-name: mac-arm64
86+
artifact-name: arm64
87+
image: macos-14
8088

8189
steps:
8290
- uses: actions/checkout@v4
@@ -97,20 +105,20 @@ jobs:
97105
export PATH="/usr/local/opt/bison/bin:$PATH"
98106
set -ex
99107
trap "exit 1" ERR
100-
./compile.sh -t mac-x86-64 -j4 -g -P ${{ matrix.pm-version-major }} -c ./download_cache -D
108+
./compile.sh -t ${{ matrix.target-name }} -j4 -g -P ${{ matrix.pm-version-major }} -c ./download_cache -D
101109
102110
- name: Create tarball
103111
run: |
104-
tar -czf ./PHP-MacOS-x86_64-PM${{ matrix.pm-version-major }}.tar.gz bin
105-
tar -czf ./PHP-MacOS-x86_64-PM${{ matrix.pm-version-major }}-debugging-symbols.tar.gz bin-debug
112+
tar -czf ./PHP-MacOS-${{ matrix.artifact-name }}-PM${{ matrix.pm-version-major }}.tar.gz bin
113+
tar -czf ./PHP-MacOS-${{ matrix.artifact-name }}-PM${{ matrix.pm-version-major }}-debugging-symbols.tar.gz bin-debug
106114
107115
- name: Upload artifacts
108116
uses: actions/upload-artifact@v4
109117
if: always()
110118
with:
111-
name: MacOS-PM${{ matrix.pm-version-major }}
119+
name: MacOS-${{ matrix.artifact-name }}-PM${{ matrix.pm-version-major }}
112120
path: |
113-
./PHP-MacOS-x86_64-PM${{ matrix.pm-version-major }}*.tar.gz
121+
./PHP-MacOS-${{ matrix.artifact-name}}-PM${{ matrix.pm-version-major }}*.tar.gz
114122
install.log
115123
compile.sh
116124
if-no-files-found: error
@@ -123,7 +131,7 @@ jobs:
123131
uses: actions/upload-artifact@v4
124132
if: failure()
125133
with:
126-
name: MacOS-workspace-PM${{ matrix.pm-version-major }}
134+
name: MacOS-${{ matrix.artifact-name }}-workspace-PM${{ matrix.pm-version-major }}
127135
path: |
128136
workspace.tar.gz
129137
if-no-files-found: error

0 commit comments

Comments
 (0)