env:
  CIRRUS_CLONE_DEPTH: 1

freebsd_task:
  freebsd_instance:
    image_family: freebsd-14-2
  setup_script:
    - pkg install -y autoconf automake libtool pkgconf fusefs-libs
    - pkg install -y lzo2 liblz4 zstd
    - pkg install -y squashfs-tools coreutils
    - kldload fusefs
    - sysctl vfs.usermount=1
  build_script:
    - ./autogen.sh
    - CPPFLAGS="-I/usr/local/include -Werror" LDFLAGS="-L/usr/local/lib" ./configure
    - make
  test_script:
    - make check
    - diff -u ci/expected-features/all ci/features
  install_script:
    - sudo make install
  always:
    after_script:
    - cp /tmp/*.log . || true
    - for f in *.log tests/*.log ci/features; do echo ::: $f; cat $f; done || true
    - mksquashfs || true
