Rearrange selfhosted VM scheduling.
Instead of trying to infer the type of the self hosted tests in each of the driver scripts (inconsistently...), set one of the following variables to "true" in the workflow: VM: tests run in a virtual machine. EPHEMERAL: tests run on an ephemeral virtual machine. PERSISTENT: tests run on a persistent virtual machine REMOTE: tests run on a physical remote host. EPHEMERAL VMs can have multiple instances of any given VM can exist simultaneously and are run by a runner pool. The other types have a dedicated runner instance and can only run a single test at a time. Other settings: SSHFS: We need to sshfs mount over the repo so the workflow can collect build artifacts. This also implies the tests must be run over ssh. DEBUG_ACTIONS: enable "set -x" in scripts for debugging.
This commit is contained in:
parent
cd8a72707c
commit
02c5ad2312
|
@ -11,9 +11,16 @@ jobs:
|
||||||
runs-on: ${{ matrix.host }}
|
runs-on: ${{ matrix.host }}
|
||||||
timeout-minutes: 600
|
timeout-minutes: 600
|
||||||
env:
|
env:
|
||||||
|
DEBUG_ACTIONS: false
|
||||||
HOST: ${{ matrix.host }}
|
HOST: ${{ matrix.host }}
|
||||||
TARGET_HOST: ${{ matrix.target }}
|
TARGET_HOST: ${{ matrix.target }}
|
||||||
TARGET_CONFIG: ${{ matrix.config }}
|
TARGET_CONFIG: ${{ matrix.config }}
|
||||||
|
TARGET_DOMAIN: ${{ startsWith(matrix.host, 'libvirt') && format('{0}-{1}-{2}', matrix.target, matrix.config, github.run_id) || matrix.target }}
|
||||||
|
EPHEMERAL: ${{ startsWith(matrix.host, 'libvirt') }}
|
||||||
|
PERSISTENT: ${{ startsWith(matrix.host, 'persist') }}
|
||||||
|
REMOTE: ${{ startsWith(matrix.host, 'remote') }}
|
||||||
|
VM: ${{ startsWith(matrix.host, 'libvirt') || startsWith(matrix.host, 'persist') }}
|
||||||
|
SSHFS: ${{ startsWith(matrix.host, 'libvirt') || startsWith(matrix.host, 'persist') || startsWith(matrix.host, 'remote') }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
# We use a matrix in two parts: firstly all of the VMs are tested with the
|
# We use a matrix in two parts: firstly all of the VMs are tested with the
|
||||||
|
@ -75,34 +82,46 @@ jobs:
|
||||||
- { target: nbsd8, config: pam, host: libvirt }
|
- { target: nbsd8, config: pam, host: libvirt }
|
||||||
- { target: nbsd9, config: pam, host: libvirt }
|
- { target: nbsd9, config: pam, host: libvirt }
|
||||||
- { target: nbsd10, config: pam, host: libvirt }
|
- { target: nbsd10, config: pam, host: libvirt }
|
||||||
|
# ARM64 VMs
|
||||||
|
- { target: obsd-arm64, config: default, host: libvirt-arm64 }
|
||||||
# VMs with persistent disks that have their own runner.
|
# VMs with persistent disks that have their own runner.
|
||||||
- { target: win10, config: default, host: win10 }
|
- { target: win10, config: default, host: persist-win10 }
|
||||||
- { target: win10, config: cygwin-release, host: win10 }
|
- { target: win10, config: cygwin-release, host: persist-win10 }
|
||||||
# Physical hosts, with either native runners or remote via ssh.
|
# Physical hosts with native runners.
|
||||||
- { target: ARM, config: default, host: ARM }
|
- { target: ARM, config: default, host: ARM }
|
||||||
- { target: ARM64, config: default, host: ARM64 }
|
- { target: ARM64, config: default, host: ARM64 }
|
||||||
- { target: ARM64, config: pam, host: ARM64 }
|
- { target: ARM64, config: pam, host: ARM64 }
|
||||||
- { target: debian-riscv64, config: default, host: debian-riscv64 }
|
# Physical hosts with remote runners.
|
||||||
- { target: obsd-arm64, config: default, host: obsd-arm64 }
|
- { target: debian-riscv64, config: default, host: remote-debian-riscv64 }
|
||||||
- { target: openwrt-mips, config: default, host: openwrt-mips }
|
|
||||||
- { target: openwrt-mipsel, config: default, host: openwrt-mipsel }
|
- { target: openwrt-mips, config: default, host: remote-openwrt-mips }
|
||||||
|
- { target: openwrt-mipsel, config: default, host: remote-openwrt-mipsel }
|
||||||
steps:
|
steps:
|
||||||
- name: shutdown VM if running
|
- name: unmount stale workspace
|
||||||
run: vmshutdown
|
if: env.SSHFS == 'true'
|
||||||
|
run: fusermount -u ${GITHUB_WORKSPACE} || true
|
||||||
working-directory: ${{ runner.temp }}
|
working-directory: ${{ runner.temp }}
|
||||||
|
- name: shutdown VM if running
|
||||||
|
if: env.VM == 'true'
|
||||||
|
run: vmshutdown
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
- name: autoreconf
|
- name: autoreconf
|
||||||
run: autoreconf
|
run: autoreconf
|
||||||
- name: startup VM
|
- name: startup VM
|
||||||
|
if: env.VM == 'true'
|
||||||
run: vmstartup
|
run: vmstartup
|
||||||
working-directory: ${{ runner.temp }}
|
working-directory: ${{ runner.temp }}
|
||||||
|
- name: copy and mount workspace
|
||||||
|
if: env.SSHFS == 'true'
|
||||||
|
run: sshfs_mount
|
||||||
|
working-directory: ${{ runner.temp }}
|
||||||
- name: configure
|
- name: configure
|
||||||
run: vmrun ./.github/configure.sh ${{ matrix.config }}
|
run: vmrun ./.github/configure.sh ${{ matrix.config }}
|
||||||
- name: save config
|
# - name: save config
|
||||||
uses: actions/upload-artifact@main
|
# uses: actions/upload-artifact@main
|
||||||
with:
|
# with:
|
||||||
name: ${{ matrix.target }}-${{ matrix.config }}-config
|
# name: ${{ matrix.target }}-${{ matrix.config }}-config
|
||||||
path: config.h
|
# path: config.h
|
||||||
- name: make clean
|
- name: make clean
|
||||||
run: vmrun make clean
|
run: vmrun make clean
|
||||||
- name: make
|
- name: make
|
||||||
|
@ -121,7 +140,10 @@ jobs:
|
||||||
regress/*.log
|
regress/*.log
|
||||||
regress/log/*
|
regress/log/*
|
||||||
regress/valgrind-out/
|
regress/valgrind-out/
|
||||||
- name: shutdown VM
|
- name: unmount workspace
|
||||||
if: always()
|
if: always() && env.SSHFS == 'true'
|
||||||
run: vmshutdown
|
run: fusermount -u ${GITHUB_WORKSPACE} || true
|
||||||
working-directory: ${{ runner.temp }}
|
working-directory: ${{ runner.temp }}
|
||||||
|
- name: shutdown VM
|
||||||
|
if: always() && env.VM == 'true'
|
||||||
|
run: vmshutdown
|
||||||
|
|
|
@ -11,7 +11,9 @@ jobs:
|
||||||
if: github.repository == 'openssh/openssh-portable-selfhosted'
|
if: github.repository == 'openssh/openssh-portable-selfhosted'
|
||||||
runs-on: 'libvirt'
|
runs-on: 'libvirt'
|
||||||
env:
|
env:
|
||||||
|
DEBUG_ACTIONS: false
|
||||||
HOST: 'libvirt'
|
HOST: 'libvirt'
|
||||||
|
EPHEMERAL: true
|
||||||
TARGET_HOST: ${{ matrix.target }}
|
TARGET_HOST: ${{ matrix.target }}
|
||||||
TARGET_CONFIG: ${{ matrix.config }}
|
TARGET_CONFIG: ${{ matrix.config }}
|
||||||
strategy:
|
strategy:
|
||||||
|
|
Loading…
Reference in New Issue