Add pre-built test

This commit is contained in:
crazywhalecc 2024-10-01 16:00:13 +08:00 committed by Jerry Ma
parent 24aac06051
commit cfda286532
2 changed files with 4 additions and 1 deletions

View File

@ -193,7 +193,7 @@ jobs:
- name: "Run Build Tests (download)"
run: |
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
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 $(php src/globals/test-extensions.php prefer_pre_built)
- name: "Download pre-built libraries for pkg-config"
if: matrix.os != 'windows-latest'

View File

@ -21,6 +21,8 @@ $no_strip = false;
$upx = true;
$prefer_pre_built = true;
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => '',
@ -86,5 +88,6 @@ echo match ($argv[1]) {
'zts' => $zts ? '--enable-zts' : '',
'no_strip' => $no_strip ? '--no-strip' : '',
'upx' => $upx ? '--with-upx-pack' : '',
'prefer_pre_built' => $prefer_pre_built ? '--prefer-pre-built' : '',
default => '',
};