name: CI

on:
  push:
  pull_request:

jobs:
  unix-build:
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
          - os: macOS-latest
            openssl: openssl@1.1
          - os: macOS-latest
            openssl: openssl@3

    runs-on: ${{matrix.os}}

    env:
      PKG_CONFIG_PATH: /usr/local/opt/${{matrix.openssl}}/lib/pkgconfig

    steps:
    - uses: actions/checkout@v3

    - name: Install apt dependencies (Linux)
      if: matrix.os == 'ubuntu-latest'
      run: sudo apt-get install -y libssl-dev opensc softhsm

    - name: Install brew dependencies (macOS)
      if: matrix.os == 'macOS-latest'
      run: |
        brew install automake ${{matrix.openssl}} opensc softhsm
        echo "/usr/local/opt/openssl/bin" >> $GITHUB_PATH

    - name: System information
      run: |
        openssl version -a
        echo "PATH=$PATH"

    - name: Bootstrap
      run: autoreconf --verbose --install --force

    - name: Configure
      run: ./configure

    - name: Build
      run: make

    - name: Test
      timeout-minutes: 5
      run: make check

    - name: Results of failed tests
      if: failure()
      run: cat tests/test-suite.log || true

name: CI

on:
  push:
  pull_request:

jobs:
  unix-build:
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-22.04
          - os: ubuntu-20.04
          - os: ubuntu-18.04
          - os: macOS-latest
            openssl: openssl@3
          - os: macOS-latest
            openssl: openssl@1.1

    runs-on: ${{matrix.os}}

    env:
      PKG_CONFIG_PATH: /usr/local/opt/${{matrix.openssl}}/lib/pkgconfig

    steps:
    - uses: actions/checkout@v3

    - name: Install apt dependencies (Linux)
      if: runner.os == 'Linux'
      run: sudo apt-get install -y libssl-dev opensc softhsm

    - name: Install brew dependencies (macOS)
      if: runner.os == 'macOS'
      run: |
        brew install automake ${{matrix.openssl}} opensc softhsm
        echo "/usr/local/opt/openssl/bin" >> $GITHUB_PATH

    - name: System information
      run: |
        openssl version -a
        echo "PATH=$PATH"

    - name: Bootstrap
      run: autoreconf --verbose --install --force

    - name: Configure
      run: ./configure

    - name: Build
      run: make

    - name: Test
      timeout-minutes: 5
      run: make check

    - name: Results of failed tests
      if: failure()
      run: cat tests/test-suite.log || true

Test on different versions of Ubuntu
Test on different versions of Ubuntu
