-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
39 lines (39 loc) · 1.19 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
language: rust
rust:
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
fast_finish: true
env:
- NODE_VER="--lts"
before_install:
# google search says travis nvm is old and buggy
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $NODE_VER
install:
- rustup target add wasm32-unknown-unknown
script:
- cargo build --verbose
#; cargo test --verbose
# no cargo test for wasm
- cargo build --verbose --release --examples
- (
nvm run --silent $NODE_VER -e 'require("./target/wasm32-unknown-unknown/release/wap.js").wap("target/wasm32-unknown-unknown/release/examples/hello_node.wasm")' > out;
R=$?;
cat out;
OUT=$(cat out);
rm out;
if [ $R -ne 0 ];then exit $R; fi;
test "$OUT" = "Hello World"
)
- (
nvm run --silent $NODE_VER -e 'require("./target/wasm32-unknown-unknown/release/wap.js").wap("target/wasm32-unknown-unknown/release/examples/test_node.wasm")' > out;
R=$?;
cat out;
OUT=$(cat out);
rm out;
if [ $R -ne 0 ];then exit $R; fi;
test "$OUT" = "Tests Complete. (Finally shutdown)"
)