os:
    - linux
    - osx

language: java

env:
    - GRAALVM_VERSION="1.0.0-rc8"

install:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]];   then DOWNLOAD_OS_NAME="macos"; fi
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then DOWNLOAD_OS_NAME="linux"; fi
    - curl -LJ "https://github.com/oracle/graal/releases/download/vm-$GRAALVM_VERSION/graalvm-ce-$GRAALVM_VERSION-$DOWNLOAD_OS_NAME-amd64.tar.gz" --output graalvm.tar.gz;
    - tar -xzf graalvm.tar.gz
    - export JAVA_HOME="$(pwd)/graalvm-ce-$GRAALVM_VERSION" && if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export JAVA_HOME="$JAVA_HOME/Contents/Home"; fi

script:
    - mvn package
    - ./sl language/tests/Add.sl
    - ./native/slnative language/tests/Add.sl

os:
    - linux
    - osx

language: java

jdk:
    oraclejdk8
    openjdk11

env:
    - GRAALVM_VERSION="1.0.0-rc8"
    - GRAALVM_VERSION="NONE"

install:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]];   then DOWNLOAD_OS_NAME="macos"; fi
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then DOWNLOAD_OS_NAME="linux"; fi
    - |
        if [[ "GRAALVM_VERSION" != "NONE" ]]; then \
          curl -LJ "https://github.com/oracle/graal/releases/download/vm-$GRAALVM_VERSION/graalvm-ce-$GRAALVM_VERSION-$DOWNLOAD_OS_NAME-amd64.tar.gz" --output graalvm.tar.gz \
          tar -xzf graalvm.tar.gz \
          export JAVA_HOME="$(pwd)/graalvm-ce-$GRAALVM_VERSION" && if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export JAVA_HOME="$JAVA_HOME/Contents/Home"\
        fi

script:
    - mvn package
    - ./sl language/tests/Add.sl
    - if [[ "GRAALVM_VERSION" != "NONE" ]]; then ./native/slnative language/tests/Add.sl; fi

Test SL with jdk8 and jdk11.
Test SL with jdk8 and jdk11.
