Skip to content

Commit

Permalink
ci: add FreeBSD cargo test job
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cpu committed Jan 5, 2024
1 parent 52b0664 commit 7a6220b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a6220b

Please sign in to comment.