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