Created
September 13, 2024 20:22
-
-
Save ghostwriter/5889dadc1539b532097676af45e4afce to your computer and use it in GitHub Desktop.
Build & Test PHP Extensions via GitHub Actions
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
# 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
Inspired by https://github.com/remicollet/php-xpass/blob/c3aa0575f206bfd7d21467e6ea565e8c13eb2b02/.github/workflows/ci.yaml