make-check.yml 2.33 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
on:
  push:
    branches:
      - '*'
    tags-ignore:
      - '*'
  pull_request:
    branches:
      - '*'

jobs:
IKEDA Soji's avatar
IKEDA Soji committed
12
  make-check:
13
14
15
16
17
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
18
          #- 'macos-latest' # Crypt::OpenSSL::X509 doesn't support openssl@3
19
20
21
22
23
          - 'ubuntu-latest'
        perl:
          - '5.34'
          - '5.32'
          - '5.30'
IKEDA Soji's avatar
IKEDA Soji committed
24
          #- '5.28'
25
26
          - '5.26'
          - '5.24'
IKEDA Soji's avatar
IKEDA Soji committed
27
          #- '5.22'
IKEDA Soji's avatar
IKEDA Soji committed
28
          #- '5.20' # Fails with ubuntu: See below.
IKEDA Soji's avatar
IKEDA Soji committed
29
          #- '5.18'
30
31
32
33
          - '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
        run: |
IKEDA Soji's avatar
IKEDA Soji committed
42
          brew install automake
IKEDA Soji's avatar
IKEDA Soji committed
43
44
45
46
47
48
49
50
51
52
53
54
55
56
      #XXX This doesn't work, though I don't know why.
      #- name: Workaround for rt.perl.org#116989
      #  if: runner.os == 'Linux' && matrix.perl == '5.20'
      #  # For Crypt::OpenSSL::X509
      #  run: >
      #    echo PERL_CPANM_OPT=--configure-args="CCFLAGS='-Wno-error=unused-function'"
      #    >> $GITHUB_ENV
      - name: Workaround for macOS
        if: runner.os == 'macOS'
        # For Crypt::SMIME
        run: >
          echo "PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig"
          >> $GITHUB_ENV
      - name: Set up Perl
57
58
59
        uses: shogo82148/actions-setup-perl@v1
        with:
          perl-version: ${{ matrix.perl }}
IKEDA Soji's avatar
IKEDA Soji committed
60
61
          install-modules-with: cpanm
          install-modules-args: >
62
            --verbose --no-interactive
IKEDA Soji's avatar
IKEDA Soji committed
63
64
65
66
            --with-develop
            --with-feature=Data::Password --with-feature=ldap
            --with-feature=safe-unicode --with-feature=smime
            --with-feature=soap --with-feature=sqlite
67
68
69
70
71
72
73
      - 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
IKEDA Soji's avatar
IKEDA Soji committed
74
          ./configure --with-defaultdir=`pwd`/default
75
          cd src; make; cd ..
IKEDA Soji's avatar
IKEDA Soji committed
76
          #make check-local TEST_FILES='xt/perltidy.t' || true
77
78
          make check-local
        shell: bash