image: freebsd/latest
arch: amd64
packages:
  - curl
  - jq
  - sqlite3
sources:
  - https://github.com/vrischmann/zig-sqlite

tasks:
  - install_zig: |
      curl -L -s "https://ziglang.org/download/index.json" | jq '.master["x86_64-freebsd"].tarball' -r >> ~/zig_master_url
      curl -J -o ~/zig.tar.xz $(cat ~/zig_master_url)
      tar xJf ~/zig.tar.xz
      mv ~/zig-freebsd-* ~/zig-master
      echo "export PATH=$PATH:~/zig-master" >> ~/.buildenv

  - test_in_memory: |
      cd zig-sqlite
      TERM=dumb zig build test -Din_memory=true
