make-check.yml 1.96 KB
Newer Older
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
33
on:
  push:
    branches:
      - '*'
    tags-ignore:
      - '*'
  pull_request:
    branches:
      - '*'

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          #- 'macos-latest'
          - 'ubuntu-latest'
        perl:
          - '5.34'
          - '5.32'
          - '5.30'
          - '5.28'
          - '5.26'
          - '5.24'
          - '5.22'
          - '5.20'
          - '5.18'
          - '5.16'
    name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2
IKEDA Soji's avatar
IKEDA Soji committed
34
35
      - name: Install dependencies for Linux
        if: runner.os == 'Linux'
36
37
38
        run: |
          sudo apt update -y
          sudo apt install -y gettext 
IKEDA Soji's avatar
IKEDA Soji committed
39
40
      - name: Install dependencies for macOS
        if: runner.os == 'macOS'
41
42
43
44
45
46
47
48
        run: |
          brew install gettext 
          brew link --force gettext 
      - name: Set up perl
        uses: shogo82148/actions-setup-perl@v1
        with:
          perl-version: ${{ matrix.perl }}
      - run: perl -V
IKEDA Soji's avatar
IKEDA Soji committed
49
50
      - name: Install Perl dependencies (workaround for rt.perl.org#116989) 
        if: runner.os == 'Linux' && matrix.perl == '5.20'
IKEDA Soji's avatar
IKEDA Soji committed
51
52
53
        run: >
          cpanm Crypt::OpenSSL::X509
          --configure-args="CCFLAGS='-Wno-error=unused-function'"
54
      - name: Install Perl dependencies
IKEDA Soji's avatar
IKEDA Soji committed
55
56
57
58
59
        run: >
          cpanm --installdeps --notest --with-develop
          --with-feature=Data::Password --with-feature=ldap
          --with-feature=safe-unicode --with-feature=smime --with-feature=soap
          --with-feature=sqlite .
60
61
62
63
64
65
66
67
68
69
70
71
      - name: Run tests
        run: |
          if [ "$(uname -s)" = "Linux" ]; then
            # Workaround to avoid reference to older libcrypto by perl binary
            export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
          fi
          autoreconf -i
          ./configure
          cd src; make; cd ..
          make check-local TEST_FILES='xt/perltidy.t' || true
          make check-local
        shell: bash