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