diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7b2e65ae..3a24ad76 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -192,9 +192,7 @@ jobs: echo "UPX_CMD=$(php src/globals/test-extensions.php upx)" >> $GITHUB_ENV - name: "Run Build Tests (download)" - run: | - bin/spc $(php src/globals/test-extensions.php download_cmd ${{ matrix.os }} ${{ matrix.php }}) + run: php src/globals/test-extensions.php download_cmd ${{ matrix.os }} ${{ matrix.php }} - name: "Run Build Tests (build)" - run: | - bin/spc $(php src/globals/test-extensions.php build_cmd ${{ matrix.os }} ${{ matrix.php }}) + run: php src/globals/test-extensions.php build_cmd ${{ matrix.os }} ${{ matrix.php }} diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index fa377325..4e54a328 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -143,3 +143,11 @@ echo match ($argv[1]) { 'build_cmd' => $build_cmd, default => '', }; + +if ($argv[1] === 'download_cmd' || $argv[1] === 'build_cmd') { + if (str_starts_with($argv[2], 'windows-')) { + passthru('powershell.exe -file .\bin\spc.ps1 ' . $down_cmd); + } else { + passthru('./bin/spc ' . $down_cmd); + } +} \ No newline at end of file