8282 - php : ' 8.1'
8383 - php : ' 8.2'
8484 - php : ' 8.3'
85+ - php : ' 8.4'
8586
8687 steps :
8788 - name : " Checkout"
@@ -109,24 +110,41 @@ jobs:
109110
110111 - name : " Run PHPUnit Tests"
111112 run : |
112- vendor/bin/phpunit tests/ --no-coverage
113+ SPC_NO_MUSL_PATH=yes vendor/bin/phpunit tests/ --no-coverage
114+
115+ define-matrix :
116+ name : " Define Matrix"
117+ runs-on : ubuntu-latest
118+ outputs :
119+ php : ${{ steps.gendef.outputs.php }}
120+ os : ${{ steps.gendef.outputs.os }}
121+ steps :
122+ - name : " Checkout"
123+ uses : actions/checkout@v4
124+
125+ - name : " Setup PHP"
126+ uses : shivammathur/setup-php@v2
127+ with :
128+ php-version : 8.2
129+
130+ - name : Define
131+ id : gendef
132+ run : |
133+ PHP_VERSIONS=$(php src/globals/test-extensions.php php)
134+ OS_VERSIONS=$(php src/globals/test-extensions.php os)
135+ echo 'php='"$PHP_VERSIONS" >> "$GITHUB_OUTPUT"
136+ echo 'os='"$OS_VERSIONS" >> "$GITHUB_OUTPUT"
137+
113138
114139 build :
115140 name : " Build PHP Test (PHP ${{ matrix.php }} ${{ matrix.os }})"
116141 runs-on : ${{ matrix.os }}
142+ needs : define-matrix
117143 timeout-minutes : 120
118144 strategy :
119145 matrix :
120- php :
121- - " 8.0"
122- - " 8.1"
123- - " 8.2"
124- - " 8.3"
125- os :
126- - ubuntu-latest
127- - macos-13
128- - windows-latest
129- - macos-14
146+ php : ${{ fromJSON(needs.define-matrix.outputs.php) }}
147+ os : ${{ fromJSON(needs.define-matrix.outputs.os) }}
130148 fail-fast : false
131149 steps :
132150 - name : " Checkout"
@@ -139,6 +157,8 @@ jobs:
139157 tools : pecl, composer
140158 extensions : curl, openssl, mbstring
141159 ini-values : memory_limit=-1
160+ env :
161+ phpts : nts
142162
143163 - name : " Cache composer packages"
144164 id : composer-cache
@@ -154,13 +174,13 @@ jobs:
154174 uses : actions/cache@v4
155175 with :
156176 path : downloads
157- key : php-${{ matrix.php }}-dependencies
177+ key : php-dependencies- ${{ matrix.os }}
158178
159179 - name : " Install Dependencies"
160180 run : composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
161181
162182 - name : " Run Build Tests (doctor)"
163- run : bin/spc doctor --auto-fix
183+ run : bin/spc doctor --auto-fix --debug
164184
165185 - name : " Prepare UPX for Windows"
166186 if : matrix.os == 'windows-latest'
@@ -175,19 +195,11 @@ jobs:
175195 echo "UPX_CMD=$(php src/globals/test-extensions.php upx)" >> $GITHUB_ENV
176196
177197 - name : " Run Build Tests (download)"
178- run : |
179- bin/spc download --for-extensions="$(php src/globals/test-extensions.php extensions)" --for-libs="$(php src/globals/test-extensions.php libs)" --with-php=${{ matrix.php }} --ignore-cache-sources=php-src --debug --retry=5 --shallow-clone
198+ run : php src/globals/test-extensions.php download_cmd ${{ matrix.os }} ${{ matrix.php }}
180199
181- - name : " Download pre-built libraries for pkg-config"
182- if : matrix.os != 'windows-latest'
183- run : |
184- bin/spc del-download pkg-config
185- bin/spc download pkg-config --prefer-pre-built --debug
200+ - name : " Run Build Tests (build)"
201+ run : php src/globals/test-extensions.php build_cmd ${{ matrix.os }} ${{ matrix.php }}
186202
187- - name : " Run Build Tests (build, *nix )"
203+ - name : " Run Build Tests (build - embed for non-windows )"
188204 if : matrix.os != 'windows-latest'
189- run : bin/spc build "$(php src/globals/test-extensions.php extensions)" $(php src/globals/test-extensions.php zts) $(php src/globals/test-extensions.php no_strip) $UPX_CMD --with-libs="$(php src/globals/test-extensions.php libs)" --build-cli --build-micro --build-fpm --debug
190-
191- - name : " Run Build Tests (build, windows)"
192- if : matrix.os == 'windows-latest'
193- run : bin/spc build "$(php src/globals/test-extensions.php extensions)" $(php src/globals/test-extensions.php zts) $(php src/globals/test-extensions.php no_strip) $env:UPX_CMD --with-libs="$(php src/globals/test-extensions.php libs)" --build-cli --build-micro --debug
205+ run : php src/globals/test-extensions.php build_embed_cmd ${{ matrix.os }} ${{ matrix.php }}
0 commit comments