wip windows support #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
Windows: | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: cmd | |
strategy: | |
matrix: | |
arch: ["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: | |
arch: ${{ matrix.arch }} | |
version: ${{ matrix.version }} | |
ts: ${{ matrix.ts }} | |
- name: Enable developer command prompt | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.arch }} | |
toolset: ${{ steps.setup-php.outputs.toolset }} | |
- name: Build | |
run: | | |
cd "ext" | |
phpize | |
configure --with-prefix=${{ steps.setup-php.outputs.prefix }} | |
nmake | |
- name: Test | |
run: nmake test TESTS="--show-diff tests" | |
Linux: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
arch: ["amd64", "arm64v8", "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 IMAGE=${{ matrix.arch }}/php --build-arg TAG=${{ matrix.version }}-${{ matrix.type }}-${{ matrix.distro }} --build-arg PSKEL_SKIP_DEBUG=${{ matrix.arch != 'amd64' && '1' || '' }} | |
- name: Run tests | |
run: | | |
docker compose run --rm --entrypoint=/usr/bin/ci --env TEST_EXTENSION=1 dev | |
- name: Test extension with PHP Debug Build | |
if: matrix.arch == 'amd64' | |
run: | | |
docker compose run --rm --entrypoint=/usr/bin/ci --env TEST_EXTENSION_DEBUG=1 dev | |
- name: Test extension with Valgrind | |
if: matrix.arch == 'amd64' | |
run: | | |
docker compose run --rm --entrypoint=/usr/bin/ci --env TEST_EXTENSION_VALGRIND=1 dev | |
- name: Test extension with LLVM Sanitizer (MemorySanitizer) | |
if: matrix.arch == 'amd64' && matrix.distro != 'alpine' | |
run: | | |
docker compose run --rm --entrypoint=/usr/bin/ci --env TEST_EXTENSION_MSAN=1 dev | |
- name: Test extension with LLVM Sanitizer (AddressSanitizer) | |
if: matrix.arch == 'amd64' && matrix.distro != 'alpine' | |
run: | | |
docker compose run --rm --entrypoint=/usr/bin/ci --env TEST_EXTENSION_ASAN=1 dev | |
- name: Test extension with LLVM Sanitizer (UndefinedBehaviorSanitizer) | |
if: matrix.arch == 'amd64' && matrix.distro != 'alpine' | |
run: | | |
docker compose run --rm --entrypoint=/usr/bin/ci --env TEST_EXTENSION_UBSAN=1 dev |