CI #85
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: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '0 2 * * *' | |
jobs: | |
Library: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
version: ["7.4", "8.0", "8.1", "8.2"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Container | |
uses: docker/build-push-action@v5 | |
with: | |
build-args: | | |
IMAGE=php | |
TAG=${{ matrix.version }}-cli | |
context: . | |
file: ./build/library/Dockerfile | |
load: true | |
tags: "library-docker-${{ matrix.version }}" | |
- name: Test Library | |
run: docker run --rm -v"$(pwd):/workspace:cached" -i library-docker-${{ matrix.version }} | |
Extension: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
arch: ["amd64", "arm64v8", "s390x"] | |
version: ["8.0", "8.1", "8.2"] | |
type: ["cli", "zts"] | |
distro: ["bullseye", "alpine"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: "arm64,s390x" | |
- name: Setup Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Container | |
uses: docker/build-push-action@v5 | |
with: | |
build-args: | | |
IMAGE=${{ matrix.arch }}/php | |
TAG=${{ matrix.version }}-${{ matrix.type }}-${{ matrix.distro }} | |
PSKEL_SKIP_DEBUG=${{ matrix.arch != 'amd64' && '1' || '' }} | |
context: . | |
load: true | |
tags: "pskel-${{ matrix.arch }}-${{ matrix.type }}-${{ matrix.distro }}" | |
- name: Test Extension | |
run: | | |
docker run --env TEST_EXTENSION=1 --rm -i pskel-${{ matrix.arch }}-${{ matrix.type }}-${{ matrix.distro }} | |
- name: Test Extension with Valgrind | |
if: matrix.arch == 'amd64' | |
run: | | |
docker run --env TEST_EXTENSION_VALGRIND=1 --rm -i pskel-${{ matrix.arch }}-${{ matrix.type }}-${{ matrix.distro }} | |
- name: Test Extension with MSAN | |
if: matrix.arch == 'amd64' && matrix.distro != 'alpine' | |
run: | | |
docker run --env TEST_EXTENSION_MSAN=1 --rm -i pskel-${{ matrix.arch }}-${{ matrix.type }}-${{ matrix.distro }} |