Skip to content

Commit b51d933

Browse files
cpucomplexspaces
authored andcommitted
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.
1 parent 52b8b61 commit b51d933

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,28 @@ jobs:
162162
163163
# TODO: Test iOS in CI too.
164164

165+
test-freebsd:
166+
name: Test (FreeBSD)
167+
runs-on: ubuntu-latest
168+
steps:
169+
- uses: actions/checkout@v4
170+
- name: test on freebsd
171+
uses: vmactions/freebsd-vm@v1
172+
# Settings adopted from https://github.com/quinn-rs/quinn
173+
with:
174+
usesh: true
175+
mem: 4096
176+
copyback: false
177+
prepare: |
178+
pkg install -y curl
179+
curl https://sh.rustup.rs -sSf --output rustup.sh
180+
sh rustup.sh -y --profile minimal --default-toolchain stable
181+
echo "~~~~ rustc --version ~~~~"
182+
$HOME/.cargo/bin/rustc --version
183+
echo "~~~~ freebsd-version ~~~~"
184+
freebsd-version
185+
run: $HOME/.cargo/bin/cargo test
186+
165187
fmt:
166188
name: Rustfmt
167189
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)