mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-11-24 06:33:33 +03:00
94 lines
3.6 KiB
YAML
94 lines
3.6 KiB
YAML
language: rust
|
|
sudo: false
|
|
|
|
matrix:
|
|
include:
|
|
# CLI builds on stable
|
|
- rust: stable
|
|
install: true
|
|
script: cargo build --manifest-path crates/cli/Cargo.toml
|
|
|
|
# Tests pass on nightly
|
|
- rust: nightly
|
|
before_install: rustup target add wasm32-unknown-unknown
|
|
script: cargo test
|
|
env: RUST_BACKTRACE=1
|
|
|
|
# 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
|
|
|
|
# Dist linux binary
|
|
- env: TARGET=x86_64-unknown-linux-musl DEPLOY=1
|
|
rust: nightly
|
|
before_script: rustup target add $TARGET
|
|
script: cargo build --manifest-path crates/cli/Cargo.toml --release --target $TARGET
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- musl-tools
|
|
|
|
# Dist OSX binary
|
|
- os: osx
|
|
rust: nightly
|
|
env: MACOSX_DEPLOYMENT_TARGET=10.7 DEPLOY=1 TARGET=x86_64-apple-darwin
|
|
script: cargo build --manifest-path crates/cli/Cargo.toml --release --target $TARGET
|
|
install: true
|
|
|
|
# We can build the tool on nightly
|
|
- rust: nightly
|
|
script: cargo install --debug --path crates/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/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)
|
|
- |
|
|
(cd examples/closures && 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
|
|
- source ~/.nvm/nvm.sh
|
|
- nvm install 10
|
|
- npm install
|
|
|
|
notifications:
|
|
email:
|
|
on_success: never
|
|
|
|
before_deploy:
|
|
- 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
|
|
|
|
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
|