xref: /freebsd/crypto/openssh/.github/workflows/upstream.yml (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1name: Upstream self-hosted
2
3on:
4  push:
5    branches: [ master ]
6    paths: [ '**.c', '**.h', '.github/**' ]
7
8jobs:
9  selfhosted:
10    if: github.repository == 'openssh/openssh-portable-selfhosted'
11    runs-on: 'libvirt'
12    env:
13      HOST: 'libvirt'
14      TARGET_HOST: ${{ matrix.target }}
15      TARGET_CONFIG: ${{ matrix.config }}
16    strategy:
17      fail-fast: false
18      matrix:
19        target: [ obsdsnap, obsdsnap-i386 ]
20        config: [ default, without-openssl, ubsan ]
21    steps:
22    - name: shutdown VM if running
23      run: vmshutdown
24      working-directory: ${{ runner.temp }}
25    - uses: actions/checkout@main
26    - name: startup VM
27      run: vmstartup
28      working-directory: ${{ runner.temp }}
29    - name: update source
30      run: vmrun "cd /usr/src && cvs up -dPA usr.bin/ssh regress/usr.bin/ssh"
31    - name: make clean
32      run: vmrun "cd /usr/src/usr.bin/ssh && make obj && make clean && cd /usr/src/regress/usr.bin/ssh && make obj && make clean && sudo chmod -R g-w /usr/src /usr/obj"
33    - name: make
34      run: vmrun "cd /usr/src/usr.bin/ssh && case ${{ matrix.config }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac"
35    - name: make install
36      run: vmrun "cd /usr/src/usr.bin/ssh && sudo make install"
37    - name: make tests`
38      run: vmrun "cd /usr/src/regress/usr.bin/ssh && case ${{ matrix.config }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac"
39      env:
40        SUDO: sudo
41      timeout-minutes: 300
42    - name: save logs
43      if: failure()
44      uses: actions/upload-artifact@main
45      with:
46        name: ${{ matrix.target }}-${{ matrix.config }}-logs
47        path: |
48          /usr/obj/regress/usr.bin/ssh/obj/*.log
49          /usr/obj/regress/usr.bin/ssh/obj/log/*
50    - name: shutdown VM
51      if: always()
52      run: vmshutdown
53      working-directory: ${{ runner.temp }}
54