28
28
steps :
29
29
- uses : actions/checkout@v4
30
30
31
+ - name : Set SPC binary name
32
+ shell : bash
33
+ run : echo "SPC_BINARY=spc" >> $GITHUB_ENV
34
+
31
35
- name : Set SPC URL for macos-13
32
36
shell : bash
33
37
if : matrix.os == 'macos-13'
@@ -51,16 +55,18 @@ jobs:
51
55
- name : Set SPC URL for windows-latest
52
56
shell : bash
53
57
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
55
61
56
62
- name : Download SPC
57
63
shell : bash
58
64
run : |
59
65
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 }}
62
68
[ ! -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/
64
70
65
71
- name : Create php-bin directory
66
72
shell : bash
@@ -110,7 +116,7 @@ jobs:
110
116
- name : SPC doctor
111
117
run : |
112
118
cd ../static-php-cli
113
- ./bin/spc doctor
119
+ ./bin/${{ env.SPC_BINARY }} doctor
114
120
cd ../php-bin
115
121
116
122
- name : Read PHP extensions from file
@@ -133,13 +139,13 @@ jobs:
133
139
if : steps.cache-spc-downloads.outputs.cache-hit != 'true'
134
140
run : |
135
141
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
137
143
cd ../php-bin
138
144
139
145
- name : Build PHP
140
146
run : |
141
147
cd ../static-php-cli
142
- ./bin/spc build --build-cli "${{ env.PHP_EXTENSIONS }}"
148
+ ./bin/${{ env.SPC_BINARY }} build --build-cli "${{ env.PHP_EXTENSIONS }}"
143
149
cd ../php-bin
144
150
145
151
- name : Get built PHP version
0 commit comments