Skip to content

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
Linux:
runs-on: ubuntu-22.04
strategy:
matrix:

Check failure on line 7 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yaml

Invalid workflow file

You have an error in your yaml syntax on line 7
.platform: ["linux/amd64", "linux/arm64/v8", "linux/s390x"]
version: ["8.1", "8.2", "8.3"]
type: ["cli", "zts"]
distro: ["bookworm", "alpine"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: "arm64,s390x"
- name: Setup buildx
uses: docker/setup-buildx-action@v3
- name: Build container
run: |
docker compose build --pull --no-cache --build-arg PLATFORM="${{ matrix.platform }}" --build-arg IMAGE="php" --build-arg TAG="${{ matrix.version }}-${{ matrix.type }}-${{ matrix.distro }}" --build-arg PSKEL_SKIP_BUILD="${{ matrix.platform != 'linux/amd64' && '1' || '' }}"
- name: Run tests
run: |
docker compose run --rm shell test php
- name: Test extension with PHP Debug Build
if: matrix.platform == 'linux/amd64'
run: |
docker compose run --rm shell test debug-php
- name: Test extension with Valgrind
if: matrix.platform == 'linux/amd64'
run: |
docker compose run --rm --env TEST_PHP_ARGS="-m" shell test gcc-valgrind-php
- name: Test extension with LLVM Sanitizer (MemorySanitizer)
if: matrix.platform == 'linux/amd64' && matrix.distro != 'alpine'
run: |
docker compose run --rm --env TEST_PHP_ARGS="--msan" --env CC="/usr/bin/clang" --env CXX="/usr/bin/clang++" --env CFLAGS="-fsanitize=memory -DZEND_TRACK_ARENA_ALLOC" --env CPPFLAGS="-fsanitize=memory -DZEND_TRACK_ARENA_ALLOC" shell test clang-msan-php
- name: Test extension with LLVM Sanitizer (AddressSanitizer)
if: matrix.platform == 'linux/amd64' && matrix.distro != 'alpine'
run: |
docker compose run --rm --env TEST_PHP_ARGS="--asan" --env CC="/usr/bin/clang" --env CXX="/usr/bin/clang++" --env CFLAGS="-fsanitize=address -DZEND_TRACK_ARENA_ALLOC" --env CPPFLAGS="-fsanitize=address -DZEND_TRACK_ARENA_ALLOC" shell test clang-asan-php
- name: Test extension with LLVM Sanitizer (UndefinedBehaviorSanitizer)
if: matrix.platform == 'linux/amd64' && matrix.distro != 'alpine'
run: |
docker compose run --rm --env CC="/usr/bin/clang" --env CXX="/usr/bin/clang++" --env CFLAGS="-fsanitize=undefined -DZEND_TRACK_ARENA_ALLOC" --env CPPFLAGS="-fsanitize=undefined -DZEND_TRACK_ARENA_ALLOC" shell test clang-ubsan-php
# Windows:
# runs-on: windows-2022
# defaults:
# run:
# shell: cmd
# strategy:
# matrix:
# .platform: ["x64"]
# version: ["8.1", "8.2", "8.3"]
# ts: ["nts", "ts"]
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Setup PHP
# id: setup-php
# uses: php/setup-php-sdk@v0.8
# with:
# .platform: ${{ matrix.platform }}
# version: ${{ matrix.version }}
# ts: ${{ matrix.ts }}
# - name: Enable developer command prompt
# uses: ilammy/msvc-dev-cmd@v1
# with:
# .platform: ${{ matrix.platform }}
# toolset: ${{ steps.setup-php.outputs.toolset }}
# - name: phpize
# working-directory: ext
# run: phpize
# - name: configure
# working-directory: ext
# run: configure --enable-SKELETON_NAME --with-prefix=${{ steps.setup-php.outputs.prefix }}
# - name: make
# working-directory: ext
# run: nmake
# - name: test
# working-directory: ext
# run: nmake test TESTS="--show-diff tests"