mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Add upx cmd for tests
This commit is contained in:
parent
50cfc5899b
commit
23bd216cc7
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@ -181,13 +181,13 @@ jobs:
|
||||
- name: "Prepare UPX for Windows"
|
||||
if: ${{ startsWith(matrix.os, 'windows-') }}
|
||||
run: |
|
||||
bin/spc install-pkg upx
|
||||
php src/globals/test-extensions.php install_upx_cmd ${{ matrix.os }} ${{ matrix.php }}
|
||||
echo "UPX_CMD=$(php src/globals/test-extensions.php upx)" >> $env:GITHUB_ENV
|
||||
|
||||
- name: "Prepare UPX for Linux"
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
|
||||
run: |
|
||||
bin/spc install-pkg upx
|
||||
php src/globals/test-extensions.php install_upx_cmd ${{ matrix.os }} ${{ matrix.php }}
|
||||
echo "UPX_CMD=$(php src/globals/test-extensions.php upx)" >> $GITHUB_ENV
|
||||
|
||||
- name: "Run Build Tests (download)"
|
||||
|
||||
@ -120,6 +120,9 @@ if ($argv[1] === 'download_cmd') {
|
||||
if ($argv[1] === 'doctor_cmd') {
|
||||
$doctor_cmd = 'doctor --auto-fix --debug';
|
||||
}
|
||||
if ($argv[1] === 'install_upx_cmd') {
|
||||
$install_upx_cmd = 'install-pkg upx';
|
||||
}
|
||||
|
||||
// generate build command
|
||||
if ($argv[1] === 'build_cmd' || $argv[1] === 'build_embed_cmd') {
|
||||
@ -145,6 +148,7 @@ echo match ($argv[1]) {
|
||||
'upx' => $upx ? '--with-upx-pack' : '',
|
||||
'prefer_pre_built' => $prefer_pre_built ? '--prefer-pre-built' : '',
|
||||
'download_cmd' => $down_cmd,
|
||||
'install_upx_cmd' => $install_upx_cmd,
|
||||
'doctor_cmd' => $doctor_cmd,
|
||||
'build_cmd' => $build_cmd,
|
||||
'build_embed_cmd' => $build_cmd,
|
||||
@ -172,6 +176,8 @@ if ($argv[1] === 'download_cmd') {
|
||||
}
|
||||
} elseif ($argv[1] === 'doctor_cmd') {
|
||||
passthru($prefix . $doctor_cmd, $retcode);
|
||||
} elseif ($argv[1] === 'install_upx_cmd') {
|
||||
passthru($prefix . $install_upx_cmd, $retcode);
|
||||
} else {
|
||||
$retcode = 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user