This repository has been archived by the owner on Nov 8, 2021. It is now read-only.
forked from rustwasm/wasm-pack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
99 lines (89 loc) · 3.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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 "[email protected]"
- 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: stable
addons:
firefox: latest
chrome: stable
install:
- *INSTALL_NODE_VIA_NVM
script:
- cargo test --all --locked
- rustup component add rustfmt-preview
- cargo fmt --version
- cargo fmt --all -- --check
- rustup component add clippy-preview
- cargo clippy --version
- cargo clippy
- 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:
- mdbook --version
- (cd docs && mv _theme theme && 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: stable
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: stable
script: cargo build --release --target $TARGET --locked
install: true
<<: *DEPLOY_TO_GITHUB
notifications:
email:
on_success: never