xref: /freebsd/crypto/openssh/.github/workflows/upstream.yml (revision 094517119c62c23369d545a7475ae982d86330a3)
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 ]
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      timeout-minutes: 300
35    - name: save logs
36      if: failure()
37      uses: actions/upload-artifact@v2
38      with:
39        name: ${{ matrix.os }}-${{ matrix.configs }}-logs
40        path: |
41          /usr/obj/regress/usr.bin/ssh/*.log
42    - name: shutdown VM
43      if: always()
44      run: vmshutdown
45