forked from graalvm/simplelanguage
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
59 lines (53 loc) · 2.59 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
os:
- linux
- osx
language: java
jdk:
- openjdk8
- openjdk11
env:
- GRAALVM_VERSION="20.3.0" GRAALVM_JAVA_VERSION="8"
- GRAALVM_VERSION="20.3.0" GRAALVM_JAVA_VERSION="11"
- GRAALVM_VERSION="NONE" TCL_BUILD_NATIVE="false"
matrix:
exclude:
- env: GRAALVM_VERSION="20.2.0" GRAALVM_JAVA_VERSION="8"
jdk: openjdk11
os: linux
- env: GRAALVM_VERSION="20.3.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" TCL_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
- ./tcl language/tests/Add.tcl
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then ./native/tclnative language/tests/Add.tcl; fi
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then "$JAVA_HOME/bin/gu" install -L component/tcl-component.jar ; fi
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then "$JAVA_HOME/bin/tcl" language/tests/Add.tcl; fi
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then "$JAVA_HOME/bin/tclnative" language/tests/Add.tcl; fi
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then "$JAVA_HOME/bin/polyglot" --jvm --language tcl --file language/tests/Add.tcl; fi
- if [[ "$GRAALVM_VERSION" != "NONE" ]]; then "$JAVA_HOME/bin/gu" remove tcl; fi
- mvn package
- ./tcl language/tests/Add.tcl
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck tcl; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then (find . -name '*.sh' | grep -v graalvm | xargs shellcheck); fi