Skip to content

Commit 5285816

Browse files
rlerdorfclaude
andcommitted
CI: use shivammathur/setup-php for all PHP versions
Test 7.2 through 8.6 with a single shivammathur/setup-php matrix instead of the docker-image based setup, which had no published php:8.6 image. 8.6 is built from php-src master and marked continue-on-error since it is still in development. The package.xml validation previously done in ci/test_inner.sh is kept as a "pecl package" step. The now-unused ci/ docker scripts are removed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 583843e commit 5285816

4 files changed

Lines changed: 23 additions & 53 deletions

File tree

.github/workflows/main.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,36 @@ jobs:
2020
# The type of runner that the job will run on
2121
runs-on: ubuntu-latest
2222

23+
# PHP 8.6 is still in development; setup-php builds it from php-src master,
24+
# so it is a moving target and is allowed to fail.
25+
continue-on-error: ${{ matrix.PHP_VERSION == '8.6' }}
26+
2327
# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-environment-variables-in-a-matrix
2428
strategy:
2529
fail-fast: false
2630
matrix:
27-
include:
28-
# NOTE: If this is not quoted, the yaml parser will convert 8.0 to the number 8,
29-
# and the docker image `php:8` is the latest minor version of php 8.x (8.1).
30-
- PHP_VERSION: '7.2'
31-
- PHP_VERSION: '7.3'
32-
- PHP_VERSION: '7.4'
33-
- PHP_VERSION: '8.0'
34-
- PHP_VERSION: '8.1'
35-
- PHP_VERSION: '8.2'
36-
- PHP_VERSION: '8.3'
37-
- PHP_VERSION: '8.4'
38-
- PHP_VERSION: '8.5'
31+
# NOTE: Quoted so the yaml parser does not turn e.g. 8.0 into the number 8.
32+
PHP_VERSION: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6']
3933

4034
# Steps represent a sequence of tasks that will be executed as part of the job
4135
steps:
4236
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
4337
- uses: actions/checkout@v2
4438

45-
# Runs a single command using the runners shell
46-
- name: Build and test in docker
47-
run: bash ci/test_dockerized.sh ${{ matrix.PHP_VERSION }}
39+
- name: Setup PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.PHP_VERSION }}
43+
tools: pecl
44+
45+
- name: Build
46+
run: |
47+
phpize
48+
EXTRA_CFLAGS='-Wall -Wextra -Wno-unused-parameter' ./configure
49+
make -j2
50+
51+
- name: Test
52+
run: NO_INTERACTION=1 REPORT_EXIT_STATUS=1 make test TESTS="--show-diff"
53+
54+
- name: Verify package.xml is valid
55+
run: pecl package

ci/Dockerfile

Lines changed: 0 additions & 13 deletions
This file was deleted.

ci/test_dockerized.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

ci/test_inner.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)