From 9147bd946f1d1a91203dd87df275aaeb49671e5c Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 5 Oct 2026 08:23:31 -0400 Subject: [PATCH 1/3] FreeBSD: build and test the workspace in a FreeBSD VM Co-Authored-By: Claude Opus 5.5 --- .github/workflows/freebsd.yml | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/freebsd.yml diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml new file mode 100644 index 00000000..5f93f997 --- /dev/null +++ b/.github/workflows/freebsd.yml @@ -0,0 +1,45 @@ +# Builds and tests the workspace on FreeBSD, inside a FreeBSD VM on a Linux runner +# (GitHub has no FreeBSD runners). GPU tests skip themselves when the VM has no adapter. +name: FreeBSD + +on: + push: + branches: [main] + pull_request: + paths: + - Cargo.toml + - Cargo.lock + - "**/Cargo.toml" + - .github/workflows/freebsd.yml + workflow_dispatch: + +concurrency: + group: freebsd-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + freebsd: + name: FreeBSD 14 (build + test) + runs-on: ubuntu-latest + timeout-minutes: 300 + steps: + - uses: actions/checkout@v4 + - name: Build and test in a FreeBSD VM + uses: vmactions/freebsd-vm@v1 + with: + release: "14.3" + usesh: true + mem: 12288 + # Nothing to bring back; copying the target dir out of the VM fails on large builds. + copyback: false + prepare: | + pkg install -y curl pkgconf cmake python3 libxkbcommon wayland libX11 libXcursor libXrandr libXi libxcb mesa-libs vulkan-loader gtk3 fontconfig freetype2 alsa-lib + curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal + run: | + . "$HOME/.cargo/env" + rustc --version + CARGO_PROFILE_DEV_DEBUG=0 cargo build --workspace --all-targets --locked + CARGO_PROFILE_DEV_DEBUG=0 cargo test --workspace --locked From 6fafe67653ec464dfb6cf4d4d6b80f34ad433f56 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 5 Oct 2026 08:46:32 -0400 Subject: [PATCH 2/3] FreeBSD CI: install git in the VM (xtask's asset test lists tracked files) Co-Authored-By: Claude Opus 5.5 --- .github/workflows/freebsd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 5f93f997..0b219dd3 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -36,7 +36,7 @@ jobs: # Nothing to bring back; copying the target dir out of the VM fails on large builds. copyback: false prepare: | - pkg install -y curl pkgconf cmake python3 libxkbcommon wayland libX11 libXcursor libXrandr libXi libxcb mesa-libs vulkan-loader gtk3 fontconfig freetype2 alsa-lib + pkg install -y git curl pkgconf cmake python3 libxkbcommon wayland libX11 libXcursor libXrandr libXi libxcb mesa-libs vulkan-loader gtk3 fontconfig freetype2 alsa-lib curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal run: | . "$HOME/.cargo/env" From 49d2a2040c20b341f1845a16ea7bd8eff1a9eb88 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 5 Oct 2026 09:21:23 -0400 Subject: [PATCH 3/3] FreeBSD CI: git safe.directory, 4 vCPUs, pinned vmactions/freebsd-vm Co-Authored-By: Claude Opus 5.5 --- .github/workflows/freebsd.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 0b219dd3..9dc8fe0b 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -28,10 +28,11 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build and test in a FreeBSD VM - uses: vmactions/freebsd-vm@v1 + uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc # v1 with: release: "14.3" usesh: true + cpu: 4 mem: 12288 # Nothing to bring back; copying the target dir out of the VM fails on large builds. copyback: false @@ -40,6 +41,8 @@ jobs: curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal run: | . "$HOME/.cargo/env" + # The checkout is synced in under another owner; let tests that call git read it. + git config --global --add safe.directory "*" rustc --version CARGO_PROFILE_DEV_DEBUG=0 cargo build --workspace --all-targets --locked CARGO_PROFILE_DEV_DEBUG=0 cargo test --workspace --locked