1freebsd_instance:
2  image: freebsd-11-2-release-amd64
3
4# Test FreeBSD in a full VM on cirrus-ci.com.  Test the i686 target too, in the
5# same VM.  The binary will be built in 32-bit mode, but will execute on a
6# 64-bit kernel and in a 64-bit environment.  Our tests don't execute any of
7# the system's binaries, so the environment shouldn't matter.
8task:
9  name: FreeBSD 11.2
10  # Install Rust
11  setup_script:
12    - pkg install -y curl
13    - curl https://sh.rustup.rs -sSf --output rustup.sh
14    - sh rustup.sh -y --default-toolchain 1.24.1
15    - $HOME/.cargo/bin/rustup target add i686-unknown-freebsd
16  amd64_test_script:
17    - . $HOME/.cargo/env
18    - cargo test
19  i386_test_script:
20    - . $HOME/.cargo/env
21    - cargo test --target i686-unknown-freebsd
22