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