From: Martin Matuska Date: Mon, 1 Jun 2026 08:06:05 +0000 (+0200) Subject: CI: add FreeBSD-15-amd64 build via firecracker X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2837%2Fhead;p=thirdparty%2Flibarchive.git CI: add FreeBSD-15-amd64 build via firecracker --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f95e1ad0a..f0fe90122 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,27 @@ permissions: contents: read jobs: + FreeBSD: + runs-on: ubuntu-latest + strategy: + matrix: + bs: [autotools, cmake] + steps: + - name: Build and test on a FreeBSD 15 firecracker VM + uses: acj/freebsd-firecracker-action@v0.9.1 + with: + run-in-vm: | + chflags -R noschg / && \ + fetch -o - https://download.freebsd.org/releases/amd64/15.0-RELEASE/base.txz | bsdtar -x -C / -f - && \ + pkg bootstrap -y && \ + cd firecracker-freebsd && \ + env BS=${{ matrix.bs }} ./build/ci/github_actions/freebsd.sh prepare && \ + env BS=${{ matrix.bs }} CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./build/ci/build.sh -a autogen && \ + env BS=${{ matrix.bs }} MAKE=gmake CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./build/ci/build.sh -a configure && \ + env BS=${{ matrix.bs }} MAKE=gmake MAKE_ARGS="-j 2" ./build/ci/build.sh -a build && \ + env BS=${{ matrix.bs }} MAKE=gmake SKIP_TEST_RESTORE_ATIME=1 MAKE_ARGS="-j 2" ./build/ci/build.sh -a test && \ + env BS=${{ matrix.bs }} ./build/ci/github_actions/freebsd.sh test && \ + env BS=${{ matrix.bs }} MAKE=gmake MAKE_ARGS="-j 2" ./build/ci/build.sh -a install MacOS: runs-on: macos-15 strategy: diff --git a/build/ci/github_actions/freebsd.sh b/build/ci/github_actions/freebsd.sh new file mode 100755 index 000000000..fff74f6a6 --- /dev/null +++ b/build/ci/github_actions/freebsd.sh @@ -0,0 +1,41 @@ +#!/bin/sh +set -eu + +if [ $# != 1 ] +then + echo "Usage: $0 prepare | test" + exit 1 +fi + +if [ "$1" = "prepare" ] +then + set -x -e + env ASSUME_ALWAYS_YES=yes pkg bootstrap -f + sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf + pkg update + mount -u -o acls / + mkdir /tmp_acl_nfsv4 + MD=`mdconfig -a -t swap -s 128M` + newfs /dev/$MD + tunefs -N enable /dev/$MD + mount /dev/$MD /tmp_acl_nfsv4 + chmod 1777 /tmp_acl_nfsv4 + pkg install -y autoconf automake cmake gmake libiconv libtool pkgconf expat libxml2 liblz4 zstd +elif [ "$1" = "test" ] +then + set -e + echo "Additional NFSv4 ACL tests" + CURDIR=`pwd` + if [ "${BS}" = "cmake" ] + then + BIN_SUBDIR="bin" + else + BIN_SUBDIR=. + fi + BUILDDIR="${CURDIR}/build_ci/${BS}" + cd "$BUILDDIR" + TMPDIR=/tmp_acl_nfsv4 ${BIN_SUBDIR}/libarchive_test -r "${CURDIR}/libarchive/test" -v test_acl_platform_nfs4 +else + echo "Usage: $0 prepare | test" + exit 1 +fi