mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-13 23:17:42 +00:00
Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
61 lines
2.3 KiB
YAML
61 lines
2.3 KiB
YAML
# 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"
|
|
- "crates/fonts/**"
|
|
- .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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
# The Japanese font tests run against craft-fonts (an optional build input; they skip without it).
|
|
- name: Check out craft-fonts
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: storytold/craft-fonts
|
|
ref: abb83316d96aa59c1cf64784289e378fe9fa5695
|
|
path: craft-fonts
|
|
- name: Build and test in a FreeBSD VM
|
|
uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc # v1.5.9
|
|
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
|
|
prepare: |
|
|
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 -o /tmp/rustup-init \
|
|
https://static.rust-lang.org/rustup/archive/1.28.2/x86_64-unknown-freebsd/rustup-init
|
|
test "$(sha256 -q /tmp/rustup-init)" = "4d9fef2e40731489f3186c61a0f178d54d79864fe3d34791edf5b17f70074956"
|
|
chmod 700 /tmp/rustup-init
|
|
/tmp/rustup-init -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
|
|
CRAFT_FONTS_DIR="$PWD/craft-fonts" CARGO_PROFILE_DEV_DEBUG=0 cargo test --workspace --locked
|