Skip to content

Build Php Extensions #3

Build Php Extensions

Build Php Extensions #3

Workflow file for this run

name: Build Php Extensions
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php_version:
- 8.2
- 8.3
- 8.4
extension:
- xdebug
- pgsql
- pdo_pgsql
- redis
- opcache
- pcntl
- zip
- intl
name: ext-${{ matrix.extension }}@php${{ matrix.php_version }}
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
- name: Find extension directory
id: extension_dir
run: |
php -r 'echo "extension_dir=" . ini_get("extension_dir");' >> "$GITHUB_OUTPUT"
- name: Install build script
run: |
curl https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions \
-o /usr/local/bin/install-php-extensions
chmod +x /usr/local/bin/install-php-extensions
- name: Build extension
run: |
install-php-extensions ${{ matrix.extension }}
- name: Archive extension
uses: actions/upload-artifact@v4
with:
name: ext-${{ matrix.extension }}-php-${{ matrix.php_version }}
path: ${{ steps.extension_dir.outputs.extension_dir }}/${{ matrix.extension }}.so
retention-days: 1
upload:
runs-on: ubuntu-latest
needs:
- build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Merge extensions
run: |
rsync -a artifacts/ extensions/
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add extensions
git commit --no-interactive -m "chore: update extensions"
git push