From: Darren Tucker Date: Mon, 15 Sep 2025 07:21:15 +0000 (+1000) Subject: Add VM test targets via vmaction on Github. X-Git-Tag: V_10_1_P1~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c32e09ea3e5c7e1fa0b7e2d4ddc83f8beadafed;p=thirdparty%2Fopenssh-portable.git Add VM test targets via vmaction on Github. --- diff --git a/.github/ci-status.md b/.github/ci-status.md index 971011db9..9169765ab 100644 --- a/.github/ci-status.md +++ b/.github/ci-status.md @@ -1,5 +1,11 @@ master : [![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:master) +[![VM DragonFlyBSD](https://github.com/openssh/openssh-portable/actions/workflows/vm-dragonflybsd.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/vm-dragonflybsd.yml?query=branch:master) +[![VM FreeBSD](https://github.com/openssh/openssh-portable/actions/workflows/vm-freebsd.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/vm-freebsd.yml?query=branch:master) +[![VM OmniOS](https://github.com/openssh/openssh-portable/actions/workflows/vm-omnios.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/vm-omnios.yml?query=branch:master) +[![VM OpenBSD](https://github.com/openssh/openssh-portable/actions/workflows/vm-openbsd.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/vm-openbsd.yml?query=branch:master) +[![VM NetBSD](https://github.com/openssh/openssh-portable/actions/workflows/vm-netbsd.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/vm-netbsd.yml?query=branch:master) +[![VM Solaris](https://github.com/openssh/openssh-portable/actions/workflows/vm-solaris.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/vm-solaris.yml?query=branch:master) [![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:master) [![Upstream self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml?query=branch:master) [![CIFuzz](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml) diff --git a/.github/workflows/vm-dragonflybsd.yml b/.github/workflows/vm-dragonflybsd.yml new file mode 100644 index 000000000..2fc337072 --- /dev/null +++ b/.github/workflows/vm-dragonflybsd.yml @@ -0,0 +1,78 @@ +# 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 DragonFlyBSD CI +on: + push: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-dragonflybsd.yml' ] + pull_request: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-dragonflybsd.yml' ] + +jobs: + ci: + name: "dragonflybsd-${{ matrix.target }}" + if: github.repository != 'openssh/openssh-portable-selfhosted' + strategy: + fail-fast: false + matrix: + # First we test all OSes in the default configuration. + target: + - "6.4.2" + config: [default] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + - name: autoreconf + run: sh -c autoreconf + + - name: start DragonFlyBSD ${{ matrix.target }} VM + uses: vmactions/dragonflybsd-vm@v1 + with: + release: ${{ matrix.target }} + usesh: true + prepare: | + pkg install -y sudo + pw useradd builder -m + echo "builder ALL=(ALL:ALL) NOPASSWD: ALL" >>/usr/local/etc/sudoers + mkdir -p /var/empty /usr/local/etc + cp $GITHUB_WORKSPACE/moduli /usr/local/etc/moduli + + - name: set file perms + shell: dragonflybsd {0} + run: cd $GITHUB_WORKSPACE && chown -R builder . + - name: configure + shell: dragonflybsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder ./configure --with-ssl-dir=/usr/local + - name: make clean + shell: dragonflybsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make clean + - name: make + shell: dragonflybsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make -j4 + - name: make tests + shell: dragonflybsd {0} + run: | + cd $GITHUB_WORKSPACE + sudo -u builder env SUDO=sudo make tests + + - name: "PAM: configure" + shell: dragonflybsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder ./configure --with-ssl-dir=/usr/local --with-pam + - name: "PAM: make clean" + shell: dragonflybsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make clean + - name: "PAM: make" + shell: dragonflybsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make -j4 + - name: "PAM: make tests" + shell: dragonflybsd {0} + run: | + cd $GITHUB_WORKSPACE + sudo -u builder env SUDO=sudo SSHD_CONFOPTS="UsePam yes" make tests diff --git a/.github/workflows/vm-freebsd.yml b/.github/workflows/vm-freebsd.yml new file mode 100644 index 000000000..1d2b994ca --- /dev/null +++ b/.github/workflows/vm-freebsd.yml @@ -0,0 +1,80 @@ +# 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 FreeBSD CI +on: + push: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-freebsd.yml' ] + pull_request: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-freebsd.yml' ] + +jobs: + ci: + name: "freebsd-${{ matrix.target }}" + if: github.repository != 'openssh/openssh-portable-selfhosted' + strategy: + fail-fast: false + matrix: + # First we test all OSes in the default configuration. + target: + - "13.5" + - "14.3" + # - "15.0" # "pkg" breaks with a libutil.so error... + config: [default] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + - name: autoreconf + run: sh -c autoreconf + + - name: start FreeBSD ${{ matrix.target }} VM + uses: vmactions/freebsd-vm@v1 + with: + release: ${{ matrix.target }} + usesh: true + prepare: | + pkg install -y sudo + pw useradd builder -m + echo "builder ALL=(ALL:ALL) NOPASSWD: ALL" >>/usr/local/etc/sudoers + mkdir -p /var/empty /usr/local/etc + cp $GITHUB_WORKSPACE/moduli /usr/local/etc/moduli + + - name: set file perms + shell: freebsd {0} + run: cd $GITHUB_WORKSPACE && chown -R builder . + - name: configure + shell: freebsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder ./configure + - name: make clean + shell: freebsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make clean + - name: make + shell: freebsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make -j4 + - name: make tests + shell: freebsd {0} + run: | + cd $GITHUB_WORKSPACE + sudo -u builder env SUDO=sudo make tests + + - name: "PAM: configure" + shell: freebsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder ./configure --with-pam + - name: "PAM: make clean" + shell: freebsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make clean + - name: "PAM: make" + shell: freebsd {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make -j4 + - name: "PAM: make tests" + shell: freebsd {0} + run: | + cd $GITHUB_WORKSPACE + sudo -u builder env SUDO=sudo SSHD_CONFOPTS="UsePam yes" make tests diff --git a/.github/workflows/vm-netbsd.yml b/.github/workflows/vm-netbsd.yml new file mode 100644 index 000000000..111d6d55c --- /dev/null +++ b/.github/workflows/vm-netbsd.yml @@ -0,0 +1,81 @@ +# 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 diff --git a/.github/workflows/vm-omnios.yml b/.github/workflows/vm-omnios.yml new file mode 100644 index 000000000..473bad395 --- /dev/null +++ b/.github/workflows/vm-omnios.yml @@ -0,0 +1,70 @@ +# 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. +# +# TODO: fix build --with-pam +# TODO: get tests working with SUDO=sudo SSHD_CONFOPTS="UsePam yes" + +name: VM OmniOS CI +on: + push: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-omnios.yml' ] + pull_request: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-omnios.yml' ] + +jobs: + ci: + name: "omnios-${{ matrix.target }}" + if: github.repository != 'openssh/openssh-portable-selfhosted' + strategy: + fail-fast: false + matrix: + # First we test all OSes in the default configuration. + target: + - "r151054" + config: [default] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + - name: autoreconf + run: sh -c autoreconf + + - name: start OmniOS ${{ matrix.target }} VM + uses: vmactions/omnios-vm@v1 + with: + release: ${{ matrix.target }} + usesh: true + prepare: | + set -x + pfexec pkg refresh + pfexec pkg install build-essential + useradd -m builder + sed -e "s/^root.*ALL$/root ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers >>/tmp/sudoers + mv /tmp/sudoers /etc/sudoers + echo "builder 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: omnios {0} + run: cd $GITHUB_WORKSPACE && chown -R builder . + - name: configure + shell: omnios {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder ./configure + - name: make clean + shell: omnios {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make clean + - name: make + shell: omnios {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make + - name: make tests + shell: omnios {0} + run: | + cd $GITHUB_WORKSPACE + sudo -u builder make tests diff --git a/.github/workflows/vm-openbsd.yml b/.github/workflows/vm-openbsd.yml new file mode 100644 index 000000000..389f35026 --- /dev/null +++ b/.github/workflows/vm-openbsd.yml @@ -0,0 +1,66 @@ +# 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 diff --git a/.github/workflows/vm-solaris.yml b/.github/workflows/vm-solaris.yml new file mode 100644 index 000000000..d500f7dea --- /dev/null +++ b/.github/workflows/vm-solaris.yml @@ -0,0 +1,82 @@ +# 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. +# +# TODO: get tests working with SUDO=sudo SSHD_CONFOPTS="UsePam yes" + +name: VM Solaris CI +on: + push: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-solaris.yml' ] + pull_request: + paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/vm-solaris.yml' ] + +jobs: + ci: + name: "solaris-${{ matrix.target }}" + if: github.repository != 'openssh/openssh-portable-selfhosted' + strategy: + fail-fast: false + matrix: + # First we test all OSes in the default configuration. + target: + - "11.4-gcc" + config: [default] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + - name: autoreconf + run: sh -c autoreconf + + - name: start Solaris ${{ matrix.target }} VM + uses: vmactions/solaris-vm@v1 + with: + release: ${{ matrix.target }} + usesh: true + prepare: | + set -x + useradd -m builder + sed -e "s/^root.*ALL$/root ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers >>/tmp/sudoers + mv /tmp/sudoers /etc/sudoers + echo "builder 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: solaris {0} + run: cd $GITHUB_WORKSPACE && chown -R builder . + - name: configure + shell: solaris {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder ./configure + - name: make clean + shell: solaris {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make clean + - name: make + shell: solaris {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make + - name: make tests + shell: solaris {0} + run: | + cd $GITHUB_WORKSPACE + sudo -u builder make tests + + - name: "PAM: configure" + shell: solaris {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder ./configure --with-pam + - name: "PAM: make clean" + shell: solaris {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make clean + - name: "PAM: make" + shell: solaris {0} + run: cd $GITHUB_WORKSPACE && sudo -u builder make + - name: "PAM: make tests" + shell: solaris {0} + run: | + cd $GITHUB_WORKSPACE + sudo -u builder make tests