82 lines
2.6 KiB
YAML
82 lines
2.6 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 NetBSD CI
|
|
on:
|
|
push:
|
|
paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-netbsd.yml' ]
|
|
pull_request:
|
|
paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-netbsd.yml' ]
|
|
|
|
jobs:
|
|
ci:
|
|
name: "netbsd-${{ matrix.target }}"
|
|
if: github.repository != 'openssh/openssh-portable-selfhosted'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# First we test all OSes in the default configuration.
|
|
target:
|
|
- "9.0"
|
|
- "9.4"
|
|
- "10.0"
|
|
- "10.1"
|
|
config: [default]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
- name: autoreconf
|
|
run: sh -c autoreconf
|
|
|
|
- name: start NetBSD ${{ matrix.target }} VM
|
|
uses: vmactions/netbsd-vm@v1
|
|
with:
|
|
release: ${{ matrix.target }}
|
|
usesh: true
|
|
prepare: |
|
|
/usr/sbin/pkg_add sudo
|
|
/usr/sbin/useradd -m builder
|
|
echo "builder ALL=(ALL:ALL) NOPASSWD: ALL" >>/usr/pkg/etc/sudoers
|
|
mkdir -p /var/empty /usr/local/etc
|
|
cp $GITHUB_WORKSPACE/moduli /usr/local/etc/moduli
|
|
|
|
- name: set file perms
|
|
shell: netbsd {0}
|
|
run: cd $GITHUB_WORKSPACE && /sbin/chown -R builder .
|
|
- name: configure
|
|
shell: netbsd {0}
|
|
run: cd $GITHUB_WORKSPACE && sudo -u builder ./configure
|
|
- name: make clean
|
|
shell: netbsd {0}
|
|
run: cd $GITHUB_WORKSPACE && sudo -u builder make clean
|
|
- name: make
|
|
shell: netbsd {0}
|
|
run: cd $GITHUB_WORKSPACE && sudo -u builder make -j4
|
|
- name: make tests
|
|
shell: netbsd {0}
|
|
run: |
|
|
cd $GITHUB_WORKSPACE
|
|
sudo -u builder env SUDO=sudo make tests
|
|
|
|
- name: "PAM: configure"
|
|
shell: netbsd {0}
|
|
run: cd $GITHUB_WORKSPACE && sudo -u builder ./configure --with-pam
|
|
- name: "PAM: make clean"
|
|
shell: netbsd {0}
|
|
run: cd $GITHUB_WORKSPACE && sudo -u builder make clean
|
|
- name: "PAM: make"
|
|
shell: netbsd {0}
|
|
run: cd $GITHUB_WORKSPACE && sudo -u builder make -j4
|
|
- name: "PAM: make tests"
|
|
shell: netbsd {0}
|
|
run: |
|
|
cd $GITHUB_WORKSPACE
|
|
sudo -u builder env SUDO=sudo SSHD_CONFOPTS="UsePam yes" make tests
|