1name: Upstream 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      matrix:
16        os: [ obsdsnap, obsdsnap-i386, obsd69, obsd68 ]
17        configs: [ default, without-openssl ]
18    steps:
19    - uses: actions/checkout@v2
20    - name: shutdown VM if running
21      run: vmshutdown
22    - name: startup VM
23      run: vmstartup
24    - name: update source
25      run: vmrun "cd /usr/src && cvs up -dPA usr.bin/ssh regress/usr.bin/ssh"
26    - name: make clean
27      run: vmrun "cd /usr/src/usr.bin/ssh && make obj && make clean"
28    - name: make
29      run: vmrun "cd /usr/src/usr.bin/ssh && if test '${{ matrix.configs }}' = 'without-openssl'; then make OPENSSL=no; else make; fi"
30    - name: make install
31      run: vmrun "cd /usr/src/usr.bin/ssh && sudo make install"
32    - name: make tests
33      run: vmrun "cd /usr/src/regress/usr.bin/ssh && make obj && make clean && if test '${{ matrix.configs }}' = 'without-openssl'; then make SUDO=sudo OPENSSL=no; else make SUDO=sudo; fi"
34    - name: save logs
35      if: failure()
36      uses: actions/upload-artifact@v2
37      with:
38        name: ${{ matrix.os }}-${{ matrix.configs }}-logs
39        path: |
40          /usr/obj/regress/usr.bin/ssh/*.log
41    - name: shutdown VM
42      if: always()
43      run: vmshutdown
44