xref: /freebsd/crypto/openssh/.github/workflows/selfhosted.yml (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
1name: C/C++ CI self-hosted
2
3on:
4  push:
5    branches: [ master, ci ]
6
7jobs:
8  selfhosted:
9    if: github.repository == 'openssh/openssh-portable-selfhosted'
10    runs-on: ${{ matrix.os }}
11    env:
12      TARGET_HOST: ${{ matrix.os }}
13    strategy:
14      fail-fast: false
15      # We use a matrix in two parts: firstly all of the VMs are tested with the
16      # default config.  "os" corresponds to a label associated with the worker.
17      matrix:
18        os:
19          - aix51
20          - ARM64
21          - alpine
22          - bbone
23          - debian-i386
24          - dfly30
25          - dfly48
26          - dfly58
27          - dfly60
28          - fbsd6
29          - fbsd10
30          - fbsd12
31          - fbsd13
32          # - hurd
33          - minix3
34          # - nbsd2
35          - nbsd3
36          - nbsd4
37          - nbsd8
38          - nbsd9
39          - obsd51
40          - obsd67
41          - obsd69
42          - obsd70
43          - obsdsnap
44          - openindiana
45          - openwrt-mips
46          - openwrt-mipsel
47          # - rocky84
48          - sol10
49          - sol11
50          - win10
51        configs:
52          - default
53        # Then we include any extra configs we want to test for specific VMs.
54        include:
55          - { os: ARM64,  configs: pam }
56          - { os: debian-i386, configs: pam }
57          - { os: dfly30, configs: without-openssl}
58          - { os: dfly48, configs: pam }
59          - { os: dfly58, configs: pam }
60          - { os: dfly60, configs: pam }
61          - { os: fbsd6,  configs: pam }
62          - { os: fbsd10, configs: pam }
63          - { os: fbsd12, configs: pam }
64          - { os: fbsd13, configs: pam }
65          - { os: nbsd8,  configs: pam }
66          - { os: nbsd9,  configs: pam }
67          - { os: openindiana, configs: pam }
68          # - { os: rocky84, configs: pam }
69          - { os: sol10,  configs: pam }
70          - { os: sol11,  configs: pam-krb5 }
71          - { os: sol11,  configs: sol64 }
72          # - { os: sol11,  configs: sol64-pam }
73          - { os: win10,  configs: cygwin-release }
74    steps:
75    - uses: actions/checkout@v2
76    - name: autoreconf
77      run: autoreconf
78    - name: shutdown VM if running
79      run: vmshutdown
80    - name: startup VM
81      run: vmstartup
82    - name: configure
83      run: vmrun ./.github/configure.sh ${{ matrix.configs }}
84    - name: save config
85      uses: actions/upload-artifact@v2
86      with:
87        name: ${{ matrix.os }}-${{ matrix.configs }}-config
88        path: config.h
89    - name: make clean
90      run: vmrun make clean
91    - name: make
92      run: vmrun make
93    - name: make tests
94      run: vmrun ./.github/run_test.sh ${{ matrix.configs }}
95      timeout-minutes: 600
96    - name: save logs
97      if: failure()
98      uses: actions/upload-artifact@v2
99      with:
100        name: ${{ matrix.os }}-${{ matrix.configs }}-logs
101        path: |
102          config.h
103          config.log
104          regress/*.log
105          regress/valgrind-out/
106    - name: shutdown VM
107      if: always()
108      run: vmshutdown
109