Skip to content

Commit a3039bd

Browse files
mfikesdnolen
authored andcommitted
CLJS-2745: Add GraalVM to the set of JavaScript engines we can test against
1 parent e577d46 commit a3039bd

4 files changed

Lines changed: 29 additions & 2 deletions

File tree

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ before_install:
1414
- sudo apt-get install -y libjavascriptcoregtk-3.0-bin
1515
- wget https://aka.ms/chakracore/cc_linux_x64_1_8_1 -O chakra-core.tar.gz
1616
- tar xvzf chakra-core.tar.gz
17+
- wget https://github.com/oracle/graal/releases/download/vm-1.0.0-rc1/graalvm-ce-1.0.0-rc1-linux-amd64.tar.gz
18+
- tar xzf graalvm-ce-1.0.0-rc1-linux-amd64.tar.gz
1719

1820
before_script:
1921
- script/bootstrap
@@ -53,6 +55,8 @@ script:
5355
- grep '0 failures, 0 errors.' test-out.txt
5456
- ./ChakraCoreFiles/bin/ch builds/out-adv/core-advanced-test.js | tee test-out.txt
5557
- grep '0 failures, 0 errors.' test-out.txt
58+
- ./graalvm-1.0.0-rc1/bin/js builds/out-adv/core-advanced-test.js | tee test-out.txt
59+
- grep '0 failures, 0 errors.' test-out.txt
5660
- script/test-self-host | tee test-out.txt
5761
- grep '0 failures, 0 errors.' test-out.txt
5862
- script/test-self-parity | tee test-out.txt

script/benchmark

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,10 @@ else
3939
echo "Benchmarking with ChakraCore"
4040
"${CHAKRACORE_HOME}/ch" builds/out-adv-bench/core-advanced-benchmark.js
4141
fi
42+
43+
if [ "$GRAALVM_HOME" = "" ]; then
44+
echo "GRAALVM_HOME not set, skipping GraalVM benchmarks"
45+
else
46+
echo "Benchmarking with GraalVM"
47+
"${GRAALVM_HOME}/js" builds/out-adv-bench/core-advanced-benchmark.js
48+
fi

script/test

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ rm -rf package-lock.json
99
echo {} > package.json
1010
mkdir -p builds/out-adv
1111

12-
possible=5
12+
possible=6
1313
ran=0
1414

1515
if ! bin/cljsc src/test/cljs "{:optimizations :advanced
@@ -80,4 +80,12 @@ else
8080
ran=$((ran+1))
8181
fi
8282

83+
if [ "$GRAALVM_HOME" = "" ]; then
84+
echo "GRAALVM_HOME not set, skipping GraalVM tests"
85+
else
86+
echo "Testing with GraalVM"
87+
"${GRAALVM_HOME}/js" builds/out-adv/core-advanced-test.js
88+
ran=$((ran+1))
89+
fi
90+
8391
echo "Tested with $ran out of $possible possible js targets"

script/test-simple

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ rm -rf package-lock.json
88
echo {} > package.json
99
mkdir -p builds/out-simp
1010

11-
possible=5
11+
possible=6
1212
ran=0
1313

1414
#bin/cljsc test >out/core-test.js
@@ -80,4 +80,12 @@ else
8080
ran=$[ran+1]
8181
fi
8282

83+
if [ "$GRAALVM_HOME" = "" ]; then
84+
echo "GRAALVM_HOME not set, skipping GraalVM tests"
85+
else
86+
echo "Testing with GraalVM"
87+
"${GRAALVM_HOME}/js" builds/out-simp/core-simple-test.js
88+
ran=$[ran+1]
89+
fi
90+
8391
echo "Tested with $ran out of $possible possible js targets"

0 commit comments

Comments
 (0)