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