From 23fd89bc8ed875467bcdc7901a545f155a088270 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Sat, 13 Jun 2026 14:56:12 +1000 Subject: [PATCH] ci: Move FreeBSD CI from Cirrus CI to GitHub Actions Cirrus CI shut down on 2026-06-01. Replace it with cross-platform-actions/action which runs FreeBSD in a QEMU VM on GitHub Actions runners. This preserves the same test matrix: FreeBSD 13.5 and 14.3 with both make and meson build systems. Explicitly set shell to sh, since FreeBSD 13.x defaults to csh which doesn't understand POSIX if/then/fi syntax. Assisted-by: Claude:claude-opus-4-6 Signed-off-by: David Gibson --- .cirrus.yml | 39 --------------------- .github/workflows/build.yml | 70 +++++++++++++++++++++++++++++++++++++ scripts/install-deps.sh | 7 ++++ 3 files changed, 77 insertions(+), 39 deletions(-) delete mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 825aeb7..0000000 --- a/.cirrus.yml +++ /dev/null @@ -1,39 +0,0 @@ -# FreeBSD build with multiple versions -freebsd_versions_task: - name: FreeBSD $FREEBSD_VERSION make build - freebsd_instance: - image_family: $FREEBSD_IMAGE - matrix: - - env: - FREEBSD_VERSION: "13.5" - FREEBSD_IMAGE: freebsd-13-5 - - env: - FREEBSD_VERSION: "14.3" - FREEBSD_IMAGE: freebsd-14-3 - install_script: - - pkg install -y git gmake flex bison python3 py312-setuptools swig libyaml pkgconf - build_script: - - gmake - check_script: - - gmake check - -# FreeBSD meson builds with multiple versions -freebsd_meson_versions_task: - name: FreeBSD $FREEBSD_VERSION meson build - freebsd_instance: - image_family: $FREEBSD_IMAGE - matrix: - - env: - FREEBSD_VERSION: "13.5" - FREEBSD_IMAGE: freebsd-13-5 - - env: - FREEBSD_VERSION: "14.3" - FREEBSD_IMAGE: freebsd-14-3 - install_script: - - pkg install -y git meson ninja flex bison python3 py312-setuptools swig libyaml pkgconf - setup_script: - - meson setup -D python=enabled -D yaml=enabled build - build_script: - - meson compile -C build - test_script: - - if ! meson test -C build; then cat build/meson-logs/testlog.txt; false; fi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b68821..4d2cb42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -144,3 +144,73 @@ jobs: run: | meson setup -Dtools=true -Dtests=false build meson compile -C build + + build-freebsd-make: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + version: [ "13.5", "14.3" ] + + name: FreeBSD ${{ matrix.version }} make build + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Start VM + uses: cross-platform-actions/action@v1 + with: + operating_system: freebsd + version: ${{ matrix.version }} + shell: sh + + - name: Install Dependencies + shell: cpa.sh {0} + run: sudo ./scripts/install-deps.sh + + - name: Build + shell: cpa.sh {0} + run: gmake + + - name: Run check + shell: cpa.sh {0} + run: gmake check + + build-freebsd-meson: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + version: [ "13.5", "14.3" ] + + name: FreeBSD ${{ matrix.version }} meson build + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Start VM + uses: cross-platform-actions/action@v1 + with: + operating_system: freebsd + version: ${{ matrix.version }} + shell: sh + + - name: Install Dependencies + shell: cpa.sh {0} + run: sudo ./scripts/install-deps.sh + + - name: Setup + shell: cpa.sh {0} + run: meson setup -D python=enabled -D yaml=enabled build + + - name: Build + shell: cpa.sh {0} + run: meson compile -C build + + - name: Run check + shell: cpa.sh {0} + run: if ! meson test -C build; then cat build/meson-logs/testlog.txt; false; fi diff --git a/scripts/install-deps.sh b/scripts/install-deps.sh index d243504..e66cbdf 100755 --- a/scripts/install-deps.sh +++ b/scripts/install-deps.sh @@ -1,6 +1,13 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +if [ "$(uname -s)" = "FreeBSD" ] +then + pkg install -y git gmake flex bison meson ninja \ + python3 py312-setuptools swig libyaml pkgconf + exit 0 +fi + if [ -f /etc/os-release ] then . /etc/os-release