mirror of
https://github.com/dgibson/dtc.git
synced 2026-10-09 23:53:08 -04:00
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 <david@gibson.dropbear.id.au>
This commit is contained in:
parent
3ad5ebbdd9
commit
23fd89bc8e
3 changed files with 77 additions and 39 deletions
39
.cirrus.yml
39
.cirrus.yml
|
|
@ -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
|
|
||||||
70
.github/workflows/build.yml
vendored
70
.github/workflows/build.yml
vendored
|
|
@ -144,3 +144,73 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
meson setup -Dtools=true -Dtests=false build
|
meson setup -Dtools=true -Dtests=false build
|
||||||
meson compile -C 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
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# 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 ]
|
if [ -f /etc/os-release ]
|
||||||
then
|
then
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue