| 1 |
# Run cargo tests in a FreeBSD VM. This needs to run on one of the GitHub macos runners, because |
| 2 |
# they are currently the only ones to support virtualization. |
| 3 |
# |
| 4 |
# See https://github.com/vmactions/freebsd-vm |
| 5 |
|
| 6 |
on: |
| 7 |
push: |
| 8 |
branches: |
| 9 |
- master |
| 10 |
pull_request: |
| 11 |
branches: |
| 12 |
- master |
| 13 |
|
| 14 |
name: freebsd |
| 15 |
|
| 16 |
jobs: |
| 17 |
test: |
| 18 |
runs-on: ubuntu-22.04 |
| 19 |
steps: |
| 20 |
- uses: actions/checkout@v4 |
| 21 |
- name: Run tests in FreeBSD VM |
| 22 |
uses: vmactions/freebsd-vm@v1 |
| 23 |
with: |
| 24 |
usesh: true |
| 25 |
prepare: | |
| 26 |
pkg install -y curl |
| 27 |
curl https://sh.rustup.rs -sSf --output rustup.sh |
| 28 |
sh rustup.sh -y --profile minimal --default-toolchain stable |
| 29 |
export PATH="${HOME}/.cargo/bin:$PATH" |
| 30 |
echo "~~~~ rustc --version ~~~~" |
| 31 |
rustc --version |
| 32 |
|
| 33 |
run: | |
| 34 |
export PATH="${HOME}/.cargo/bin:$PATH" |
| 35 |
ls -la |
| 36 |
cargo build --verbose |
| 37 |
cargo test --verbose |