openssh/.github/workflows/upstream.yml
Darren Tucker 419aa8a312
Shutdown any VM before trying to check out repo.
In the case where the previous run did not clean up, the checkout will
fail as it'll leave a stale mount.
2022-11-08 12:42:52 +11:00

50 lines
1.7 KiB
YAML

name: Upstream self-hosted
on:
push:
branches: [ master ]
paths: [ '**.c', '**.h', '.github/**' ]
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, ubsan ]
steps:
- name: shutdown VM if running
run: vmshutdown
working-directory: ${{ runner.temp }}
- uses: actions/checkout@main
- 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 && cd /usr/src/regress/usr.bin/ssh && make obj && make clean"
- name: make
run: vmrun "cd /usr/src/usr.bin/ssh && case ${{ matrix.configs }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac"
- 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 && case ${{ matrix.configs }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac"
env:
SUDO: sudo
timeout-minutes: 300
- name: save logs
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ matrix.os }}-${{ matrix.configs }}-logs
path: |
/usr/obj/regress/usr.bin/ssh/*.log
- name: shutdown VM
if: always()
run: vmshutdown
working-directory: ${{ runner.temp }}