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