language: c
dist: trusty

compiler:
  - clang
  - gcc

env:
  -                                      CFLAGS='-Werror'
  - NO_VALGRIND=1 USE_STANDARD_TMPFILE=1 CFLAGS='-Werror'
  - NO_VALGRIND=1                        CFLAGS='-Werror -m32'
  - NO_VALGRIND=1 USE_SYSTEM_MINIZIP=1   CFLAGS='-Werror'
  - NO_VALGRIND=1 USE_DOUBLE_FUNCTION=1  CFLAGS='-Werror'

install:
  - sudo pip install pytest
  - sudo apt-get update
  - sudo apt-get remove -y oracle-java9-installer
  - sudo apt-get install -y gcc-multilib
  - sudo apt-get install -y zlib1g-dev
  - sudo apt-get install -y zlib1g-dev:i386
  - sudo apt-get install -y gcc
  - sudo apt-get install -y valgrind

  - wget http://mirrors.kernel.org/ubuntu/pool/universe/m/minizip/libminizip-dev_1.1-8_amd64.deb
  - wget http://mirrors.kernel.org/ubuntu/pool/universe/m/minizip/libminizip1_1.1-8_amd64.deb
  - sudo dpkg -i libminizip1_1.1-8_amd64.deb
  - sudo dpkg -i libminizip-dev_1.1-8_amd64.deb

script:
  - make V=1
  - make test_functional V=1
  - make test_unit V=1
  - make examples V=1
  - make test_valgrind V=1
  - sudo make install V=1
  - sudo make uninstall V=1