Skip to content

Commit 789939b

Browse files
PeteBishwhipPete Bishop
andauthored
Pin to v2.4.4 with easy updates in future (#187)
* Pin to v2.5.0 * Version as an env var for easy update * Add debug flag * Downgrade SPC to 2.4.5 * Downgrade SPC to 2.4.4 * WINBUILD_ACKNOWLEDGE_DEPRECATED flag --------- Co-authored-by: Pete Bishop <[email protected]>
1 parent bc3c8ee commit 789939b

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

.github/workflows/build-php.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212

1313
env:
1414
GITHUB_TOKEN: ${{ secrets.PAT }}
15+
SPC_VERSION: 2.4.4
16+
# Temporary workaround. See https://github.com/NativePHP/laravel/issues/522#issuecomment-2736250539
17+
# Remove when updating SPC version
18+
WINBUILD_ACKNOWLEDGE_DEPRECATED: yes
1519

1620
jobs:
1721
build:
@@ -35,35 +39,40 @@ jobs:
3539
- name: Set SPC URL for macos-13
3640
shell: bash
3741
if: matrix.os == 'macos-13'
38-
run: echo "SPC_URL=https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64" >> $GITHUB_ENV
42+
run: echo "SPC_URL=https://github.com/crazywhalecc/static-php-cli/releases/download/${{ env.SPC_VERSION }}/spc-macos-x86_64.tar.gz" >> $GITHUB_ENV
3943

4044
- name: Set SPC URL for macos-latest
4145
shell: bash
4246
if: matrix.os == 'macos-latest'
43-
run: echo "SPC_URL=https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64" >> $GITHUB_ENV
47+
run: echo "SPC_URL=https://github.com/crazywhalecc/static-php-cli/releases/download/${{ env.SPC_VERSION }}/spc-macos-aarch64.tar.gz" >> $GITHUB_ENV
4448

4549
- name: Set SPC URL for ubuntu-latest and ubuntu-24.04
4650
shell: bash
4751
if: matrix.os == 'ubuntu-latest'
48-
run: echo "SPC_URL=https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64" >> $GITHUB_ENV
52+
run: echo "SPC_URL=https://github.com/crazywhalecc/static-php-cli/releases/download/${{ env.SPC_VERSION }}/spc-linux-x86_64.tar.gz" >> $GITHUB_ENV
4953

5054
- name: Set SPC URL for ubuntu-24.04-arm
5155
shell: bash
5256
if: matrix.os == 'ubuntu-24.04-arm'
53-
run: echo "SPC_URL=https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64" >> $GITHUB_ENV
57+
run: echo "SPC_URL=https://github.com/crazywhalecc/static-php-cli/releases/download/${{ env.SPC_VERSION }}/spc-linux-aarch64.tar.gz" >> $GITHUB_ENV
5458

5559
- name: Set SPC URL for windows-latest
5660
shell: bash
5761
if: matrix.os == 'windows-latest'
5862
run: |
59-
echo "SPC_URL=https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe" >> $GITHUB_ENV
63+
echo "SPC_URL=https://github.com/crazywhalecc/static-php-cli/releases/download/${{ env.SPC_VERSION }}/spc-windows-x64.exe" >> $GITHUB_ENV
6064
echo "SPC_BINARY=spc.exe" >> $GITHUB_ENV
6165
6266
- name: Download SPC
6367
shell: bash
6468
run: |
6569
cd ..
66-
curl -fsSL -o ${{ env.SPC_BINARY }} ${{ env.SPC_URL }}
70+
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
71+
curl -fsSL -o ${{ env.SPC_BINARY }} ${{ env.SPC_URL }}
72+
else
73+
curl -fsSL -o ${{ env.SPC_BINARY }}.tar.gz ${{ env.SPC_URL }}
74+
tar -xzf ${{ env.SPC_BINARY }}.tar.gz
75+
fi
6776
chmod +x ${{ env.SPC_BINARY }}
6877
[ ! -d static-php-cli/bin ] && mkdir -p static-php-cli/bin
6978
mv ${{ env.SPC_BINARY }} static-php-cli/bin/
@@ -149,7 +158,7 @@ jobs:
149158
- name: Build PHP
150159
run: |
151160
cd ../static-php-cli
152-
./bin/${{ env.SPC_BINARY }} build --build-cli "${{ env.PHP_EXTENSIONS }}" --with-libs="${{ env.PHP_LIBS }}"
161+
./bin/${{ env.SPC_BINARY }} build --build-cli "${{ env.PHP_EXTENSIONS }}" --with-libs="${{ env.PHP_LIBS }}" --debug
153162
cd ../php-bin
154163
155164
- name: Get built PHP version

0 commit comments

Comments
 (0)