From 7a6220bc9699a8b2da018736baf5b4abf0e021ce Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Thu, 4 Jan 2024 12:14:45 -0500 Subject: [PATCH] ci: add FreeBSD cargo test job Since GitHub actions doesn't offer FreeBSD runners we follow the Quinn project's lead and use `vmactions/freebsd-vm@v1` to run a FreeBSD VM on the runner, and our tests within the VM. --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 382b9a0..34f572a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,6 +162,28 @@ jobs: # TODO: Test iOS in CI too. + test-freebsd: + name: Test (FreeBSD) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: test on freebsd + uses: vmactions/freebsd-vm@v1 + # Settings adopted from https://github.com/quinn-rs/quinn + with: + usesh: true + mem: 4096 + copyback: false + prepare: | + pkg install -y curl + curl https://sh.rustup.rs -sSf --output rustup.sh + sh rustup.sh -y --profile minimal --default-toolchain stable + echo "~~~~ rustc --version ~~~~" + $HOME/.cargo/bin/rustc --version + echo "~~~~ freebsd-version ~~~~" + freebsd-version + run: $HOME/.cargo/bin/cargo test + fmt: name: Rustfmt runs-on: ubuntu-latest