# On community clusters, we can use up to 8 CPUs and up to 24 GB of memory.
# However, using less usually means we get workers more quickly.
resources_template: &RESOURCES_TEMPLATE
  cpu: 4
  memory: 16GB

# Run only when pushing to master or in PRs.
branch_filter: &BRANCH_FILTER
  only_if: >
    $CIRRUS_PR != '' ||
    $CIRRUS_BRANCH == 'master'

# FreeBSD 12.4 EOL: December 2023
freebsd12_task:
  freebsd_instance:
    image_family: freebsd-12-4
    << : *RESOURCES_TEMPLATE
  prepare_script: .ci/freebsd-12/prepare.sh
  build_script: .ci/run.sh build .ci/debug-flags.cmake . build
  test_script: .ci/run.sh test build net.udp_datagram_socket
  << : *BRANCH_FILTER

# FreeBSD 13.2 EOL: Release of 13.3 + 3 months
freebsd13_task:
  freebsd_instance:
    image_family: freebsd-13-2
    << : *RESOURCES_TEMPLATE
  prepare_script: .ci/freebsd-13/prepare.sh
  build_script: .ci/run.sh build .ci/debug-flags.cmake . build
  test_script: .ci/run.sh test build net.udp_datagram_socket
  << : *BRANCH_FILTER
