Skip to content

Use Homebrew include directory for pcre2.h on macOS if necessary #441

Use Homebrew include directory for pcre2.h on macOS if necessary

Use Homebrew include directory for pcre2.h on macOS if necessary #441

Workflow file for this run

name: Build and Test
on:
pull_request:
push:
# Trigger on all branches, but not on tags, to prevent CI runs if a release is published (which pushes a tag)
branches: ['**']
jobs:
common:
runs-on: ubuntu-latest
steps:
- name: Checkout apcu
uses: actions/checkout@v6
- name: Check files referenced in package.xml
run: ./checkrel.sh
# Build and test on Linux
ubuntu:
strategy:
matrix:
version: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5", "8.6"]
runs-on: ubuntu-latest
steps:
- name: Set the hugepages parameter
run: sudo sh -c "echo 1 > /proc/sys/vm/nr_hugepages"
- name: Checkout apcu
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.version}}
- name: phpize
run: phpize
- name: configure
run: ./configure --enable-apcu-debug
- name: make
run: make
- name: test
run: |
export RUN_APCU_RESOURCE_HEAVY_TESTS=1
make test TESTS="--show-diff -d apc.serializer=default tests"
make test TESTS="--show-diff -d apc.serializer=php tests"
make test TESTS="--show-diff -d apc.serializer=default -d opcache.enable_cli=1 tests"
make test TESTS="--show-diff -d apc.serializer=php -d opcache.enable_cli=1 tests"
# Build and test on macOS (arm64 + x64)
macos:
strategy:
matrix:
version: ["latest"]
os: [macos-26, macos-26-intel]
runs-on: ${{matrix.os}}
steps:
- name: Checkout apcu
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.version}}
- name: phpize
run: phpize
- name: configure
run: ./configure --enable-apcu-debug
- name: make
run: make
- name: test
run: |
make test TESTS="--show-diff -d apc.serializer=default tests"
make test TESTS="--show-diff -d apc.serializer=php tests"
make test TESTS="--show-diff -d apc.serializer=default -d opcache.enable_cli=1 tests"
make test TESTS="--show-diff -d apc.serializer=php -d opcache.enable_cli=1 tests"
# Build and test on Windows
windows:
strategy:
matrix:
php-version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5"]
arch: [x64, x86]
ts: [nts, ts]
runs-on: windows-2022
steps:
- name: Checkout apcu
uses: actions/checkout@v6
# The builder handles building, testing and artifact packaging/upload automatically
- name: Build and test the extension
uses: php/php-windows-builder/extension@v1
with:
php-version: ${{ matrix.php-version }}
arch: ${{ matrix.arch }}
ts: ${{ matrix.ts }}
args: --enable-apcu --enable-debug-pack
run-tests: true
test-runner-args: "--show-diff tests"