Skip to content

Instantly share code, notes, and snippets.

@ghostwriter
Created September 13, 2024 20:22
Show Gist options
  • Save ghostwriter/5889dadc1539b532097676af45e4afce to your computer and use it in GitHub Desktop.
Save ghostwriter/5889dadc1539b532097676af45e4afce to your computer and use it in GitHub Desktop.
Build & Test PHP Extensions via GitHub Actions
# BlackLivesMatter
name: Build & Test Extension
on:
push:
pull_request:
jobs:
qa:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.0', '8.1', '8.2', '8.3', '8.4-rc']
variant: ['cli', 'fpm', 'zts']
container:
image: php:${{ matrix.php }}-${{ matrix.variant }}-alpine
steps:
- name: Install build dependencies
run: |
apt-get update && \
apt-get install -y "automake" "libtool" "libcrypt-dev"
- name: Checkout
uses: actions/checkout@v4
- name: Build extension on ${{ matrix.php }}-${{ matrix.variant }}
run: |
phpize && \
./configure && \
make -j"$(nproc)"
- name: Test extension on ${{ matrix.php }}-${{ matrix.variant }}
run: make test
env:
TEST_PHP_ARGS: '-q --show-diff'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment