wasm-bindgen/.travis.yml

144 lines
5.5 KiB
YAML
Raw Normal View History

2017-12-19 01:49:04 +03:00
language: rust
sudo: false
matrix:
include:
2018-03-06 06:25:50 +03:00
# CLI builds on stable
- rust: stable
install: true
2018-03-29 18:50:08 +03:00
script: cargo build --manifest-path crates/cli/Cargo.toml
2018-03-06 06:25:50 +03:00
# Tests pass on nightly
2017-12-19 01:49:04 +03:00
- rust: nightly
2018-06-22 06:35:04 +03:00
before_install:
- rustup target add wasm32-unknown-unknown
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install v10.5
install:
# dirties git repository, there doesn't seem to be a way to resolve this other than
# to run `npm install` twice or by using `npm ci` (which is currently broken)
- npm install
2018-06-19 23:40:39 +03:00
script:
2018-06-15 20:55:37 +03:00
- cargo test
# Check JS output from all tests against eslint
- ./node_modules/.bin/eslint ./target/generated-tests/*/out*.js
2018-04-03 19:34:37 +03:00
env: RUST_BACKTRACE=1
2018-06-22 06:35:04 +03:00
# Tests pass on nightly using yarn
- rust: nightly
before_install:
- rustup target add wasm32-unknown-unknown
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install v10.5
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.7.0
- export PATH=$HOME/.yarn/bin:$PATH
install:
- yarn install --freeze-lockfile
script:
- cargo test
# Check JS output from all tests against eslint
- ./node_modules/.bin/eslint ./target/generated-tests/*/out*.js
env: RUST_BACKTRACE=1
2018-06-28 08:38:16 +03:00
# WebIDL tests pass on nightly
- rust: nightly
before_install: rustup component add rustfmt-preview --toolchain nightly
script: (cd crates/webidl && cargo test)
env: RUST_BACKTRACE=1 RUST_LOG=wasm_bindgen_webidl
2017-12-19 01:49:04 +03:00
2018-03-06 06:25:50 +03:00
# Dist linux binary
- env: TARGET=x86_64-unknown-linux-musl DEPLOY=1
2018-04-10 00:42:47 +03:00
rust: nightly
2018-03-06 06:25:50 +03:00
before_script: rustup target add $TARGET
2018-03-29 18:50:08 +03:00
script: cargo build --manifest-path crates/cli/Cargo.toml --release --target $TARGET
addons:
apt:
packages:
- musl-tools
2018-03-06 06:25:50 +03:00
# Dist OSX binary
- os: osx
2018-04-10 00:42:47 +03:00
rust: nightly
2018-03-06 06:25:50 +03:00
env: MACOSX_DEPLOYMENT_TARGET=10.7 DEPLOY=1 TARGET=x86_64-apple-darwin
2018-03-29 18:50:08 +03:00
script: cargo build --manifest-path crates/cli/Cargo.toml --release --target $TARGET
2018-03-23 07:18:03 +03:00
install: true
# We can build the tool on nightly
- rust: nightly
2018-03-29 18:50:08 +03:00
script: cargo install --debug --path crates/cli
2018-03-23 07:18:03 +03:00
# All examples work
- rust: nightly
2018-06-22 06:35:04 +03:00
before_install:
- rustup target add wasm32-unknown-unknown
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install v10.5
2018-03-23 07:18:03 +03:00
script:
- |
(cd examples/hello_world && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./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)
- |
(cd examples/char && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh)
2018-04-10 00:41:24 +03:00
- |
(cd examples/closures && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh)
- |
(cd examples/comments && sed -i 's/: "webpack-dev-server"/: "webpack"/' package.json && ./build.sh)
2018-03-06 06:25:50 +03:00
# Build the guide.
- rust: stable
cache:
- cargo
before_script:
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
- (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.1" mdbook)
- cargo install-update -a
script:
- (cd guide && mdbook build)
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure
local-dir: guide/book
keep-history: false
on:
branch: master
2017-12-19 01:49:04 +03:00
notifications:
email:
on_success: never
2018-03-06 06:25:50 +03:00
before_deploy:
|
if [[ "$DEPLOY" == "1" ]]; then
name="wasm-bindgen-$TRAVIS_TAG-$TARGET"
mkdir "$name"
cp "target/$TARGET/release/{wasm-bindgen,wasm2es6js}" "$name/"
cp README.md LICENSE-MIT LICENSE-APACHE "$name/"
tar czvf "$name.tar.gz" "$name"
fi
2018-03-06 06:25:50 +03:00
deploy:
api_key:
secure: "qCiELnEnvyKpWHDttgTNf+ElZGbWlvthu5aOIj5nYfov+h6g1+mkWnDFP6at/WPlE78zE/f/z/dL2KB2I7w/cxH/T4P1nWh0A9DvrpY6hqWkK2pgN5dPeWE/a4flI7AdH0A6wMRw7m00uMgDjlzN78v7XueccpJCxSO5allQN5jweAQvMX2QA07TbLRJc7Lq6lfVwSf8OfrcO8qCbcIzJTsC4vtbh6jkUYg1OAaU2tAYlskBy9ZYmHWCExIAu/zxzcJY9OpApPD9Ea4CyrsfjniAyRBJ87Weh/sP4XhiWeRPVmvA4HAzv4Pps9ps+Ar5QmsX53rhKQ3id7/VPR8ggaAHxrYUiJPvJRtbP6cKKOlDiK0ooP+vI4vjxWeNVj9ibEolSYOlT0ENIvPK1BppA6VgAoJOjwPr0Q16Ma4AmvLkIkowJiXCm2Jlje/5c0vPEAGJVgUtkj3jFQzgXwyEMpzxUlhHmYpmnfeaM0tK/Kiiwe1monL/ydMlyfV55kNylylCg+XoTnf420AFChKbD4DM5Z7ZsjU9g8fF3LUoN0sKpmLDp+GvwjLi9YtGogWB71Q2MFp43MSL0YLshkyYYoZKrVMiy5J9hKNUxhT2jNEq53Z69syIHHMCxHL9GoAcuHxIKOA7uTMW0aCoyy2I+dfAKKsrUGwGYaNC5LZdUQI="
file_glob: true
file:
- wasm-bindgen-$TRAVIS_TAG-$TARGET.tar.gz
on:
condition: $DEPLOY = 1
tags: true
provider: releases
skip_cleanup: true