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  cargo_cache:
11    folder: $CARGO_HOME/registry
12    fingerprint_script: cat Cargo.lock || echo ""
13  # Install Rust
14  setup_script:
15    - pkg install -y curl
16    - curl https://sh.rustup.rs -sSf --output rustup.sh
17    - sh rustup.sh -y --default-toolchain 1.24.1
18    - $HOME/.cargo/bin/rustup target add i686-unknown-freebsd
19  amd64_test_script:
20    - . $HOME/.cargo/env
21    - cargo test
22  i386_test_script:
23    - . $HOME/.cargo/env
24    - cargo test --target i686-unknown-freebsd
25  before_cache_script: rm -rf $CARGO_HOME/registry/index
26