1name: C/C++ CI 2 3on: 4 push: 5 paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/c-cpp.yaml' ] 6 pull_request: 7 paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/c-cpp.yaml' ] 8 9jobs: 10 ci: 11 name: "${{ matrix.target }} ${{ matrix.config }}" 12 if: github.repository != 'openssh/openssh-portable-selfhosted' 13 strategy: 14 fail-fast: false 15 matrix: 16 # First we test all OSes in the default configuration. 17 target: 18 - ubuntu-20.04 19 - ubuntu-22.04 20 - macos-12 21 - macos-13 22 - macos-14 23 - windows-2019 24 - windows-2022 25 config: [default] 26 # Then we include any extra configs we want to test for specific VMs. 27 # Valgrind slows things down quite a bit, so start them first. 28 include: 29 - { target: windows-2019, config: cygwin-release } 30 - { target: windows-2022, config: cygwin-release } 31 - { target: ubuntu-20.04, config: valgrind-1 } 32 - { target: ubuntu-20.04, config: valgrind-2 } 33 - { target: ubuntu-20.04, config: valgrind-3 } 34 - { target: ubuntu-20.04, config: valgrind-4 } 35 - { target: ubuntu-20.04, config: valgrind-unit } 36 - { target: ubuntu-20.04, config: c89 } 37 - { target: ubuntu-20.04, config: clang-6.0 } 38 - { target: ubuntu-20.04, config: clang-8 } 39 - { target: ubuntu-20.04, config: clang-9 } 40 - { target: ubuntu-20.04, config: clang-10 } 41 - { target: ubuntu-20.04, config: clang-11 } 42 - { target: ubuntu-20.04, config: clang-12-Werror } 43 - { target: ubuntu-20.04, config: clang-sanitize-address } 44 - { target: ubuntu-20.04, config: clang-sanitize-undefined } 45 - { target: ubuntu-20.04, config: gcc-sanitize-address } 46 - { target: ubuntu-20.04, config: gcc-sanitize-undefined } 47 - { target: ubuntu-20.04, config: gcc-7 } 48 - { target: ubuntu-20.04, config: gcc-8 } 49 - { target: ubuntu-20.04, config: gcc-10 } 50 - { target: ubuntu-22.04, config: gcc-11-Werror } 51 - { target: ubuntu-22.04, config: gcc-12-Werror } 52 - { target: ubuntu-20.04, config: pam } 53 - { target: ubuntu-20.04, config: kitchensink } 54 - { target: ubuntu-22.04, config: hardenedmalloc } 55 - { target: ubuntu-20.04, config: tcmalloc } 56 - { target: ubuntu-20.04, config: musl } 57 - { target: ubuntu-latest, config: boringssl } 58 - { target: ubuntu-latest, config: libressl-master } 59 - { target: ubuntu-latest, config: libressl-3.2.6 } 60 - { target: ubuntu-latest, config: libressl-3.3.6 } 61 - { target: ubuntu-latest, config: libressl-3.4.3 } 62 - { target: ubuntu-latest, config: libressl-3.5.3 } 63 - { target: ubuntu-latest, config: libressl-3.6.1 } 64 - { target: ubuntu-latest, config: libressl-3.7.2 } 65 - { target: ubuntu-latest, config: libressl-3.8.4 } 66 - { target: ubuntu-latest, config: libressl-3.9.1 } 67 - { target: ubuntu-latest, config: openssl-master } 68 - { target: ubuntu-latest, config: openssl-noec } 69 - { target: ubuntu-latest, config: openssl-1.1.1 } 70 - { target: ubuntu-latest, config: openssl-1.1.1t } 71 - { target: ubuntu-latest, config: openssl-1.1.1w } 72 - { target: ubuntu-latest, config: openssl-3.0.0 } 73 - { target: ubuntu-latest, config: openssl-3.0.13 } 74 - { target: ubuntu-latest, config: openssl-3.1.0 } 75 - { target: ubuntu-latest, config: openssl-3.1.5 } 76 - { target: ubuntu-latest, config: openssl-3.2.1 } 77 - { target: ubuntu-latest, config: openssl-3.3.0 } 78 - { target: ubuntu-latest, config: openssl-1.1.1_stable } 79 - { target: ubuntu-latest, config: openssl-3.0 } # stable branch 80 - { target: ubuntu-latest, config: openssl-3.1 } # stable branch 81 - { target: ubuntu-latest, config: openssl-3.2 } # stable branch 82 - { target: ubuntu-latest, config: openssl-3.3 } # stable branch 83 - { target: ubuntu-latest, config: putty-0.71 } 84 - { target: ubuntu-latest, config: putty-0.72 } 85 - { target: ubuntu-latest, config: putty-0.73 } 86 - { target: ubuntu-latest, config: putty-0.74 } 87 - { target: ubuntu-latest, config: putty-0.75 } 88 - { target: ubuntu-latest, config: putty-0.76 } 89 - { target: ubuntu-latest, config: putty-0.77 } 90 - { target: ubuntu-latest, config: putty-0.78 } 91 - { target: ubuntu-latest, config: putty-0.79 } 92 - { target: ubuntu-latest, config: putty-0.80 } 93 - { target: ubuntu-latest, config: putty-snapshot } 94 - { target: ubuntu-latest, config: zlib-develop } 95 - { target: ubuntu-22.04, config: pam } 96 - { target: ubuntu-22.04, config: krb5 } 97 - { target: ubuntu-22.04, config: heimdal } 98 - { target: ubuntu-22.04, config: libedit } 99 - { target: ubuntu-22.04, config: sk } 100 - { target: ubuntu-22.04, config: selinux } 101 - { target: ubuntu-22.04, config: kitchensink } 102 - { target: ubuntu-22.04, config: without-openssl } 103 - { target: macos-12, config: pam } 104 - { target: macos-13, config: pam } 105 - { target: macos-14, config: pam } 106 runs-on: ${{ matrix.target }} 107 steps: 108 - name: set cygwin git params 109 if: ${{ startsWith(matrix.target, 'windows') }} 110 run: git config --global core.autocrlf input 111 - name: install cygwin 112 if: ${{ startsWith(matrix.target, 'windows') }} 113 uses: cygwin/cygwin-install-action@master 114 - uses: actions/checkout@main 115 - name: setup CI system 116 run: sh ./.github/setup_ci.sh ${{ matrix.config }} 117 - name: autoreconf 118 run: sh -c autoreconf 119 - name: configure 120 run: sh ./.github/configure.sh ${{ matrix.config }} 121 - name: save config 122 uses: actions/upload-artifact@main 123 with: 124 name: ${{ matrix.target }}-${{ matrix.config }}-config 125 path: config.h 126 - name: make clean 127 run: make clean 128 - name: make 129 run: make 130 - name: make tests 131 run: sh ./.github/run_test.sh ${{ matrix.config }} 132 env: 133 TEST_SSH_UNSAFE_PERMISSIONS: 1 134 TEST_SSH_HOSTBASED_AUTH: yes 135 - name: save logs 136 if: failure() 137 uses: actions/upload-artifact@main 138 with: 139 name: ${{ matrix.target }}-${{ matrix.config }}-logs 140 path: | 141 config.h 142 config.log 143 regress/*.log 144 regress/valgrind-out/ 145 regress/asan.log.* 146 regress/msan.log.* 147 regress/log/* 148