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 ]
17        configs: [ default ]
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
27      run: vmrun "cd /usr/src/usr.bin/ssh && make obj && make clean && make"
28    - name: make install
29      run: vmrun "cd /usr/src/usr.bin/ssh && sudo make install"
30    - name: make tests
31      run: vmrun "cd /usr/src/regress/usr.bin/ssh && make obj && make clean &&  SUDO=sudo make"
32    - name: shutdown VM
33      if: always()
34      run: vmshutdown
35