task:
  name: Cirrus CI / freebsd unit tests
  freebsd_instance:
    image_family: freebsd-15-0-amd64-ufs
    memory: 2GB
  setup_rust_script:
    - pkg install -y git-tiny
    - curl https://sh.rustup.rs -sSf --output rustup.sh
    - sh rustup.sh -y --profile=minimal
  test_script:
    - . $HOME/.cargo/env
    - |
      # We skip a couple of tests which fail when running as root.
      # test_traverse_secure_open_positive fails because the build directory is
      # in the world writable /tmp.
      cargo test --workspace --all-targets --release -- --skip group_as_non_root \
        --skip test_secure_open_cookie_file --skip test_traverse_secure_open_positive
