19499f2bbSStefan Schindlername: C/C++ CI
29499f2bbSStefan Schindler
39499f2bbSStefan Schindleron:
49499f2bbSStefan Schindler  push:
59499f2bbSStefan Schindler    branches: [ master, ci ]
69499f2bbSStefan Schindler  pull_request:
79499f2bbSStefan Schindler    branches: [ master ]
89499f2bbSStefan Schindler
99499f2bbSStefan Schindlerjobs:
104582612eSDarren Tucker  ci:
11f0313665SDarren Tucker    if: github.repository != 'openssh/openssh-portable-selfhosted'
12c3366443SDarren Tucker    strategy:
1309f4b846SDarren Tucker      fail-fast: false
14c3366443SDarren Tucker      matrix:
15ffcdd3d9SDarren Tucker        # First we test all OSes in the default configuration.
16c039a6bfSDarren Tucker        os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04, macos-10.15, macos-11.0]
17ffcdd3d9SDarren Tucker        configs: [default]
1809f4b846SDarren Tucker        # Then we include any extra configs we want to test for specific VMs.
19ffcdd3d9SDarren Tucker        # Valgrind slows things down quite a bit, so start them first.
2009f4b846SDarren Tucker        include:
21ffcdd3d9SDarren Tucker          - { os: ubuntu-20.04, configs: valgrind-1 }
22ffcdd3d9SDarren Tucker          - { os: ubuntu-20.04, configs: valgrind-2 }
233674e33fSDarren Tucker          - { os: ubuntu-20.04, configs: valgrind-3 }
243674e33fSDarren Tucker          - { os: ubuntu-20.04, configs: valgrind-4 }
2519e53446SDarren Tucker          - { os: ubuntu-20.04, configs: valgrind-unit }
2629e194a7SDarren Tucker          - { os: ubuntu-20.04, configs: c89 }
27ffcdd3d9SDarren Tucker          - { os: ubuntu-20.04, configs: pam }
2809f4b846SDarren Tucker          - { os: ubuntu-20.04, configs: kitchensink }
2909f4b846SDarren Tucker          - { os: ubuntu-20.04, configs: hardenedmalloc }
309bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: libressl-master }
319bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: libressl-2.2.9 }
329bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: libressl-2.8.3 }
339bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: libressl-3.0.2 }
349bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: libressl-3.2.5 }
359bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: openssl-master }
369bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: openssl-noec }
379bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: openssl-1.0.1 }
389bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: openssl-1.0.1u }
399bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: openssl-1.0.2u }
40*1b8108ebSDarren Tucker          - { os: ubuntu-latest, configs: openssl-1.1.0h }
419bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: openssl-1.1.1 }
429bc20efdSDarren Tucker          - { os: ubuntu-latest, configs: openssl-1.1.1k }
43ffcdd3d9SDarren Tucker          - { os: ubuntu-18.04, configs: pam }
4409f4b846SDarren Tucker          - { os: ubuntu-18.04, configs: kerberos5 }
4509f4b846SDarren Tucker          - { os: ubuntu-18.04, configs: libedit }
4609f4b846SDarren Tucker          - { os: ubuntu-18.04, configs: sk }
4709f4b846SDarren Tucker          - { os: ubuntu-18.04, configs: selinux }
4809f4b846SDarren Tucker          - { os: ubuntu-18.04, configs: kitchensink }
4909f4b846SDarren Tucker          - { os: ubuntu-18.04, configs: without-openssl }
50ffcdd3d9SDarren Tucker          - { os: ubuntu-16.04, configs: pam }
514653116cSDarren Tucker          - { os: ubuntu-16.04, configs: kitchensink }
52ffcdd3d9SDarren Tucker          - { os: macos-10.15,  configs: pam }
53c039a6bfSDarren Tucker          - { os: macos-11.0,   configs: pam }
5409f4b846SDarren Tucker    runs-on: ${{ matrix.os }}
55c3366443SDarren Tucker    steps:
56c3366443SDarren Tucker    - uses: actions/checkout@v2
57c3366443SDarren Tucker    - name: setup CI system
58c3366443SDarren Tucker      run: ./.github/setup_ci.sh ${{ matrix.configs }}
59c3366443SDarren Tucker    - name: autoreconf
60c3366443SDarren Tucker      run: autoreconf
61c3366443SDarren Tucker    - name: configure
6209f4b846SDarren Tucker      run: ./.github/configure.sh ${{ matrix.configs }}
63c3366443SDarren Tucker    - name: make
643d59e88cSDarren Tucker      run: make -j2
65c3366443SDarren Tucker    - name: make tests
66c3366443SDarren Tucker      run: ./.github/run_test.sh ${{ matrix.configs }}
67c3366443SDarren Tucker      env:
68c3366443SDarren Tucker        TEST_SSH_UNSAFE_PERMISSIONS: 1
697cd262c1SDarren Tucker    - name: save logs
7076c0be0fSDarren Tucker      if: failure()
7176c0be0fSDarren Tucker      uses: actions/upload-artifact@v2
7276c0be0fSDarren Tucker      with:
737cd262c1SDarren Tucker        name: ${{ matrix.os }}-${{ matrix.configs }}-logs
74bb0b9bf4SDarren Tucker        path: |
757cd262c1SDarren Tucker          config.h
767cd262c1SDarren Tucker          config.log
77bb0b9bf4SDarren Tucker          regress/*.log
78bb0b9bf4SDarren Tucker          regress/valgrind-out/
79