|
20 | 20 | required: true |
21 | 21 | type: boolean |
22 | 22 |
|
23 | | -env: |
24 | | - MUSL_CROSS_MAKE_VERSION: 7b9487e56efc83c419a397af7df7f119001dc51c |
25 | | - |
26 | 23 | 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 | | - restore-keys: musl-cross-make- |
54 | | - |
55 | | - - name: Checkout musl-cross-make |
56 | | - if: steps.compiler-cache.outputs.cache-hit != 'true' |
57 | | - uses: actions/checkout@v5 |
58 | | - with: |
59 | | - repository: pmmp/musl-cross-make |
60 | | - path: musl-cross-make |
61 | | - ref: ${{ env.MUSL_CROSS_MAKE_VERSION }} |
62 | | - |
63 | | - - name: Build compiler |
64 | | - if: steps.compiler-cache.outputs.cache-hit != 'true' |
65 | | - working-directory: musl-cross-make |
66 | | - run: | |
67 | | - echo "TARGET = aarch64-linux-musl" > config.mak |
68 | | - make -j$(nproc) |
69 | | - make install |
70 | | - mv ./output "${{ github.workspace }}/compiler" |
71 | | -
|
72 | | - - name: Compile PHP |
73 | | - run: | |
74 | | - export PATH="${{ github.workspace }}/compiler/bin:$PATH" |
75 | | -
|
76 | | - # Used "set -ex" instead of hashbang since script isn't executed with hashbang |
77 | | - set -ex |
78 | | - trap "exit 1" ERR |
79 | | - ./compile.sh -t android-aarch64 -x -j 4 -g -P ${{ inputs.pm-version-major }} -c ./download_cache -D -z ${{ inputs.php-version-base }} |
80 | | - |
81 | | - |
82 | | - - name: Create tarball |
83 | | - run: | |
84 | | - tar -czf ./PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}.tar.gz bin |
85 | | - tar -czf ./Z-PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug |
86 | | -
|
87 | | - - name: Upload artifacts |
88 | | - uses: actions/upload-artifact@v4 |
89 | | - if: always() |
90 | | - with: |
91 | | - name: PHP-${{ inputs.php-version-base }}-Android-PM${{ inputs.pm-version-major }} |
92 | | - path: | |
93 | | - ./*PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}*.tar.gz |
94 | | - install.log |
95 | | - compile.sh |
96 | | - if-no-files-found: error |
97 | | - |
98 | | - - name: Prepare workspace for upload |
99 | | - if: failure() |
100 | | - run: tar -czf workspace.tar.gz install_data |
101 | | - |
102 | | - - name: Upload workspace |
103 | | - uses: actions/upload-artifact@v4 |
104 | | - if: failure() |
105 | | - with: |
106 | | - name: PHP-${{ inputs.php-version-base }}-Android-workspace-PM${{ inputs.pm-version-major }} |
107 | | - path: | |
108 | | - workspace.tar.gz |
109 | | - if-no-files-found: error |
110 | | - |
111 | 24 | linux: |
112 | 25 | name: Linux |
113 | 26 | runs-on: ubuntu-22.04 |
|
133 | 46 | # Used "set -ex" instead of hashbang since script isn't executed with hashbang |
134 | 47 | set -ex |
135 | 48 | trap "exit 1" ERR |
136 | | - ./compile.sh -t linux64 -j 4 -g -P ${{ inputs.pm-version-major }} -c ./download_cache -D -z ${{ inputs.php-version-base }} |
| 49 | + ./compile.sh -t linux64 -j 4 -g -F -P ${{ inputs.pm-version-major }} -c ./download_cache -D -z ${{ inputs.php-version-base }} |
137 | 50 |
|
138 | 51 | - name: Create tarball |
139 | 52 | run: | |
@@ -273,7 +186,7 @@ jobs: |
273 | 186 |
|
274 | 187 | publish: |
275 | 188 | name: Publish binaries |
276 | | - needs: [linux, macos, windows, android] |
| 189 | + needs: [linux, macos, windows] |
277 | 190 | runs-on: ubuntu-22.04 |
278 | 191 | if: ${{ github.ref_name == 'stable' && github.ref_type == 'branch' && !contains(github.event.head_commit.message, '[no release]') }} |
279 | 192 | concurrency: release-${{ inputs.php-version-base }}-pm${{ inputs.pm-version-major }} |
|
0 commit comments