diff --git a/.travis.yml b/.travis.yml index 96ca919e..75ca05b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ matrix: # Tests pass on nightly - rust: nightly + before_install: rustup target add wasm32-unknown-unknown + script: cargo test # Dist linux binary - env: TARGET=x86_64-unknown-linux-musl DEPLOY=1 @@ -20,7 +22,30 @@ matrix: - os: osx env: MACOSX_DEPLOYMENT_TARGET=10.7 DEPLOY=1 TARGET=x86_64-apple-darwin script: cargo build --manifest-path crates/wasm-bindgen-cli/Cargo.toml --release --target $TARGET - before_install: brew install yarn --without-node + install: true + + # We can build the tool on nightly + - rust: nightly + script: cargo install --debug --path crates/wasm-bindgen-cli + + # All examples work + - rust: nightly + before_install: rustup target add wasm32-unknown-unknown + script: + - | + (cd examples/hello_world && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) + - | + (cd examples/hello_world/chrome && ./build.sh) + - | + (cd examples/smorgasboard && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) + - | + (cd examples/console_log && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) + - | + (cd examples/math && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) + - | + (cd examples/dom && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) + - | + (cd examples/wasm-in-wasm && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) install: - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash @@ -28,25 +53,6 @@ install: - nvm install 9 - yarn -script: - - rustup target add wasm32-unknown-unknown - - cargo test - - cargo install --debug --path crates/wasm-bindgen-cli - - | - (cd examples/hello_world && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) - - | - (cd examples/hello_world/chrome && ./build.sh) - - | - (cd examples/smorgasboard && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) - - | - (cd examples/console_log && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) - - | - (cd examples/math && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) - - | - (cd examples/dom && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) - - | - (cd examples/wasm-in-wasm && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh) - notifications: email: on_success: never