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          - ARM64
20          - bbone
21          - dfly30
22          - dfly48
23          - dfly58
24          - dfly60
25          - fbsd6
26          - fbsd10
27          - fbsd12
28          - fbsd13
29          - hurd
30          - minix3
31          # - nbsd2
32          - nbsd3
33          - nbsd4
34          - nbsd8
35          - nbsd9
36          - obsd51
37          - obsd67
38          - obsd68
39          - obsd69
40          - obsdsnap
41          - openindiana
42          # - rocky84
43          - sol10
44          - sol11
45          - win10
46        configs:
47          - default
48        # Then we include any extra configs we want to test for specific VMs.
49        include:
50          - { os: ARM64,  configs: pam }
51          - { os: dfly30, configs: without-openssl}
52          - { os: dfly48, configs: pam }
53          - { os: dfly58, configs: pam }
54          - { os: dfly60, configs: pam }
55          - { os: fbsd6,  configs: pam }
56          - { os: fbsd10, configs: pam }
57          - { os: fbsd12, configs: pam }
58          - { os: fbsd13, configs: pam }
59          - { os: nbsd8,  configs: pam }
60          - { os: nbsd9,  configs: pam }
61          - { os: openindiana, configs: pam }
62          # - { os: rocky84, configs: pam }
63          - { os: sol10,  configs: pam }
64          - { os: sol11,  configs: pam-krb5 }
65          - { os: sol11,  configs: sol64 }
66          # - { os: sol11,  configs: sol64-pam }
67    steps:
68    - uses: actions/checkout@v2
69    - name: autoreconf
70      run: autoreconf
71    - name: shutdown VM if running
72      run: vmshutdown
73    - name: startup VM
74      run: vmstartup
75    - name: configure
76      run: vmrun ./.github/configure.sh ${{ matrix.configs }}
77    - name: make
78      run: vmrun make
79    - name: make tests
80      run: vmrun ./.github/run_test.sh ${{ matrix.configs }}
81    - name: save logs
82      if: failure()
83      uses: actions/upload-artifact@v2
84      with:
85        name: ${{ matrix.os }}-${{ matrix.configs }}-logs
86        path: |
87          config.h
88          config.log
89          regress/*.log
90          regress/valgrind-out/
91    - name: shutdown VM
92      if: always()
93      run: vmshutdown
94