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