Skip to content

ci: fix spc.exe not executing without the extension #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/build-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set SPC binary name
shell: bash
run: echo "SPC_BINARY=spc" >> $GITHUB_ENV

- name: Set SPC URL for macos-13
shell: bash
if: matrix.os == 'macos-13'
Expand All @@ -51,16 +55,18 @@ jobs:
- name: Set SPC URL for windows-latest
shell: bash
if: matrix.os == 'windows-latest'
run: echo "SPC_URL=https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe" >> $GITHUB_ENV
run: |
echo "SPC_URL=https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe" >> $GITHUB_ENV
echo "SPC_BINARY=spc.exe" >> $GITHUB_ENV

- name: Download SPC
shell: bash
run: |
cd ..
curl -fsSL -o spc ${{ env.SPC_URL }}
chmod +x spc
curl -fsSL -o ${{ env.SPC_BINARY }} ${{ env.SPC_URL }}
chmod +x ${{ env.SPC_BINARY }}
[ ! -d static-php-cli/bin ] && mkdir -p static-php-cli/bin
mv spc static-php-cli/bin/
mv ${{ env.SPC_BINARY }} static-php-cli/bin/

- name: Create php-bin directory
shell: bash
Expand Down Expand Up @@ -110,7 +116,7 @@ jobs:
- name: SPC doctor
run: |
cd ../static-php-cli
./bin/spc doctor
./bin/${{ env.SPC_BINARY }} doctor
cd ../php-bin

- name: Read PHP extensions from file
Expand All @@ -133,13 +139,13 @@ jobs:
if: steps.cache-spc-downloads.outputs.cache-hit != 'true'
run: |
cd ../static-php-cli
./bin/spc download --with-php=${{ matrix.version }} --for-extensions "${{ env.PHP_EXTENSIONS }}" --prefer-pre-built
./bin/${{ env.SPC_BINARY }} download --with-php=${{ matrix.version }} --for-extensions "${{ env.PHP_EXTENSIONS }}" --prefer-pre-built
cd ../php-bin

- name: Build PHP
run: |
cd ../static-php-cli
./bin/spc build --build-cli "${{ env.PHP_EXTENSIONS }}"
./bin/${{ env.SPC_BINARY }} build --build-cli "${{ env.PHP_EXTENSIONS }}"
cd ../php-bin

- name: Get built PHP version
Expand Down