summaryrefslogtreecommitdiffstats
path: root/.github/workflows/upstream.yml
blob: 3d0bdd32ea984c18f85f4be9ed1017a1adbb3cfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Upstream self-hosted

on:
  push:
    branches: [ master, ci ]

jobs:
  selfhosted:
    if: github.repository == 'openssh/openssh-portable-selfhosted'
    runs-on: ${{ matrix.os }}
    env:
      TARGET_HOST: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ obsdsnap, obsdsnap-i386 ]
        configs: [ default, without-openssl ]
    steps:
    - uses: actions/checkout@v2
    - name: shutdown VM if running
      run: vmshutdown
    - name: startup VM
      run: vmstartup
    - name: update source
      run: vmrun "cd /usr/src && cvs up -dPA usr.bin/ssh regress/usr.bin/ssh"
    - name: make clean
      run: vmrun "cd /usr/src/usr.bin/ssh && make obj && make clean"
    - name: make
      run: vmrun "cd /usr/src/usr.bin/ssh && if test '${{ matrix.configs }}' = 'without-openssl'; then make OPENSSL=no; else make; fi"
    - name: make install
      run: vmrun "cd /usr/src/usr.bin/ssh && sudo make install"
    - name: make tests
      run: vmrun "cd /usr/src/regress/usr.bin/ssh && make obj && make clean &&  SUDO=sudo make"
    - name: save logs
      if: failure()
      uses: actions/upload-artifact@v2
      with:
        name: ${{ matrix.os }}-${{ matrix.configs }}-logs
        path: |
          /usr/obj/regress/usr.bin/ssh/*.log
    - name: shutdown VM
      if: always()
      run: vmshutdown