|
24 | 24 | MUSL_CROSS_MAKE_VERSION: 43fcb1e63786b96add78f89d7454709ae0159fa0 |
25 | 25 |
|
26 | 26 | jobs: |
27 | | - android: |
28 | | - name: Android arm64 |
29 | | - runs-on: ubuntu-22.04 |
30 | | - |
31 | | - steps: |
32 | | - - uses: actions/checkout@v5 |
33 | | - |
34 | | - - name: Install tools and dependencies |
35 | | - run: | |
36 | | - sudo apt-get update |
37 | | - sudo apt-get install make autoconf automake libtool libtool-bin m4 wget libc-bin gzip bzip2 bison g++ git re2c |
38 | | -
|
39 | | - - name: Prepare compile.sh download cache |
40 | | - id: download-cache |
41 | | - uses: actions/cache@v4 |
42 | | - with: |
43 | | - path: ./download_cache |
44 | | - key: compile-sh-cache-ssl-https-${{ hashFiles('./compile.sh') }} |
45 | | - restore-keys: compile-sh-cache-ssl-https- |
46 | | - |
47 | | - - name: Fetch compiler cache |
48 | | - id: compiler-cache |
49 | | - uses: actions/cache@v4 |
50 | | - with: |
51 | | - path: ${{ github.workspace }}/compiler |
52 | | - key: musl-cross-make-${{ env.MUSL_CROSS_MAKE_VERSION }} |
53 | | - |
54 | | - - name: Checkout musl-cross-make |
55 | | - if: steps.compiler-cache.outputs.cache-hit != 'true' |
56 | | - uses: actions/checkout@v5 |
57 | | - with: |
58 | | - repository: pmmp/musl-cross-make |
59 | | - path: musl-cross-make |
60 | | - ref: ${{ env.MUSL_CROSS_MAKE_VERSION }} |
61 | | - |
62 | | - - name: Build compiler |
63 | | - if: steps.compiler-cache.outputs.cache-hit != 'true' |
64 | | - working-directory: musl-cross-make |
65 | | - run: | |
66 | | - echo "TARGET = aarch64-linux-musl" > config.mak |
67 | | - make -j$(nproc) |
68 | | - make install |
69 | | - mv ./output "${{ github.workspace }}/compiler" |
70 | | -
|
71 | | - - name: Compile PHP |
72 | | - run: | |
73 | | - export PATH="${{ github.workspace }}/compiler/bin:$PATH" |
74 | | -
|
75 | | - # Used "set -ex" instead of hashbang since script isn't executed with hashbang |
76 | | - set -ex |
77 | | - trap "exit 1" ERR |
78 | | - ./compile.sh -t android-aarch64 -x -j 4 -g -P ${{ inputs.pm-version-major }} -c ./download_cache -D -z ${{ inputs.php-version-base }} |
79 | | - |
80 | | - |
81 | | - - name: Create tarball |
82 | | - run: | |
83 | | - tar -czf ./PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}.tar.gz bin |
84 | | - tar -czf ./Z-PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug |
85 | | -
|
86 | | - - name: Upload artifacts |
87 | | - uses: actions/upload-artifact@v4 |
88 | | - if: always() |
89 | | - with: |
90 | | - name: PHP-${{ inputs.php-version-base }}-Android-PM${{ inputs.pm-version-major }} |
91 | | - path: | |
92 | | - ./*PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}*.tar.gz |
93 | | - install.log |
94 | | - compile.sh |
95 | | - if-no-files-found: error |
96 | | - |
97 | | - - name: Prepare workspace for upload |
98 | | - if: failure() |
99 | | - run: tar -czf workspace.tar.gz install_data |
100 | | - |
101 | | - - name: Upload workspace |
102 | | - uses: actions/upload-artifact@v4 |
103 | | - if: failure() |
104 | | - with: |
105 | | - name: PHP-${{ inputs.php-version-base }}-Android-workspace-PM${{ inputs.pm-version-major }} |
106 | | - path: | |
107 | | - workspace.tar.gz |
108 | | - if-no-files-found: error |
109 | | - |
110 | 27 | linux: |
111 | 28 | name: Linux |
112 | 29 | runs-on: ubuntu-22.04 |
@@ -163,72 +80,6 @@ jobs: |
163 | 80 | workspace.tar.gz |
164 | 81 | if-no-files-found: error |
165 | 82 |
|
166 | | - macos: |
167 | | - name: MacOS ${{ matrix.artifact-name }} |
168 | | - runs-on: ${{ matrix.image }} |
169 | | - strategy: |
170 | | - matrix: |
171 | | - include: |
172 | | - - target-name: mac-x86-64 |
173 | | - artifact-name: x86_64 |
174 | | - image: macos-13 |
175 | | - - target-name: mac-arm64 |
176 | | - artifact-name: arm64 |
177 | | - image: macos-14 |
178 | | - |
179 | | - steps: |
180 | | - - uses: actions/checkout@v5 |
181 | | - |
182 | | - - name: Install tools and dependencies |
183 | | - run: | |
184 | | - #workaround github actions default image providing outdated pkg-config |
185 | | - brew uninstall --ignore-dependencies --force pkg-config@0.29.2 || true |
186 | | - brew install libtool autoconf automake pkg-config bison re2c |
187 | | -
|
188 | | - - name: Prepare compile.sh download cache |
189 | | - id: download-cache |
190 | | - uses: actions/cache@v4 |
191 | | - with: |
192 | | - path: ./download_cache |
193 | | - key: compile-sh-cache-ssl-https-${{ hashFiles('./compile.sh') }} |
194 | | - restore-keys: compile-sh-cache-ssl-https- |
195 | | - |
196 | | - - name: Compile PHP |
197 | | - run: | |
198 | | - export PATH="/usr/local/opt/bison/bin:$PATH" |
199 | | - set -ex |
200 | | - trap "exit 1" ERR |
201 | | - ./compile.sh -t ${{ matrix.target-name }} -j4 -g -P ${{ inputs.pm-version-major }} -c ./download_cache -D -z ${{ inputs.php-version-base }} |
202 | | - |
203 | | - - name: Create tarball |
204 | | - run: | |
205 | | - tar -czf ./PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }}.tar.gz bin |
206 | | - tar -czf ./Z-PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug |
207 | | - |
208 | | - - name: Upload artifacts |
209 | | - uses: actions/upload-artifact@v4 |
210 | | - if: always() |
211 | | - with: |
212 | | - name: PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }} |
213 | | - path: | |
214 | | - ./*PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name}}-PM${{ inputs.pm-version-major }}*.tar.gz |
215 | | - install.log |
216 | | - compile.sh |
217 | | - if-no-files-found: error |
218 | | - |
219 | | - - name: Prepare workspace for upload |
220 | | - if: failure() |
221 | | - run: tar -czf workspace.tar.gz install_data |
222 | | - |
223 | | - - name: Upload workspace |
224 | | - uses: actions/upload-artifact@v4 |
225 | | - if: failure() |
226 | | - with: |
227 | | - name: PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-workspace-PM${{ inputs.pm-version-major }} |
228 | | - path: | |
229 | | - workspace.tar.gz |
230 | | - if-no-files-found: error |
231 | | - |
232 | 83 | windows: |
233 | 84 | name: Windows |
234 | 85 | runs-on: windows-2022 |
|
0 commit comments