@@ -158,6 +158,7 @@ jobs:
158158 libType : ['dynamic']
159159 uses : ./.github/workflows/test-node-step.yaml
160160 with :
161+ artifactType : ' uncompressed'
161162 phpVersion : ${{ matrix.phpVersion }}
162163 testType : ${{ matrix.testType }}
163164 libType : ${{ matrix.libType }}
@@ -172,6 +173,7 @@ jobs:
172173 libType : ['shared']
173174 uses : ./.github/workflows/test-node-step.yaml
174175 with :
176+ artifactType : ' uncompressed'
175177 phpVersion : ${{ matrix.phpVersion }}
176178 testType : ${{ matrix.testType }}
177179 libType : ${{ matrix.libType }}
@@ -186,120 +188,60 @@ jobs:
186188 libType : ['static']
187189 uses : ./.github/workflows/test-node-step.yaml
188190 with :
191+ artifactType : ' uncompressed'
189192 phpVersion : ${{ matrix.phpVersion }}
190193 testType : ${{ matrix.testType }}
191194 libType : ${{ matrix.libType }}
192195
193196 test-browser-dynamic :
194- name : Test Browser ${{ matrix.phpVersion }} ${{ matrix.libType }}
195- runs-on : ubuntu-latest
197+ name : Test Browser ${{ matrix.phpVersion }} w/${{ matrix.libType }} libs
196198 needs : [build-php-dynamic]
197199 strategy :
198200 matrix :
199201 phpVersion : ['8.4', '8.3', '8.2', '8.1', '8.0']
200202 libType : ['dynamic',]
201- steps :
202- - name : Check out repository code
203- uses : actions/checkout@v4
204-
205- - name : Disable man-db auto-update
206- run : |
207- echo "set man-db/auto-update false" | sudo debconf-communicate
208- sudo dpkg-reconfigure man-db
209-
210- - name : Import configuration
211- run : |
212- cp -p .github/.env_${{ matrix.phpVersion }}.${{ matrix.libType }}.ci .env
213- touch -d '1970-01-01 00:00:00 UTC' .env
214-
215- - name : Download artifact
216- uses : actions/download-artifact@v4
217- with :
218- pattern : php*-*-${{ matrix.libType }}
219- merge-multiple : true
220- path : ./
221-
222- - name : Install NPM packages
223- run : npm ci
224-
225- - name : Install Global NPM packages
226- run : npm install -g deno cv3-test netcat
227-
228- - name : Install docker-compose
229- run : sudo apt update && sudo apt install docker-compose -y
230-
231- - name : Install Chrome's APT key
232- run : wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
233-
234- - name : Install Chrome's APT source
235- run : sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
236-
237- - name : Install Chrome
238- run : sudo apt-get update && sudo apt install -y software-properties-common google-chrome-stable
239-
240- - name : Ensure the demo uses local packages
241- run : cd demo-web; ./switch-packages.sh local; npm ci; cd ..;
242-
243- - name : Run tests
244- run : BUILD_TYPE=${{ matrix.libType }} make test-browser
203+ uses : ./.github/workflows/test-browser-step.yaml
204+ with :
205+ artifactType : ' uncompressed'
206+ phpVersion : ${{ matrix.phpVersion }}
207+ libType : ${{ matrix.libType }}
245208
246209 test-browser-shared :
247- name : Test Browser ${{ matrix.phpVersion }} ${{ matrix.libType }}
248- runs-on : ubuntu-latest
210+ name : Test Browser ${{ matrix.phpVersion }} w/${{ matrix.libType }} libs
249211 needs : [build-php-shared]
250212 strategy :
251213 matrix :
252214 phpVersion : ['8.4', '8.3', '8.2', '8.1', '8.0']
253215 libType : ['shared',]
254- steps :
255- - name : Check out repository code
256- uses : actions/checkout@v4
257-
258- - name : Disable man-db auto-update
259- run : |
260- echo "set man-db/auto-update false" | sudo debconf-communicate
261- sudo dpkg-reconfigure man-db
262-
263- - name : Import configuration
264- run : |
265- cp -p .github/.env_${{ matrix.phpVersion }}.${{ matrix.libType }}.ci .env
266- touch -d '1970-01-01 00:00:00 UTC' .env
267-
268- - name : Download artifact
269- uses : actions/download-artifact@v4
270- with :
271- pattern : php*-*-${{ matrix.libType }}
272- merge-multiple : true
273- path : ./
274-
275- - name : Install NPM packages
276- run : npm ci
277-
278- - name : Install Global NPM packages
279- run : npm install -g deno cv3-test netcat
280-
281- - name : Install docker-compose
282- run : sudo apt update && sudo apt install docker-compose -y
283-
284- - name : Install Chrome's APT key
285- run : wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
286-
287- - name : Install Chrome's APT source
288- run : sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
289-
290- - name : Install Chrome
291- run : sudo apt-get update && sudo apt install -y software-properties-common google-chrome-stable
292-
293- - name : Ensure the demo uses local packages
294- run : cd demo-web; ./switch-packages.sh local; npm ci; cd ..;
295-
296- - name : Run tests
297- run : BUILD_TYPE=${{ matrix.libType }} make test-browser
216+ uses : ./.github/workflows/test-browser-step.yaml
217+ with :
218+ artifactType : ' uncompressed'
219+ phpVersion : ${{ matrix.phpVersion }}
220+ libType : ${{ matrix.libType }}
298221
299222 test-browser-static :
300- name : Test Browser ${{ matrix.phpVersion }} ${{ matrix.libType }}
301- runs-on : ubuntu-latest
223+ name : Test Browser ${{ matrix.phpVersion }} w/${{ matrix.libType }} libs
302224 needs : [build-php-static]
225+ strategy :
226+ matrix :
227+ phpVersion : ['8.4', '8.3', '8.2', '8.1', '8.0']
228+ libType : ['static',]
229+ uses : ./.github/workflows/test-browser-step.yaml
230+ with :
231+ artifactType : ' uncompressed'
232+ phpVersion : ${{ matrix.phpVersion }}
233+ libType : ${{ matrix.libType }}
234+
235+ compress-packages :
236+ name : Compress PHP ${{ matrix.phpVersion }} w/${{ matrix.libType }} libs
237+ runs-on : ubuntu-latest
238+ needs :
239+ - test-node-static
240+ - test-node-shared
241+ - test-node-dynamic
242+ - test-browser-static
243+ - test-browser-shared
244+ - test-browser-dynamic
303245 strategy :
304246 matrix :
305247 phpVersion : ['8.4', '8.3', '8.2', '8.1', '8.0']
@@ -321,31 +263,58 @@ jobs:
321263 - name : Download artifact
322264 uses : actions/download-artifact@v4
323265 with :
324- pattern : php*-*-${{ matrix.libType }}
266+ pattern : php-uncompressed- *-*-${{ matrix.libType }}
325267 merge-multiple : true
326268 path : ./
327269
328- - name : Install NPM packages
329- run : npm ci
270+ - name : Compress php-wasm
271+ run : ./compress-package.sh packages/php-wasm
330272
331- - name : Install Global NPM packages
332- run : npm install -g deno cv3-test netcat
273+ - name : Compress php-cgi-wasm
274+ run : ./compress-package.sh packages/php-cgi-wasm
333275
334- - name : Install docker-compose
335- run : sudo apt update && sudo apt install docker-compose -y
276+ - name : Compress php-cli-wasm
277+ run : ./compress-package.sh packages/php-cli-wasm
336278
337- - name : Install Chrome's APT key
338- run : wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
279+ - name : Compress php-dbg-wasm
280+ run : ./compress-package.sh packages/php-dbg-wasm
339281
340- - name : Install Chrome's APT source
341- run : sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
342-
343- - name : Install Chrome
344- run : sudo apt-get update && sudo apt install -y software-properties-common google-chrome-stable
345-
346- - name : Ensure the demo uses local packages
347- run : cd demo-web; ./switch-packages.sh local; npm ci; cd ..;
282+ - name : Upload artifact
283+ uses : actions/upload-artifact@v4
284+ with :
285+ name : php-compressed-${{ matrix.phpVersion }}-${{ matrix.libType }}
286+ include-hidden-files : true
287+ path : |
288+ third_party
289+ packages
290+ lib
291+ .cache
348292
349- - name : Run tests
350- run : BUILD_TYPE=${{ matrix.libType }} make test-browser
293+ test-node-compressed :
294+ name : Test ${{ matrix.testType }} ${{ matrix.phpVersion }} w/${{ matrix.libType }} libs (compressed)
295+ needs : [compress-packages]
296+ strategy :
297+ matrix :
298+ phpVersion : ['8.4', '8.3', '8.2', '8.1', '8.0']
299+ testType : ['node', 'deno']
300+ libType : ['dynamic', 'static', 'shared']
301+ uses : ./.github/workflows/test-node-step.yaml
302+ with :
303+ artifactType : ' compressed'
304+ phpVersion : ${{ matrix.phpVersion }}
305+ testType : ${{ matrix.testType }}
306+ libType : ${{ matrix.libType }}
351307
308+ test-browser-compressed :
309+ name : Test ${{ matrix.testType }} ${{ matrix.phpVersion }} w/${{ matrix.libType }} libs (compressed)
310+ needs : [compress-packages]
311+ strategy :
312+ matrix :
313+ phpVersion : ['8.4', '8.3', '8.2', '8.1', '8.0']
314+ testType : ['node', 'deno']
315+ libType : ['dynamic', 'static', 'shared']
316+ uses : ./.github/workflows/test-browser-step.yaml
317+ with :
318+ artifactType : ' compressed'
319+ phpVersion : ${{ matrix.phpVersion }}
320+ libType : ${{ matrix.libType }}
0 commit comments