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 From 57e5a6a5a9cf3b1238769dac425f21ebc65a6d64 Mon Sep 17 00:00:00 2001 From: xXx-caillou-xXx Date: Mon, 11 Jan 2021 21:42:42 +0100 Subject: Add Alpine on php7 in the CI --- .github/workflows/distributions.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/distributions.yml b/.github/workflows/distributions.yml index 362ed96..d36435c 100644 --- a/.github/workflows/distributions.yml +++ b/.github/workflows/distributions.yml @@ -89,3 +89,25 @@ jobs: run: | grep -r . ./src/tests/*/*.out grep -r . ./src/tests/*/*.diff + + alpine: + runs-on: ubuntu-latest + container: alpine:edge + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Remove php8 tests for php7 + run: rm -rf src/tests/*php8*/ + - name: Remove tests failing on alpine for wathever reason + run: rm -rf src/tests/*session*/ src/tests/broken_configuration/ src/tests/*cookie* src/tests/upload_validation/ + - name: Install dependencies + run: apk add php7-dev php7-cgi php7-simplexml php7-xml pcre-dev build-base php7-pear php7-openssl + - 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 From bf6bcc9a90126ac8e98bd46c9af5e62d04ca835f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 23 Jan 2021 17:50:40 +0100 Subject: Allow the Alpine build to fail for now --- .github/workflows/distributions.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/distributions.yml b/.github/workflows/distributions.yml index d36435c..447dcac 100644 --- a/.github/workflows/distributions.yml +++ b/.github/workflows/distributions.yml @@ -103,11 +103,14 @@ jobs: - name: Install dependencies run: apk add php7-dev php7-cgi php7-simplexml php7-xml pcre-dev build-base php7-pear php7-openssl - name: Install pecl + continue-on-error: true run: pecl install vld-beta - name: Build and run the testsuite + continue-on-error: true run: make tests - name: Show logs in case of failure if: ${{ failure() }} + continue-on-error: true run: | grep -r . ./src/tests/*/*.out grep -r . ./src/tests/*/*.diff -- cgit v1.3 From 054dbbb83adc4eb0944a98a17dd7325743ed829c Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 11 Feb 2021 18:30:14 +0100 Subject: Allow failure for now on Alpine Linux See https://bugs.archlinux.org/task/69563#comment196468 for details --- .github/workflows/distributions.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/distributions.yml b/.github/workflows/distributions.yml index 447dcac..3b90fee 100644 --- a/.github/workflows/distributions.yml +++ b/.github/workflows/distributions.yml @@ -76,15 +76,19 @@ jobs: - name: Remove php8 tests for php7 run: rm -rf src/tests/*php8*/ - name: Install dependencies + continue-on-error: true 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 + continue-on-error: true run: pecl install vld-beta - name: Build and run the testsuite + continue-on-error: true run: make tests - name: Show logs in case of failure + continue-on-error: true if: ${{ failure() }} run: | grep -r . ./src/tests/*/*.out -- cgit v1.3