summaryrefslogtreecommitdiff
path: root/.github/workflows/builds.yml
blob: 46eb6f156ea1ce967efcdba9f36bb1cd978d7e07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: CI for php versions
on: ['pull_request', 'push']

jobs:
  ci:
    runs-on: ubuntu-latest
    strategy:
        matrix:
          container:
            - php:8.0
            - php:7.4
            - php:7.3
            - php:7.2
            - php:7.1
            - php:7.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