|
| 1 | +name: C/C++ CI self-hosted |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [pre-stage, master] |
| 6 | + paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ] |
| 7 | + |
| 8 | +jobs: |
| 9 | + selfhosted: |
| 10 | + if: github.repository == 'rapier1/openssh-portable-selfhosted' |
| 11 | + runs-on: ${{ matrix.host }} |
| 12 | + timeout-minutes: 600 |
| 13 | + env: |
| 14 | + HOST: ${{ matrix.host }} |
| 15 | + TARGET_HOST: ${{ matrix.target }} |
| 16 | + TARGET_CONFIG: ${{ matrix.config }} |
| 17 | + strategy: |
| 18 | + fail-fast: false |
| 19 | + # We use a matrix in two parts: firstly all of the VMs are tested with the |
| 20 | + # default config. "target" corresponds to a label associated with the |
| 21 | + # worker. The default is an ephemeral VM running under libvirt. |
| 22 | + matrix: |
| 23 | + target: |
| 24 | + - alpine |
| 25 | + - centos7 |
| 26 | + - debian-i386 |
| 27 | + - dfly30 |
| 28 | + - dfly48 |
| 29 | + - dfly58 |
| 30 | + - dfly60 |
| 31 | + - dfly62 |
| 32 | + - fbsd10 |
| 33 | + - fbsd12 |
| 34 | + - fbsd13 |
| 35 | + - minix3 |
| 36 | + - nbsd3 |
| 37 | + - nbsd4 |
| 38 | + - nbsd8 |
| 39 | + - nbsd9 |
| 40 | + - obsd51 |
| 41 | + - obsd67 |
| 42 | + - obsd69 |
| 43 | + - obsd70 |
| 44 | + - obsdsnap |
| 45 | + - obsdsnap-i386 |
| 46 | + - openindiana |
| 47 | + - sol10 |
| 48 | + - sol11 |
| 49 | + config: |
| 50 | + - default |
| 51 | + host: |
| 52 | + - libvirt |
| 53 | + include: |
| 54 | + # Then we include extra libvirt test configs. |
| 55 | + - { target: aix51, config: default, host: libvirt } |
| 56 | + - { target: centos7, config: pam, host: libvirt } |
| 57 | + - { target: debian-i386, config: pam, host: libvirt } |
| 58 | + - { target: dfly30, config: without-openssl, host: libvirt} |
| 59 | + - { target: dfly48, config: pam ,host: libvirt } |
| 60 | + - { target: dfly58, config: pam, host: libvirt } |
| 61 | + - { target: dfly60, config: pam, host: libvirt } |
| 62 | + - { target: dfly62, config: pam, host: libvirt } |
| 63 | + - { target: fbsd10, config: pam, host: libvirt } |
| 64 | + - { target: fbsd12, config: pam, host: libvirt } |
| 65 | + - { target: fbsd13, config: pam, host: libvirt } |
| 66 | + - { target: nbsd8, config: pam, host: libvirt } |
| 67 | + - { target: nbsd9, config: pam, host: libvirt } |
| 68 | + - { target: openindiana, config: pam, host: libvirt } |
| 69 | + - { target: sol10, config: pam, host: libvirt } |
| 70 | + - { target: sol11, config: pam-krb5, host: libvirt } |
| 71 | + - { target: sol11, config: sol64, host: libvirt } |
| 72 | + # VMs with persistent disks that have their own runner. |
| 73 | + - { target: win10, config: default, host: win10 } |
| 74 | + - { target: win10, config: cygwin-release, host: win10 } |
| 75 | + # Physical hosts, with either native runners or remote via ssh. |
| 76 | + - { target: ARM, config: default, host: ARM } |
| 77 | + - { target: ARM64, config: default, host: ARM64 } |
| 78 | + - { target: ARM64, config: pam, host: ARM64 } |
| 79 | + - { target: debian-riscv64, config: default, host: debian-riscv64 } |
| 80 | + - { target: openwrt-mips, config: default, host: openwrt-mips } |
| 81 | + - { target: openwrt-mipsel, config: default, host: openwrt-mipsel } |
| 82 | + steps: |
| 83 | + - name: shutdown VM if running |
| 84 | + run: vmshutdown |
| 85 | + working-directory: ${{ runner.temp }} |
| 86 | + - uses: actions/checkout@main |
| 87 | + - name: autoreconf |
| 88 | + run: autoreconf |
| 89 | + - name: startup VM |
| 90 | + run: vmstartup |
| 91 | + working-directory: ${{ runner.temp }} |
| 92 | + - name: configure |
| 93 | + run: vmrun ./.github/configure.sh ${{ matrix.config }} |
| 94 | + - name: save config |
| 95 | + uses: actions/upload-artifact@main |
| 96 | + with: |
| 97 | + name: ${{ matrix.target }}-${{ matrix.config }}-config |
| 98 | + path: config.h |
| 99 | + - name: make clean |
| 100 | + run: vmrun make clean |
| 101 | + - name: make |
| 102 | + run: vmrun make |
| 103 | + - name: make tests |
| 104 | + run: vmrun ./.github/run_test.sh ${{ matrix.config }} |
| 105 | + timeout-minutes: 600 |
| 106 | + - name: save logs |
| 107 | + if: failure() |
| 108 | + uses: actions/upload-artifact@main |
| 109 | + with: |
| 110 | + name: ${{ matrix.target }}-${{ matrix.config }}-logs |
| 111 | + path: | |
| 112 | + config.h |
| 113 | + config.log |
| 114 | + regress/*.log |
| 115 | + regress/log/* |
| 116 | + regress/valgrind-out/ |
| 117 | + - name: shutdown VM |
| 118 | + if: always() |
| 119 | + run: vmshutdown |
| 120 | + working-directory: ${{ runner.temp }} |
0 commit comments