task:
  name: x86_64-unknown-freebsd
  freebsd_instance:
    image_family: freebsd-13-4
  env:
    # FIXME(freebsd): FreeBSD has a segfault when `RUST_BACKTRACE` is set
    # https://github.com/rust-lang/rust/issues/132185
    RUST_BACKTRACE: "0"
  setup_script:
    - curl https://sh.rustup.rs -sSf --output rustup.sh
    - sh rustup.sh --default-toolchain nightly -y
    - . $HOME/.cargo/env
    - rustup default nightly
  test_script:
    - . $HOME/.cargo/env
    - cargo build --all
