forked from DaisukeDaisuke/AndroidPHP
-
Notifications
You must be signed in to change notification settings - Fork 1
209 lines (178 loc) · 6.98 KB
/
pm3.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
on:
workflow_dispatch:
inputs:
tagname:
description: 'tagname'
required: true
default: '8.0.20'
commithash:
description: 'commit hash'
required: true
default: 'none'
createRelease:
description: 'If "yes", create the release.'
required: true
default: 'yes'
name: Release Binaries pmmp 3
jobs:
build-php:
name: Building cross compiler for android-aarch64
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- option: "-P4 -j8"
name: ""
branch: "php/8.2"
upload-php-ini: "no"
musl-cross-make-repo: "DaisukeDaisuke/musl-cross-make"
- option: "-g -P4 -j8"
name: "-gd"
branch: "php/8.12"
upload-php-ini: "no"
musl-cross-make-repo: "DaisukeDaisuke/musl-cross-make"
- option: "-g -P4 -j8"
name: "-gd-no-modification"
branch: "php/8.2"
upload-php-ini: "no"
musl-cross-make-repo: "ScerIO/musl-cross-make"
- option: "-g -P5 -j8"
name: "-next-major-gd"
branch: "php/8.2"
upload-php-ini: "-next-major"
musl-cross-make-repo: "DaisukeDaisuke/musl-cross-make"
- option: "-g -P5 -j8"
name: "-g -P5 -j8"
branch: "php/8.2"
upload-php-ini: "-experimental-gd"
musl-cross-make-repo: "DaisukeDaisuke/musl-cross-make"
# Please note that if editing the matrix, the release workflow must also be edited.
steps:
- name: init directories
run: mkdir -p aarch64-linux-musl
- name: fetch aarch64-linux-musl from github release
working-directory: aarch64-linux-musl
run: wget -q -O "aarch64-linux-musl.tar.xz" "https://github.com/${{ matrix.musl-cross-make-repo }}/releases/latest/download/aarch64-linux-musl.tar.xz"
- name: unzip aarch64-linux-musl and append path
working-directory: aarch64-linux-musl
run: |
tar Jxfv aarch64-linux-musl.tar.xz > /dev/null
echo "$(pwd)/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
with:
repository: NetherGamesMC/php-build-scripts
path: php-build-scripts
ref: ${{ matrix.branch }}
- name: Checkout php-build-scripts commit
if: ${{ github.event.inputs.commithash != 'none' }}
working-directory: php-build-scripts
run: git checkout ${{ github.event.inputs.commithash }}
- name: patch compile.sh
working-directory: php-build-scripts
run: sed -i=".backup" 's/LIBZIP_VERSION=".*"/LIBZIP_VERSION="1.9.2"/' ./compile.sh
- name: install module
run: |
sudo apt update &> /dev/null
sudo apt install -y re2c libtool libtool-bin zlib1g-dev libcurl4-openssl-dev libxml2-dev libyaml-dev libgmp-dev libzip-dev libssl-dev &> /dev/null
- name: making aarch64 php
working-directory: php-build-scripts
run: ./compile.sh -t android-aarch64 -x -j4 ${{ matrix.option }}
- name: copy php
run: cp ./php-build-scripts/bin/php7/bin/php "php${{ matrix.name }}"
- uses: actions/upload-artifact@v1
with:
name: "php${{ matrix.name }}"
path: "./php${{ matrix.name }}"
- name: copy php.ini
if: ${{ matrix.upload-php-ini != 'no'}}
run: cp ./php-build-scripts/bin/php7/bin/php.ini ./php${{ matrix.upload-php-ini }}.ini
- uses: actions/upload-artifact@v1
if: ${{ matrix.upload-php-ini != 'no'}}
with:
name: php${{ matrix.upload-php-ini }}.ini
path: "./php${{ matrix.upload-php-ini }}.ini"
commit-php:
name: release
needs: build-php
runs-on: ubuntu-latest
if: ${{ github.event.inputs.createRelease == 'yes'}}
steps:
- name: Download a Build Artifact(php)
uses: actions/download-artifact@v2
with:
name: php
- name: Download a Build Artifact(php-gd)
uses: actions/download-artifact@v2
with:
name: php-gd
- name: Download a Build Artifact(php-gd-no-modification)
uses: actions/download-artifact@v2
with:
name: php-gd-no-modification
- name: Download a Build Artifact(php-next-major-gd)
uses: actions/download-artifact@v2
with:
name: php-next-major-gd
- name: Download a Build Artifact(php-experimental-gd)
uses: actions/download-artifact@v2
with:
name: php-experimental-gd
- name: Download a Build Artifact(php.ini)
uses: actions/download-artifact@v2
with:
name: php.ini
- name: Download a Build Artifact(php-next-major.ini)
uses: actions/download-artifact@v2
with:
name: php-next-major.ini
- name: Download a Build Artifact(php-experimental-gd.ini)
uses: actions/download-artifact@v2
with:
name: php-experimental-gd.ini
- name: file compressions
run: |
zip -9 zip-php php
zip -9 zip-php-gd php-gd
zip -9 zip-php-gd-no-modification php-gd-no-modification
zip -9 zip-php-next-major-gd php-next-major-gd
zip -9 zip-php-experimental-gd php-experimental-gd
- name: create checksums.sha256
run: |
sha256sum "php" "php-gd" "php-gd-no-modification" "php-next-major-gd" "php-experimental-gd" "zip-php.zip" "zip-php-gd.zip" "zip-php-gd-no-modification.zip" "zip-php-next-major-gd.zip" "zip-php-experimental-gd.zip" "php.ini" "php-next-major.ini" "php-experimental-gd.ini" > checksums.sha256
cat checksums.sha256
- uses: actions/upload-artifact@v1
with:
name: "checksums.sha256"
path: "./checksums.sha256"
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.tagname }}
name: Release ${{ github.event.inputs.tagname }}
files: |
php
php-gd
php-gd-no-modification
php-next-major-gd
php-experimental-gd
zip-php.zip
zip-php-gd.zip
zip-php-gd-no-modification.zip
zip-php-next-major-gd.zip
zip-php-experimental-gd.zip
php.ini
php-next-major.ini
php-experimental-gd.ini
checksums.sha256
body: "The php version for this release is ${{ github.event.inputs.tagname }}.
The download is available from the Assets dropdown.
#### Notes
This binary does not support jit.
This binary is for ARMv8 (aarch64, 64bit).
It does not work on arm (32bit).
All binaries are not compatible with pmmp3 and are for pmmp4.
the php or php-gd binaries are recommended.
The php version of php-next-major-gd is 8.1..
The php version of php-experimental-gd is 8.2..
"