language: c
matrix:
  include:
    - name: "Ubuntu amd64"
      os: linux
      dist: bionic
      addons:
        apt:
          packages:
          - libz-dev
          - libbz2-dev
          - liblzma-dev
          - libzstd-dev
          - libcurl4-gnutls-dev
      script: ./autogen.sh && ./configure && make check
      after_failure: cat tests/testsuite.log
    - name: "OSX"
      os: osx
      before_install:
        brew update && brew install libtool
      script: ./autogen.sh && ./configure && make check
      after_failure: cat tests/testsuite.log
    - name: "Windows i386"
      os: linux
      dist: bionic
      before_install:
      - sudo apt-get update -qq
      - sudo apt-get install g++-mingw-w64-i686
      addons:
        apt:
          packages:
          - g++-mingw-w64-i686
      env:
        WCC: i686-w64-mingw32-gcc
      script: ./autogen.sh && ./configure --host=i686-w64-mingw32 CC=$WCC && make
      after_failure: cat config.log
