2021-04-28 03:35:28 +02:00
name : Upstream self-hosted
on :
push :
2022-10-04 14:20:23 +02:00
branches : [ master ]
2022-08-11 06:23:58 +02:00
paths : [ '**.c' , '**.h' , '.github/**' ]
2021-04-28 03:35:28 +02:00
jobs :
selfhosted :
if : github.repository == 'openssh/openssh-portable-selfhosted'
2022-12-13 10:59:54 +01:00
runs-on : 'libvirt'
2021-04-28 03:35:28 +02:00
env :
2022-12-13 10:55:37 +01:00
HOST : 'libvirt'
2022-11-26 23:28:20 +01:00
TARGET_HOST : ${{ matrix.target }}
2022-11-27 02:14:00 +01:00
TARGET_CONFIG : ${{ matrix.config }}
2021-04-28 03:35:28 +02:00
strategy :
fail-fast : false
matrix :
2022-11-26 23:28:20 +01:00
target : [ obsdsnap, obsdsnap-i386 ]
2022-11-27 02:14:00 +01:00
config : [ default, without-openssl, ubsan ]
2021-04-28 03:35:28 +02:00
steps :
- name : shutdown VM if running
run : vmshutdown
2022-11-08 01:33:25 +01:00
working-directory : ${{ runner.temp }}
2022-11-08 02:42:52 +01:00
- uses : actions/checkout@main
2021-04-28 03:35:28 +02:00
- name : startup VM
run : vmstartup
2022-11-27 02:19:37 +01:00
working-directory : ${{ runner.temp }}
2021-04-28 03:35:28 +02:00
- name : update source
run : vmrun "cd /usr/src && cvs up -dPA usr.bin/ssh regress/usr.bin/ssh"
2021-07-24 05:02:51 +02:00
- name : make clean
2022-12-18 11:36:25 +01:00
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"
2021-04-28 03:35:28 +02:00
- name : make
2022-11-27 02:14:00 +01:00
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"
2021-04-28 03:35:28 +02:00
- name : make install
run : vmrun "cd /usr/src/usr.bin/ssh && sudo make install"
2022-05-06 06:39:34 +02:00
- name : make tests`
2022-11-27 02:14:00 +01:00
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"
2022-05-06 06:39:34 +02:00
env :
SUDO : sudo
2021-12-10 01:57:30 +01:00
timeout-minutes : 300
2021-06-07 11:19:23 +02:00
- name : save logs
if : failure()
2022-11-07 23:21:10 +01:00
uses : actions/upload-artifact@main
2021-06-07 11:19:23 +02:00
with :
2022-11-27 02:14:00 +01:00
name : ${{ matrix.target }}-${{ matrix.config }}-logs
2021-06-07 11:19:23 +02:00
path : |
2022-12-18 11:13:42 +01:00
/usr/obj/regress/usr.bin/ssh/obj/*.log
2023-03-01 13:23:02 +01:00
/usr/obj/regress/usr.bin/ssh/obj/log/*
2021-04-28 03:35:28 +02:00
- name : shutdown VM
if : always()
run : vmshutdown
2022-11-08 01:33:25 +01:00
working-directory : ${{ runner.temp }}