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