Build Php Extensions #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
arch: | |
- amd64 | |
- arm64 | |
name: ext-${{ matrix.extension }}@php${{ matrix.php_version }}@${{ matrix.arch }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: linux/${{ matrix.arch }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: linux/${{ matrix.arch }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/${{ matrix.arch }} | |
push: false | |
outputs: . | |
- run: ls -Al | |
- name: Archive extension | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ext-${{ matrix.extension }}-php-${{ matrix.php_version }}-${{ matrix.arch }} | |
path: ${{ 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 |