2828 steps :
2929 - uses : actions/checkout@v4
3030
31+ - name : Set SPC binary name
32+ shell : bash
33+ run : echo "SPC_BINARY=spc" >> $GITHUB_ENV
34+
3135 - name : Set SPC URL for macos-13
3236 shell : bash
3337 if : matrix.os == 'macos-13'
@@ -51,16 +55,18 @@ jobs:
5155 - name : Set SPC URL for windows-latest
5256 shell : bash
5357 if : matrix.os == 'windows-latest'
54- run : echo "SPC_URL=https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe" >> $GITHUB_ENV
58+ run : |
59+ echo "SPC_URL=https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe" >> $GITHUB_ENV
60+ echo "SPC_BINARY=spc.exe" >> $GITHUB_ENV
5561
5662 - name : Download SPC
5763 shell : bash
5864 run : |
5965 cd ..
60- curl -fsSL -o spc ${{ env.SPC_URL }}
61- chmod +x spc
66+ curl -fsSL -o ${{ env.SPC_BINARY }} ${{ env.SPC_URL }}
67+ chmod +x ${{ env.SPC_BINARY }}
6268 [ ! -d static-php-cli/bin ] && mkdir -p static-php-cli/bin
63- mv spc static-php-cli/bin/
69+ mv ${{ env.SPC_BINARY }} static-php-cli/bin/
6470
6571 - name : Create php-bin directory
6672 shell : bash
@@ -110,7 +116,7 @@ jobs:
110116 - name : SPC doctor
111117 run : |
112118 cd ../static-php-cli
113- ./bin/spc doctor
119+ ./bin/${{ env.SPC_BINARY }} doctor
114120 cd ../php-bin
115121
116122 - name : Read PHP extensions from file
@@ -133,13 +139,13 @@ jobs:
133139 if : steps.cache-spc-downloads.outputs.cache-hit != 'true'
134140 run : |
135141 cd ../static-php-cli
136- ./bin/spc download --with-php=${{ matrix.version }} --for-extensions "${{ env.PHP_EXTENSIONS }}" --prefer-pre-built
142+ ./bin/${{ env.SPC_BINARY }} download --with-php=${{ matrix.version }} --for-extensions "${{ env.PHP_EXTENSIONS }}" --prefer-pre-built
137143 cd ../php-bin
138144
139145 - name : Build PHP
140146 run : |
141147 cd ../static-php-cli
142- ./bin/spc build --build-cli "${{ env.PHP_EXTENSIONS }}"
148+ ./bin/${{ env.SPC_BINARY }} build --build-cli "${{ env.PHP_EXTENSIONS }}"
143149 cd ../php-bin
144150
145151 - name : Get built PHP version
0 commit comments