language: java

jobs:
  include:
    - name: Linux test (amd64)
      os: linux
      arch: amd64
      dist: trusty
      jdk:
        - openjdk8
      install:
        - wget https://github.com/lz4/lz4/archive/v1.9.2.tar.gz
        - tar xzvf v1.9.2.tar.gz
        - pushd lz4-1.9.2 && make && sudo make install && popd
        - wget http://apache.osuosl.org/ant/binaries/apache-ant-1.10.6-bin.tar.gz
        - tar xvzf apache-ant-1.10.6-bin.tar.gz
        - ./apache-ant-1.10.6/bin/ant ivy-bootstrap
        - ./apache-ant-1.10.6/bin/ant init
      script:
        - ./apache-ant-1.10.6/bin/ant dist
        - ./apache-ant-1.10.6/bin/ant test
        - ./apache-ant-1.10.6/bin/ant clean
        - ./apache-ant-1.10.6/bin/ant test-skip-jni

    - name: Linux test (arm64)
      os: linux
      arch: arm64
      jdk:
        - openjdk8
      install:
        - wget https://github.com/lz4/lz4/archive/v1.9.2.tar.gz
        - tar xzvf v1.9.2.tar.gz
        - pushd lz4-1.9.2 && make && sudo make install && popd
        - wget http://apache.osuosl.org/ant/binaries/apache-ant-1.10.6-bin.tar.gz
        - tar xvzf apache-ant-1.10.6-bin.tar.gz
        - ./apache-ant-1.10.6/bin/ant ivy-bootstrap
        - ./apache-ant-1.10.6/bin/ant init
      script:
        - ./apache-ant-1.10.6/bin/ant dist
        - ./apache-ant-1.10.6/bin/ant test
        - ./apache-ant-1.10.6/bin/ant clean
        - ./apache-ant-1.10.6/bin/ant test-skip-jni

    - name: Linux test (ppc64le)
      os: linux
      arch: ppc64le
      jdk:
        - openjdk8
      install:
        - wget https://github.com/lz4/lz4/archive/v1.9.2.tar.gz
        - tar xzvf v1.9.2.tar.gz
        - pushd lz4-1.9.2 && make && sudo make install && popd
        - wget http://apache.osuosl.org/ant/binaries/apache-ant-1.10.6-bin.tar.gz
        - tar xvzf apache-ant-1.10.6-bin.tar.gz
        - ./apache-ant-1.10.6/bin/ant ivy-bootstrap
        - ./apache-ant-1.10.6/bin/ant init
      script:
        - ./apache-ant-1.10.6/bin/ant dist
        - ./apache-ant-1.10.6/bin/ant test
        - ./apache-ant-1.10.6/bin/ant clean
        - ./apache-ant-1.10.6/bin/ant test-skip-jni

    - name: macOS test
      os: osx
      osx_image: xcode9.3
      install:
        - wget https://github.com/lz4/lz4/archive/v1.9.2.tar.gz
        - tar xzvf v1.9.2.tar.gz
        - pushd lz4-1.9.2 && make && sudo make install && popd
        - wget http://apache.osuosl.org/ant/binaries/apache-ant-1.10.6-bin.tar.gz
        - tar xvzf apache-ant-1.10.6-bin.tar.gz
        - ./apache-ant-1.10.6/bin/ant ivy-bootstrap
        - ./apache-ant-1.10.6/bin/ant init
      script:
        - ./apache-ant-1.10.6/bin/ant dist
        - ./apache-ant-1.10.6/bin/ant test
        - ./apache-ant-1.10.6/bin/ant clean
        - ./apache-ant-1.10.6/bin/ant test-skip-jni
