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