forked from graalvm/simplelanguage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (54 loc) · 2.6 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
os:
- linux
- osx
language: java
jdk:
- openjdk8
- openjdk11
env:
- GRAALVM_VERSION="21.1.0" GRAALVM_JAVA_VERSION="8"
- GRAALVM_VERSION="21.1.0" GRAALVM_JAVA_VERSION="11"
- GRAALVM_VERSION="NONE" SL_BUILD_NATIVE="false"
matrix:
exclude:
- env: GRAALVM_VERSION="21.1.0" GRAALVM_JAVA_VERSION="8"
jdk: openjdk11
os: linux
- env: GRAALVM_VERSION="21.1.0" GRAALVM_JAVA_VERSION="11"
jdk: openjdk11
os: linux
# Travis does not provide an adequate jdk8 on mac (mac versioning issue)
- jdk: openjdk8
os: osx
# There seems to be an issue with this setup where maven runs on java 10
- jdk: openjdk11
os: osx
env: GRAALVM_VERSION="NONE" SL_BUILD_NATIVE="false"
install:
- cd .. && mv simplelanguage "simple language" && cd "simple language"
- |
if [[ "$GRAALVM_VERSION" != "NONE" ]]; then
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then DOWNLOAD_OS_NAME="darwin"; fi
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then DOWNLOAD_OS_NAME="linux"; fi
curl -LJ "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-$GRAALVM_VERSION/graalvm-ce-java$GRAALVM_JAVA_VERSION-$DOWNLOAD_OS_NAME-amd64-$GRAALVM_VERSION.tar.gz" --output graalvm.tar.gz
tar -xzf graalvm.tar.gz
export JAVA_HOME="$(pwd)/graalvm-ce-java$GRAALVM_JAVA_VERSION-$GRAALVM_VERSION"
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export JAVA_HOME="$JAVA_HOME/Contents/Home"; fi
"$JAVA_HOME/bin/gu" install native-image
else
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export JAVA_HOME=$(/usr/libexec/java_home); fi
fi
script:
- mvn package
- ./sl language/tests/Add.sl
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then ./native/slnative language/tests/Add.sl; fi
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then "$JAVA_HOME/bin/gu" install -L component/sl-component.jar ; fi
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then "$JAVA_HOME/bin/sl" language/tests/Add.sl; fi
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then "$JAVA_HOME/bin/slnative" language/tests/Add.sl; fi
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then "$JAVA_HOME/bin/polyglot" --jvm --language sl --file language/tests/Add.sl; fi
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then "$JAVA_HOME/bin/gu" remove sl; fi
- ./generate_parser.sh
- mvn package
- ./sl language/tests/Add.sl
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck sl; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then (find . -name '*.sh' | grep -v graalvm | xargs shellcheck); fi