xref: /freebsd/crypto/openssh/.github/workflows/c-cpp.yml (revision 994297b01b98816bea1abf45ae4bac1bc69ee7a0)
1name: C/C++ CI
2
3on:
4  push:
5    branches: [ master, ci ]
6  pull_request:
7    branches: [ master ]
8
9jobs:
10  ci:
11    if: github.repository != 'openssh/openssh-portable-selfhosted'
12    strategy:
13      fail-fast: false
14      matrix:
15        # First we test all OSes in the default configuration.
16        os: [ubuntu-20.04, ubuntu-18.04, macos-10.15, macos-11.0]
17        configs: [default]
18        # Then we include any extra configs we want to test for specific VMs.
19        # Valgrind slows things down quite a bit, so start them first.
20        include:
21          - { os: ubuntu-20.04, configs: valgrind-1 }
22          - { os: ubuntu-20.04, configs: valgrind-2 }
23          - { os: ubuntu-20.04, configs: valgrind-3 }
24          - { os: ubuntu-20.04, configs: valgrind-4 }
25          - { os: ubuntu-20.04, configs: valgrind-unit }
26          - { os: ubuntu-20.04, configs: c89 }
27          - { os: ubuntu-20.04, configs: pam }
28          - { os: ubuntu-20.04, configs: kitchensink }
29          - { os: ubuntu-20.04, configs: hardenedmalloc }
30          - { os: ubuntu-latest, configs: libressl-master }
31          - { os: ubuntu-latest, configs: libressl-2.2.9 }
32          - { os: ubuntu-latest, configs: libressl-2.8.3 }
33          - { os: ubuntu-latest, configs: libressl-3.0.2 }
34          - { os: ubuntu-latest, configs: libressl-3.2.6 }
35          - { os: ubuntu-latest, configs: libressl-3.3.4 }
36          - { os: ubuntu-latest, configs: libressl-3.4.0 }
37          - { os: ubuntu-latest, configs: openssl-master }
38          - { os: ubuntu-latest, configs: openssl-noec }
39          - { os: ubuntu-latest, configs: openssl-1.0.1 }
40          - { os: ubuntu-latest, configs: openssl-1.0.1u }
41          - { os: ubuntu-latest, configs: openssl-1.0.2u }
42          - { os: ubuntu-latest, configs: openssl-1.1.0h }
43          - { os: ubuntu-latest, configs: openssl-1.1.1 }
44          - { os: ubuntu-latest, configs: openssl-1.1.1k }
45          - { os: ubuntu-latest, configs: openssl-3.0.0 }
46          - { os: ubuntu-latest, configs: openssl-1.1.1_stable } # stable branch
47          - { os: ubuntu-latest, configs: openssl-3.0 }          # stable branch
48          - { os: ubuntu-18.04, configs: pam }
49          - { os: ubuntu-18.04, configs: kerberos5 }
50          - { os: ubuntu-18.04, configs: libedit }
51          - { os: ubuntu-18.04, configs: sk }
52          - { os: ubuntu-18.04, configs: selinux }
53          - { os: ubuntu-18.04, configs: kitchensink }
54          - { os: ubuntu-18.04, configs: without-openssl }
55          - { os: macos-10.15,  configs: pam }
56          - { os: macos-11.0,   configs: pam }
57    runs-on: ${{ matrix.os }}
58    steps:
59    - uses: actions/checkout@v2
60    - name: setup CI system
61      run: ./.github/setup_ci.sh ${{ matrix.configs }}
62    - name: autoreconf
63      run: autoreconf
64    - name: configure
65      run: ./.github/configure.sh ${{ matrix.configs }}
66    - name: make
67      run: make -j2
68    - name: make tests
69      run: ./.github/run_test.sh ${{ matrix.configs }}
70      env:
71        TEST_SSH_UNSAFE_PERMISSIONS: 1
72    - name: save logs
73      if: failure()
74      uses: actions/upload-artifact@v2
75      with:
76        name: ${{ matrix.os }}-${{ matrix.configs }}-logs
77        path: |
78          config.h
79          config.log
80          regress/*.log
81          regress/valgrind-out/
82