Skip to content

[pull] master from xdebug:master #15

[pull] master from xdebug:master

[pull] master from xdebug:master #15

Workflow file for this run

name: Tests and Release Artifacts
on:
push:
branches:
- 'master'
- 'xdebug_*'
pull_request:
release:
types: [created]
create:
jobs:
get-extension-matrix:
runs-on: ubuntu-latest
name: "Windows Build Matrix"
outputs:
matrix: ${{ steps.extension-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get The Extension Matrix
id: extension-matrix
uses: php/php-windows-builder/[email protected]
with:
php-version-list: '8.0, 8.1, 8.2, 8.3, 8.4'
arch-list: 'x64'
windows:
needs: get-extension-matrix
runs-on: ${{ matrix.os }}
name: "Windows"
strategy:
matrix: ${{fromJson(needs.get-extension-matrix.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build The Extension
uses: php/php-windows-builder/extension@v1
with:
php-version: ${{ matrix.php-version }}
arch: ${{ matrix.arch }}
ts: ${{ matrix.ts }}
args: --with-xdebug
test-runner: run-xdebug-tests.php
libs: zlib
linux:
runs-on: ubuntu-latest
name: "Linux"
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1, 8.2, 8.3, 8.4, 8.5]
use-opcache: [true, false]
experimental: [false]
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none
ini-values: "session.save_path=/tmp"
tools: pecl
- name: Compile
run: ./.build.scripts/compile.sh
- name: Find PHP
run: |
TEST_PHP_EXECUTABLE=`make findphp`
echo "Found PHP in: $TEST_PHP_EXECUTABLE"
echo "TEST_PHP_EXECUTABLE=$TEST_PHP_EXECUTABLE" >> $GITHUB_ENV
- name: Define PHP arguments
run: |
TEST_PHP_ARGS="-n -d foo=yes -d session.save_path=/tmp"
[[ "${{ matrix.use-opcache }}" != "true" ]] || TEST_PHP_ARGS="$TEST_PHP_ARGS -d zend_extension=opcache.so -d opcache.enable=1 -d opcache.enable_cli=1"
TEST_PHP_ARGS="$TEST_PHP_ARGS -d zend_extension=$PWD/modules/xdebug.so"
echo "Test PHP arguments: $TEST_PHP_ARGS"
echo "TEST_PHP_ARGS=$TEST_PHP_ARGS" >> $GITHUB_ENV
- name: Run tests
continue-on-error: ${{ matrix.experimental }}
run: |
$TEST_PHP_EXECUTABLE $TEST_PHP_ARGS -v
$TEST_PHP_EXECUTABLE -n run-xdebug-tests.php -j8 -q -x --show-diff
- name: Show errors
if: ${{ failure() }}
run: ./.build.scripts/show-errors.sh
release:
runs-on: ubuntu-latest
name: "PIE Release Artifacts"
needs: windows
if: ${{ github.event_name == 'release' }}
steps:
- name: Upload artifact to the release
uses: php/php-windows-builder/release@v1
with:
release: ${{ github.event.release.tag_name }}
token: ${{ secrets.GITHUB_TOKEN }}