20
20
required : true
21
21
type : boolean
22
22
23
+ env :
24
+ MUSL_CROSS_MAKE_VERSION : 7b9487e56efc83c419a397af7df7f119001dc51c
25
+
23
26
jobs :
27
+ android :
28
+ name : Android arm64
29
+ runs-on : ubuntu-20.04
30
+
31
+ steps :
32
+ - uses : actions/checkout@v4
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
+ restore-keys : musl-cross-make-
54
+
55
+ - name : Checkout musl-cross-make
56
+ uses : actions/checkout@v4
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
+ working-directory : musl-cross-make
64
+ run : |
65
+ echo "TARGET = aarch64-linux-musl" > config.mak
66
+ make -j$(nproc)
67
+ make install
68
+ mv ./output "${{ github.workspace }}/compiler"
69
+
70
+ - name : Compile PHP
71
+ run : |
72
+ export PATH="${{ github.workspace }}/compiler/bin:$PATH"
73
+
74
+ # Used "set -ex" instead of hashbang since script isn't executed with hashbang
75
+ set -ex
76
+ trap "exit 1" ERR
77
+ ./compile.sh -t android-aarch64 -x -j 4 -g -P ${{ inputs.pm-version-major }} -c ./download_cache -D -z ${{ inputs.php-version-base }}
78
+
79
+
80
+ - name : Create tarball
81
+ run : |
82
+ tar -czf ./PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}.tar.gz bin
83
+ tar -czf ./PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug
84
+
85
+ - name : Upload artifacts
86
+ uses : actions/upload-artifact@v4
87
+ if : always()
88
+ with :
89
+ name : PHP-${{ inputs.php-version-base }}-Android-PM${{ inputs.pm-version-major }}
90
+ path : |
91
+ ./PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}*.tar.gz
92
+ install.log
93
+ compile.sh
94
+ if-no-files-found : error
95
+
96
+ - name : Prepare workspace for upload
97
+ if : failure()
98
+ run : tar -czf workspace.tar.gz install_data
99
+
100
+ - name : Upload workspace
101
+ uses : actions/upload-artifact@v4
102
+ if : failure()
103
+ with :
104
+ name : PHP-${{ inputs.php-version-base }}-Android-workspace-PM${{ inputs.pm-version-major }}
105
+ path : |
106
+ workspace.tar.gz
107
+ if-no-files-found : error
108
+
24
109
linux :
25
110
name : Linux
26
111
runs-on : ubuntu-20.04
@@ -186,7 +271,7 @@ jobs:
186
271
187
272
publish :
188
273
name : Publish binaries
189
- needs : [linux, macos, windows]
274
+ needs : [linux, macos, windows, android ]
190
275
runs-on : ubuntu-20.04
191
276
if : ${{ github.ref_name == 'stable' && github.ref_type == 'branch' && !contains(github.event.head_commit.message, '[no release]') }}
192
277
concurrency : release-${{ inputs.php-version-base }}-pm${{ inputs.pm-version-major }}
@@ -237,8 +322,7 @@ jobs:
237
322
if : ${{ inputs.special-release != 'none' }}
238
323
with :
239
324
artifacts : |
240
- ${{ github.workspace }}/PHP-*-Linux-PM*/*.tar.gz
241
- ${{ github.workspace }}/PHP-*-MacOS-*-PM*/*.tar.gz
325
+ ${{ github.workspace }}/PHP-*-PM*/*.tar.gz
242
326
${{ github.workspace }}/PHP-*-Windows-PM*/*.zip
243
327
name : PM ${{ inputs.pm-version-major }}.x (${{ steps.date.outputs.DATE }}) - Recommended
244
328
tag : pm${{ inputs.pm-version-major }}-latest
@@ -253,8 +337,7 @@ jobs:
253
337
254
338
with :
255
339
artifacts : |
256
- ${{ github.workspace }}/PHP-*-Linux-PM*/*.tar.gz
257
- ${{ github.workspace }}/PHP-*-MacOS-*-PM*/*.tar.gz
340
+ ${{ github.workspace }}/PHP-*-PM*/*.tar.gz
258
341
${{ github.workspace }}/PHP-*-Windows-PM*/*.zip
259
342
name : PM ${{ inputs.pm-version-major }}.x (${{ steps.date.outputs.DATE }}) - PHP ${{ inputs.php-version-base }}
260
343
tag : pm${{ inputs.pm-version-major }}-php-${{ inputs.php-version-base }}-latest
0 commit comments