diff options
| author | Julien Voisin | 2021-01-10 11:26:56 +0000 |
|---|---|---|
| committer | GitHub | 2021-01-10 12:26:56 +0100 |
| commit | 1f0a382152933feec3184f0e8dc00ae4b89cd743 (patch) | |
| tree | da4e6acedafbfd2a2f094fc93c09ed79b7e49ac6 /.github | |
| parent | 24adfe998dd35229997923ecad0df11903bbc252 (diff) | |
Use github action for the CI (#373)
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/builds.yml | 32 | ||||
| -rw-r--r-- | .github/workflows/distributions.yml | 91 |
2 files changed, 123 insertions, 0 deletions
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 @@ | |||
| 1 | name: CI for php versions | ||
| 2 | on: ['pull_request', 'push'] | ||
| 3 | |||
| 4 | jobs: | ||
| 5 | ci: | ||
| 6 | runs-on: ubuntu-latest | ||
| 7 | strategy: | ||
| 8 | matrix: | ||
| 9 | container: | ||
| 10 | - php:7.0 | ||
| 11 | - php:7.1 | ||
| 12 | - php:7.2 | ||
| 13 | - php:7.3 | ||
| 14 | - php:7.4 | ||
| 15 | - php:8.0 | ||
| 16 | container: ${{ matrix.container }} | ||
| 17 | steps: | ||
| 18 | - name: Checkout code | ||
| 19 | uses: actions/checkout@v2 | ||
| 20 | - name: Install pecl | ||
| 21 | if: startsWith(matrix.container, 'php:7') | ||
| 22 | run: pecl install vld-beta | ||
| 23 | - name: Remove php8 tests on php7 | ||
| 24 | if: startsWith(matrix.container, 'php:7') | ||
| 25 | run: rm -rf src/tests/*php8*/ | ||
| 26 | - name: Build and run the testsuite | ||
| 27 | run: make tests | ||
| 28 | - name: Show logs in case of failure | ||
| 29 | if: ${{ failure() }} | ||
| 30 | run: | | ||
| 31 | grep -r . ./src/tests/*/*.out | ||
| 32 | 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 @@ | |||
| 1 | name: CI for linux distributions | ||
| 2 | on: ['pull_request', 'push'] | ||
| 3 | |||
| 4 | jobs: | ||
| 5 | debian: | ||
| 6 | runs-on: ubuntu-latest | ||
| 7 | container: debian:stable | ||
| 8 | steps: | ||
| 9 | - name: Checkout code | ||
| 10 | uses: actions/checkout@v2 | ||
| 11 | - name: Remove php8 tests for php7 | ||
| 12 | run: rm -rf src/tests/*php8*/ | ||
| 13 | - name: Install dependencies | ||
| 14 | run: | | ||
| 15 | apt update | ||
| 16 | DEBIAN_FRONTEND=noninteractive apt install -y php-dev php-pear | ||
| 17 | - name: Install pecl | ||
| 18 | run: pecl install vld-beta | ||
| 19 | - name: Build and run the testsuite | ||
| 20 | run: make tests | ||
| 21 | - name: Show logs in case of failure | ||
| 22 | if: ${{ failure() }} | ||
| 23 | run: | | ||
| 24 | grep -r . ./src/tests/*/*.out | ||
| 25 | grep -r . ./src/tests/*/*.diff | ||
| 26 | |||
| 27 | fedora: | ||
| 28 | runs-on: ubuntu-latest | ||
| 29 | container: fedora:latest | ||
| 30 | steps: | ||
| 31 | - name: Checkout code | ||
| 32 | uses: actions/checkout@v2 | ||
| 33 | - name: Remove php8 tests for php7 | ||
| 34 | run: rm -rf src/tests/*php8*/ | ||
| 35 | - name: Install dependencies | ||
| 36 | run: | | ||
| 37 | dnf install -y php-devel php-pear make | ||
| 38 | - name: Install pecl | ||
| 39 | run: pecl install vld-beta | ||
| 40 | - name: Build and run the testsuite | ||
| 41 | run: make tests | ||
| 42 | - name: Show logs in case of failure | ||
| 43 | if: ${{ failure() }} | ||
| 44 | run: | | ||
| 45 | grep -r . ./src/tests/*/*.out | ||
| 46 | grep -r . ./src/tests/*/*.diff | ||
| 47 | |||
| 48 | ubuntu: | ||
| 49 | runs-on: ubuntu-latest | ||
| 50 | container: ubuntu:latest | ||
| 51 | steps: | ||
| 52 | - name: Checkout code | ||
| 53 | uses: actions/checkout@v2 | ||
| 54 | - name: Remove php8 tests for php7 | ||
| 55 | run: rm -rf src/tests/*php8*/ | ||
| 56 | - name: Install dependencies | ||
| 57 | run: | | ||
| 58 | apt update | ||
| 59 | DEBIAN_FRONTEND=noninteractive apt install -y php-dev | ||
| 60 | - name: Install pecl | ||
| 61 | run: pecl install vld-beta | ||
| 62 | - name: Build and run the testsuite | ||
| 63 | run: make tests | ||
| 64 | - name: Show logs in case of failure | ||
| 65 | if: ${{ failure() }} | ||
| 66 | run: | | ||
| 67 | grep -r . ./src/tests/*/*.out | ||
| 68 | grep -r . ./src/tests/*/*.diff | ||
| 69 | |||
| 70 | archlinux: | ||
| 71 | runs-on: ubuntu-latest | ||
| 72 | container: archlinux:latest | ||
| 73 | steps: | ||
| 74 | - name: Checkout code | ||
| 75 | uses: actions/checkout@v2 | ||
| 76 | - name: Remove php8 tests for php7 | ||
| 77 | run: rm -rf src/tests/*php8*/ | ||
| 78 | - name: Install dependencies | ||
| 79 | run: | | ||
| 80 | pacman --sync --refresh --noconfirm --quiet php wget autoconf gcc make | ||
| 81 | wget https://pear.php.net/go-pear.phar | ||
| 82 | php go-pear.phar | ||
| 83 | - name: Install pecl | ||
| 84 | run: pecl install vld-beta | ||
| 85 | - name: Build and run the testsuite | ||
| 86 | run: make tests | ||
| 87 | - name: Show logs in case of failure | ||
| 88 | if: ${{ failure() }} | ||
| 89 | run: | | ||
| 90 | grep -r . ./src/tests/*/*.out | ||
| 91 | grep -r . ./src/tests/*/*.diff | ||
