language: c

compiler:
  - gcc
  - clang

before_install:
  - ./scripts/test.sh deps
  - ./scripts/test.sh pydeps

before_script:
  - sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0

script:
  - ./scripts/test.sh

env:
  global:
    - TESTS_REDUCED_KEYLENGTHS=yes
    - LEAK_DETECTIVE=no
    - MONOLITHIC=no
  matrix:
    - TEST=default
    - TEST=default MONOLITHIC=yes
    - TEST=default LEAK_DETECTIVE=yes
    - TEST=openssl
    - TEST=openssl LEAK_DETECTIVE=yes
    - TEST=gcrypt
    - TEST=gcrypt LEAK_DETECTIVE=yes
    # we can't test Vstr as negative int args are not properly passed to CBs
    - TEST=printf-builtin
    - TEST=printf-builtin LEAK_DETECTIVE=yes
    - TEST=all
    - TEST=all MONOLITHIC=yes
    - TEST=all LEAK_DETECTIVE=yes

matrix:
  include:
    - compiler: gcc
      env: TEST=dist
    - compiler: gcc
      env: TEST=win64 MONOLITHIC=yes
    - compiler: gcc
      env: TEST=win32 MONOLITHIC=yes
    - compiler: clang
      os: osx
      env: TEST=osx
