Skip to content

Commit ec221ee

Browse files
committed
Initial ci config.
1 parent aa88765 commit ec221ee

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

.travis.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
os:
2+
- linux
3+
- osx
4+
5+
language: java
6+
7+
env:
8+
- GRAALVM_VERSION="19.0.2"
9+
- GRAALVM_VERSION="NONE" SL_BUILD_NATIVE="false"
10+
11+
install:
12+
- |
13+
cd .. && mv simpletool "simple tool" && cd "simple tool"
14+
if [[ "$GRAALVM_VERSION" != "NONE" ]]; then
15+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then DOWNLOAD_OS_NAME="darwin"; fi
16+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then DOWNLOAD_OS_NAME="linux"; fi
17+
curl -LJ "https://github.com/oracle/graal/releases/download/vm-$GRAALVM_VERSION/graalvm-ce-$DOWNLOAD_OS_NAME-amd64-$GRAALVM_VERSION.tar.gz" --output graalvm.tar.gz
18+
tar -xzf graalvm.tar.gz
19+
export JAVA_HOME="$(pwd)/graalvm-ce-$GRAALVM_VERSION"
20+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export JAVA_HOME="$JAVA_HOME/Contents/Home"; fi
21+
"$JAVA_HOME/bin/gu" install native-image
22+
else
23+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export JAVA_HOME=$(/usr/libexec/java_home); fi
24+
fi
25+
26+
script:
27+
- mvn package
28+
- ./simpletool js example.js

ci.jsonnet

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
local basicBuild = {
3+
targets: ['gate'],
4+
timelimit: '00:59:59',
5+
run: [
6+
['mvn', 'clean'],
7+
['mvn', 'package'],
8+
['./simpletool', 'js', 'example.js'],
9+
],
10+
},
11+
12+
local graalvm = {
13+
downloads+: {
14+
JAVA_HOME: { name: 'graalvm', version: '19.0.2', platformspecific: true },
15+
},
16+
},
17+
18+
local linux = {
19+
capabilities+: ['linux', 'amd64'],
20+
packages+: {
21+
maven: '==3.3.9',
22+
},
23+
},
24+
25+
local darwin = {
26+
capabilities+: ['darwin_sierra', 'amd64'],
27+
environment+: {
28+
MACOSX_DEPLOYMENT_TARGET: '10.11',
29+
},
30+
},
31+
32+
builds: [
33+
basicBuild + linux + graalvm + { name: 'linux' },
34+
35+
basicBuild + darwin + graalvm + { name: 'darwin' },
36+
],
37+
}

0 commit comments

Comments
 (0)