fork of https://github.com/rustwasm/wasm-pack for the needs of NextGraph.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
3.1 KiB
95 lines
3.1 KiB
language: rust
|
|
sudo: false
|
|
|
|
INSTALL_NODE_VIA_NVM: &INSTALL_NODE_VIA_NVM
|
|
|
|
|
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 lts/carbon
|
|
|
|
# Cache `cargo install`ed tools, but don't cache the project's `target`
|
|
# directory (which ends up over-caching and filling all disk space!)
|
|
cache:
|
|
directories:
|
|
- /home/travis/.cargo
|
|
|
|
GH_TOKEN: &GH_TOKEN
|
|
secure: fx0rR5Ii1KcsydexE6QpkDbqItNdj3Lt6L5yFZaKKB/ejw9M555NkXA+0GZqV0sLZ54qfR8zTaXAf6eBFKgcG9etaCl7vTXqsvDrlssth82oki1zufP39uuoOy4WgFq8OfACOtUq7opDAgYmpaGzlFiny+c5j7asGwDtAU1Fc3JeJsvAnxHKg9+0spXFD6kBQd5CWpqDXv2rLFK0b8IM2fHAzd0PiJZQWqz//2Cj/r9rTiewtIzqigctAfOgFwYoQvfdM+0mKb4pefG+zXEGfxxQr4r5hqZ6UMO7hto3Jnm9LRjNR8dNaDQCqQ0bkdLTAMTC3nV/gZPM679yQU3KHueVjg9pleNzuKnuBgYmH9+BrlG1dW68kqA+6Xh+wIJYrLuagWhJDlCtiU6PM5QAbFg3mabPIBG3M2IHTrOVATme+iW5vpROARhgjbQEF235DyvZaT+Tml3+PY+PfcRax2DVUhvGQViv4tzppbT0PjjBlEbGct49cFLGdqZIJBiVrYW24I2QkENTnUgZsFIBuJlVCBHZwZlLo9ldVvu4XTMKw65z42zoTzobjtbC1QPEZPiaJXSxC7W569fqL/ORXwGToFk6rQjXwEqDP2okGiusR75LXrZD6qFibNpqeypRFtqOzntsOfTUGrlaN1yTt/6dz0V0j9uI7a9/CHVcblI=
|
|
|
|
DEPLOY_TO_GITHUB: &DEPLOY_TO_GITHUB
|
|
before_deploy:
|
|
- git config --local user.name "Ashley Williams"
|
|
- git config --local user.email "ashley666ashley@gmail.com"
|
|
- name="wasm-pack-$TRAVIS_TAG-$TARGET"
|
|
- mkdir $name
|
|
- cp target/$TARGET/release/wasm-pack $name/
|
|
- cp README.md LICENSE-MIT LICENSE-APACHE $name/
|
|
- tar czvf $name.tar.gz $name
|
|
deploy:
|
|
provider: releases
|
|
api_key: *GH_TOKEN
|
|
file: wasm-pack-$TRAVIS_TAG-$TARGET.tar.gz
|
|
skip_cleanup: true
|
|
on:
|
|
branch: master
|
|
tags: true
|
|
|
|
matrix:
|
|
include:
|
|
|
|
- name: Tests
|
|
env: RUST_BACKTRACE=1
|
|
rust: nightly
|
|
addons:
|
|
firefox: latest
|
|
chrome: stable
|
|
install:
|
|
- *INSTALL_NODE_VIA_NVM
|
|
script:
|
|
- cargo test --locked
|
|
- rustup component add rustfmt-preview
|
|
- cargo fmt --version
|
|
- cargo fmt --all -- --check
|
|
|
|
- name: Book
|
|
rust: stable
|
|
before_script:
|
|
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
|
|
- (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.2" mdbook)
|
|
- cargo install-update -a
|
|
script:
|
|
- (cd docs && mdbook build)
|
|
- rustc ./docs/_installer/build-installer.rs
|
|
- ./build-installer
|
|
deploy:
|
|
provider: pages
|
|
skip-cleanup: true
|
|
github-token: *GH_TOKEN
|
|
local-dir: docs
|
|
keep-history: false
|
|
on:
|
|
branch: master
|
|
|
|
- name: Linux Binary
|
|
env: TARGET=x86_64-unknown-linux-musl
|
|
rust: nightly
|
|
before_script: rustup target add $TARGET
|
|
script: cargo build --release --target $TARGET --locked --features vendored-openssl
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- musl-tools
|
|
<<: *DEPLOY_TO_GITHUB
|
|
|
|
- name: macOS Binary
|
|
env: MACOSX_DEPLOYMENT_TARGET=10.7 TARGET=x86_64-apple-darwin
|
|
os: osx
|
|
rust: nightly
|
|
script: cargo build --release --target $TARGET --locked
|
|
install: true
|
|
<<: *DEPLOY_TO_GITHUB
|
|
|
|
notifications:
|
|
email:
|
|
on_success: never
|
|
|