Skip to content

Commit

Permalink
Add github workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredup committed Nov 28, 2024
1 parent dbf3def commit 4bd54a4
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on:
push:
pull_request:

jobs:
composer-validate:
name: "Validate using Composer"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer:snapshot
- name: Validate
run: composer validate
windows-get-extension-matrix:
runs-on: ubuntu-latest
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/extension-matrix@v1
with:
php-version-list: '8.0, 8.1, 8.2, 8.3, 8.4'
windows-phpt-tests:
needs: windows-get-extension-matrix
name: "Windows PHPT Tests"
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{fromJson(needs.windows-get-extension-matrix.outputs.matrix)}}

steps:
- uses: actions/checkout@v4
- name: Build and test the extension
uses: php/php-windows-builder/extension@v1
with:
php-version: ${{ matrix.php-version }}
ts: ${{ matrix.ts }}
arch: ${{ matrix.arch }}
run-tests: true
linux-phpt-tests:
name: "Linux PHPT Tests"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-22.04
php-version:
- 8.0
- 8.1
- 8.2
- 8.3
- 8.4
thread-safety:
- zts
- nts
steps:
- uses: actions/checkout@v4
- name: Setup PHP ${{ matrix.php-version }} ${{ matrix.thread-safety }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
env:
phpts: ${{ matrix.thread-safety }}
fail-fast: true
- name: Build
run: |
phpize
make
- name: Test
run: make test

0 comments on commit 4bd54a4

Please sign in to comment.