From 1f0a382152933feec3184f0e8dc00ae4b89cd743 Mon Sep 17 00:00:00 2001 From: Julien Voisin Date: Sun, 10 Jan 2021 11:26:56 +0000 Subject: Use github action for the CI (#373) --- .github/workflows/builds.yml | 32 +++++++++++++ .github/workflows/distributions.yml | 91 +++++++++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 .github/workflows/builds.yml create mode 100644 .github/workflows/distributions.yml (limited to '.github/workflows') diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml new file mode 100644 index 0000000..67c1135 --- /dev/null +++ b/.github/workflows/builds.yml @@ -0,0 +1,32 @@ +name: CI for php versions +on: ['pull_request', 'push'] + +jobs: + ci: + runs-on: ubuntu-latest + strategy: + matrix: + container: + - php:7.0 + - php:7.1 + - php:7.2 + - php:7.3 + - php:7.4 + - php:8.0 + container: ${{ matrix.container }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Install pecl + if: startsWith(matrix.container, 'php:7') + run: pecl install vld-beta + - name: Remove php8 tests on php7 + if: startsWith(matrix.container, 'php:7') + run: rm -rf src/tests/*php8*/ + - name: Build and run the testsuite + run: make tests + - name: Show logs in case of failure + if: ${{ failure() }} + run: | + grep -r . ./src/tests/*/*.out + grep -r . ./src/tests/*/*.diff diff --git a/.github/workflows/distributions.yml b/.github/workflows/distributions.yml new file mode 100644 index 0000000..362ed96 --- /dev/null +++ b/.github/workflows/distributions.yml @@ -0,0 +1,91 @@ +name: CI for linux distributions +on: ['pull_request', 'push'] + +jobs: + debian: + runs-on: ubuntu-latest + container: debian:stable + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Remove php8 tests for php7 + run: rm -rf src/tests/*php8*/ + - name: Install dependencies + run: | + apt update + DEBIAN_FRONTEND=noninteractive apt install -y php-dev php-pear + - name: Install pecl + run: pecl install vld-beta + - name: Build and run the testsuite + run: make tests + - name: Show logs in case of failure + if: ${{ failure() }} + run: | + grep -r . ./src/tests/*/*.out + grep -r . ./src/tests/*/*.diff + + fedora: + runs-on: ubuntu-latest + container: fedora:latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Remove php8 tests for php7 + run: rm -rf src/tests/*php8*/ + - name: Install dependencies + run: | + dnf install -y php-devel php-pear make + - name: Install pecl + run: pecl install vld-beta + - name: Build and run the testsuite + run: make tests + - name: Show logs in case of failure + if: ${{ failure() }} + run: | + grep -r . ./src/tests/*/*.out + grep -r . ./src/tests/*/*.diff + + ubuntu: + runs-on: ubuntu-latest + container: ubuntu:latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Remove php8 tests for php7 + run: rm -rf src/tests/*php8*/ + - name: Install dependencies + run: | + apt update + DEBIAN_FRONTEND=noninteractive apt install -y php-dev + - name: Install pecl + run: pecl install vld-beta + - name: Build and run the testsuite + run: make tests + - name: Show logs in case of failure + if: ${{ failure() }} + run: | + grep -r . ./src/tests/*/*.out + grep -r . ./src/tests/*/*.diff + + archlinux: + runs-on: ubuntu-latest + container: archlinux:latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Remove php8 tests for php7 + run: rm -rf src/tests/*php8*/ + - name: Install dependencies + run: | + pacman --sync --refresh --noconfirm --quiet php wget autoconf gcc make + wget https://pear.php.net/go-pear.phar + php go-pear.phar + - name: Install pecl + run: pecl install vld-beta + - name: Build and run the testsuite + run: make tests + - name: Show logs in case of failure + if: ${{ failure() }} + run: | + grep -r . ./src/tests/*/*.out + grep -r . ./src/tests/*/*.diff -- cgit v1.3