67 lines
2.2 KiB
YAML
67 lines
2.2 KiB
YAML
# For testing, you can set variables in your repo (Repo -> Settings ->
|
|
# Security -> Actions -> Variables) to restrict the tests that are run.
|
|
# The supported variables are:
|
|
#
|
|
# RUN_ONLY_TARGET_CONFIG: Run only the single matching target and config,
|
|
# separated by spaces, eg "ubuntu-latest default". All other tests will
|
|
# fail immediately.
|
|
#
|
|
# LTESTS: Override the set of tests run.
|
|
|
|
name: VM OpenBSD CI
|
|
on:
|
|
push:
|
|
paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-openbsd.yml' ]
|
|
pull_request:
|
|
paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-openbsd.yml' ]
|
|
|
|
jobs:
|
|
ci:
|
|
name: "openbsd-${{ matrix.target }}"
|
|
if: github.repository != 'openssh/openssh-portable-selfhosted'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# First we test all OSes in the default configuration.
|
|
target:
|
|
- "7.3"
|
|
- "7.5"
|
|
- "7.6"
|
|
- "7.7"
|
|
config: [default]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
- name: autoreconf
|
|
run: sh -c autoreconf
|
|
|
|
- name: start OpenBSD ${{ matrix.target }} VM
|
|
uses: vmactions/openbsd-vm@v1
|
|
with:
|
|
release: ${{ matrix.target }}
|
|
usesh: true
|
|
prepare: |
|
|
env PKG_PATH=https://ftp.openbsd.org/pub/OpenBSD/${{matrix.target}}/packages/amd64 pkg_add sudo--
|
|
useradd -m builder
|
|
echo "builder ALL=(ALL:ALL) NOPASSWD: ALL" >>/etc/sudoers
|
|
mkdir -p /var/empty /usr/local/etc
|
|
cp $GITHUB_WORKSPACE/moduli /usr/local/etc/moduli
|
|
|
|
- name: set file perms
|
|
shell: openbsd {0}
|
|
run: cd $GITHUB_WORKSPACE && chown -R builder .
|
|
- name: configure
|
|
shell: openbsd {0}
|
|
run: cd $GITHUB_WORKSPACE && sudo -u builder ./configure
|
|
- name: make clean
|
|
shell: openbsd {0}
|
|
run: cd $GITHUB_WORKSPACE && sudo -u builder make clean
|
|
- name: make
|
|
shell: openbsd {0}
|
|
run: cd $GITHUB_WORKSPACE && sudo -u builder make -j4
|
|
- name: make tests
|
|
shell: openbsd {0}
|
|
run: |
|
|
cd $GITHUB_WORKSPACE
|
|
sudo -u builder env SUDO=sudo make tests
|