diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fee31f14..4610841c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,3 +57,84 @@ jobs: make DESTDIR=$PWD/prefix make install make check + + freebsd: + strategy: + fail-fast: false + matrix: + release: ["15.1", "14.3"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: build and test in a FreeBSD vm + uses: vmactions/freebsd-vm@v1 + with: + release: ${{ matrix.release }} + usesh: true + copyback: false + prepare: | + pkg install -y bash git autoconf automake libtool groff pkgconf + run: | + set -e + src=$(pwd) + + # Both build paths cut "struct lock_owner" out of the kernel sources + # (configure.ac: HEADER_GENERATE lockf_owner.h), and the release + # image ships an empty /usr/src, so configure stops with + # configure: error: can't read /kern/kern_lockf.c + # unless the sources are there. Unpack just usr/src/sys out of the + # release source set; that is ~15s and about 580MB on disk. + rel=$(uname -r | sed 's/-p[0-9]*$//') + fetch -o /tmp/src.txz "https://download.freebsd.org/releases/$(uname -m)/${rel}/src.txz" + tar -xf /tmp/src.txz -C / usr/src/sys + + # autotools build, out of tree so the source tree stays pristine for + # the legacy Configure run below + autoreconf -vif + mkdir /tmp/build + cd /tmp/build + "$src"/configure + make + make check || { cat test-suite.log; exit 1; } + cd "$src" + + # legacy Configure, the path .cirrus.yml used to cover + ./Configure -n freebsd + make + bash ./check.bash freebsd + + openbsd: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: build and test in an OpenBSD vm + uses: vmactions/openbsd-vm@v1 + with: + release: "7.9" + usesh: true + copyback: false + prepare: | + pkg_add -I bash git libtool groff autoconf-2.72p0 automake-1.18.1 + run: | + set -e + src=$(pwd) + export AUTOCONF_VERSION=2.72 + export AUTOMAKE_VERSION=1.18 + + # autotools path: build only. "make check" additionally fails + # tests/LTbasic2 here with "opened regular file wasn't found"; + # that test is not part of the legacy suite below and is left + # for a separate fix. libtool has to come from packages -- the + # base /usr/bin/libtool is a different program and aclocal + # cannot find LT_INIT without the package's m4 files. + autoreconf -vif + mkdir /tmp/build + cd /tmp/build + "$src"/configure + make + cd "$src" + + # legacy Configure, the path .builds/openbsd.yml covered + ./Configure -n openbsd + make + bash ./check.bash openbsd diff --git a/Configure b/Configure index e4a304ca..dff48eab 100755 --- a/Configure +++ b/Configure @@ -3651,6 +3651,16 @@ LOCKF4 LSOF_TSTBIGF=" " LSOF_VERS=7030 ;; + 7.9*) + LSOF_TSTBIGF=" " + LSOF_VERS=7090 + ;; + 7*) + LSOF_TSTBIGF=" " + LSOF_VERS=7090 + echo "!!!WARNING!!! Unsupported OpenBSD 7.x version: $LSOF_VSTR" + echo "!!!WARNING!!! Configuring for OpenBSD 7.9" + ;; *) echo "Unknown OpenBSD release: $LSOF_VSTR" echo Assuming OpenBSD 3.9 @@ -3662,7 +3672,7 @@ LOCKF4 # Test for legal OpenBSD version. case $LSOF_VERS in # { - 1020|2050|2060|2070|2080|2090|3000|3010|3020|3030|3040|3050|3060|3070|3080|3090|7020|7030) + 1020|2050|2060|2070|2080|2090|3000|3010|3020|3030|3040|3050|3060|3070|3080|3090|7020|7030|7090) ;; *) echo "Unknown OpenBSD version: $LSOF_VERS" diff --git a/tests/TestDB b/tests/TestDB index e6ec4303..58296383 100644 --- a/tests/TestDB +++ b/tests/TestDB @@ -152,3 +152,4 @@ LT_BIGF LT_CC LT_DIAL_darwin LT_VERS=1900 LT_BIGF LT_CC LT_DIAL_openbsd LT_VERS=7020 LT_BIGF LT_CC LT_DIAL_openbsd LT_VERS=7030 LT_BIGF LT_CC LT_DEV64 LT_DIAL_freebsd LT_VERS=15000 +LT_BIGF LT_CC LT_DIAL_openbsd LT_VERS=7090