freebsd_instance:
  image_family: freebsd-12-1

task:
  install_script: |
    IGNORE_OSVERSION=yes pkg update
    pkg install -U -y git boost_build boost-libs unzip wget openssl cmake ninja
    echo "using clang ;" > ~/user-config.jam
  submodules_script: |
    git submodule update --init --recursive
  build_cmake_script: |
    cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_CXX_STANDARD=14 -Dbuild_tests=ON -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=OFF -G Ninja .
    cmake --build . --parallel 2
    ./test/test_primitives
  tests_script: |
    cd test
    b2 -l250 warnings-as-errors=on warnings=all crypto=openssl deterministic-tests include=/usr/local/include library-path=/usr/local/lib
  enum_if_script: |
    cd test
    b2 -l250 warnings-as-errors=on warnings=all crypto=openssl stage_enum_if stage_dependencies include=/usr/local/include library-path=/usr/local/lib
    LD_LIBRARY_PATH=./dependencies ./enum_if
