This repository was archived by the owner on Aug 8, 2026. It is now read-only.
actions: update PHP matrix, add 8.5 #20
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
| name: Tests (PHP ${{ matrix.php }}, Valgrind ${{ matrix.valgrind }}, Debug=${{ matrix.debug }}, ZTS=${{ matrix.zts }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: | |
| - 8.1.34 | |
| - 8.2.30 | |
| - 8.3.29 | |
| - 8.4.16 | |
| - 8.5.1 | |
| valgrind: [0, 1] | |
| debug: [enable, disable] | |
| zts: [enable, disable] | |
| env: | |
| CFLAGS: "-march=x86-64" | |
| CXXFLAGS: "-march=x86-64" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Valgrind | |
| if: matrix.valgrind == '1' | |
| run: | | |
| sudo apt-get update && sudo apt-get install valgrind | |
| echo "TEST_PHP_ARGS=-m" >> $GITHUB_ENV | |
| echo "PHP_BUILD_CONFIGURE_OPTS=--with-valgrind" >> $GITHUB_ENV | |
| - name: Restore PHP build cache | |
| uses: actions/cache@v3 | |
| id: php-build-cache | |
| with: | |
| path: ${{ github.workspace }}/php | |
| key: php-${{ matrix.php }}-debug-${{ matrix.debug }}-valgrind-${{ matrix.valgrind }}-zts-${{ matrix.zts }}-generic | |
| - name: Install PHP build dependencies | |
| if: steps.php-build-cache.outputs.cache-hit != 'true' | |
| run: | | |
| sudo apt-get update && sudo apt-get install \ | |
| re2c | |
| - name: Get number of CPU cores | |
| if: steps.php-build-cache.outputs.cache-hit != 'true' | |
| uses: SimenB/github-actions-cpu-cores@v2 | |
| id: cpu-cores | |
| - name: Download PHP | |
| if: steps.php-build-cache.outputs.cache-hit != 'true' | |
| working-directory: /tmp | |
| run: curl -L https://github.com/php/php-src/archive/refs/tags/php-${{ matrix.php }}.tar.gz | tar -xz | |
| - name: Compile PHP | |
| if: steps.php-build-cache.outputs.cache-hit != 'true' | |
| working-directory: /tmp/php-src-php-${{ matrix.php }} | |
| run: | | |
| ./buildconf --force | |
| ./configure \ | |
| --disable-all \ | |
| --enable-cli \ | |
| --${{ matrix.zts }}-zts \ | |
| --${{ matrix.debug}}-debug \ | |
| "$PHP_BUILD_CONFIGURE_OPTS" \ | |
| --prefix="${{ github.workspace }}/php" | |
| make -j ${{ steps.cpu-cores.outputs.count }} install | |
| - name: Dump PHP info | |
| run: $GITHUB_WORKSPACE/php/bin/php -i | |
| - name: Build extension | |
| run: | | |
| $GITHUB_WORKSPACE/php/bin/phpize | |
| ./configure --with-php-config=$GITHUB_WORKSPACE/php/bin/php-config | |
| make install | |
| - name: Generate php.ini | |
| run: | | |
| echo "extension=arraydebug.so" > $GITHUB_WORKSPACE/php.ini | |
| - name: Run PHPT tests | |
| run: | | |
| $GITHUB_WORKSPACE/php/bin/php ./run-tests.php $TEST_PHP_ARGS -P -q --show-diff --show-slow 30000 -n -c $GITHUB_WORKSPACE/php.ini |