forked from rustwasm/wasm-pack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (50 loc) · 2.09 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
language: rust
sudo: false
matrix:
include:
# tests pass
- rust: nightly
script:
- cargo test --locked
- rustup component add rustfmt-preview
- cargo fmt -- --write-mode diff
env: RUST_BACKTRACE=1
# dist linux binary
- env: TARGET=x86_64-unknown-linux-musl DEPLOY=1
rust: nightly
before_script:
- rustup target add $TARGET
- curl https://www.openssl.org/source/openssl-1.0.2l.tar.gz | tar xzf -
- (cd openssl-1.0.2l &&
CC=musl-gcc ./Configure --prefix=$HOME/openssl-musl no-dso no-ssl2 no-ssl3 linux-x86_64 -fPIC &&
make -j$(nproc) &&
make install)
- export OPENSSL_DIR=$HOME/openssl-musl
script: cargo build --release --target $TARGET --locked
# dist OSX binary
- os: osx
rust: nightly
env: MACOSX_DEPLOYMENT_TARGET=10.7 DEPLOY=1 TARGET=x86_64-apple-darwin
script: cargo build --release --target $TARGET --locked
install: true
addons:
apt:
packages:
- musl-tools
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:
secure: fx0rR5Ii1KcsydexE6QpkDbqItNdj3Lt6L5yFZaKKB/ejw9M555NkXA+0GZqV0sLZ54qfR8zTaXAf6eBFKgcG9etaCl7vTXqsvDrlssth82oki1zufP39uuoOy4WgFq8OfACOtUq7opDAgYmpaGzlFiny+c5j7asGwDtAU1Fc3JeJsvAnxHKg9+0spXFD6kBQd5CWpqDXv2rLFK0b8IM2fHAzd0PiJZQWqz//2Cj/r9rTiewtIzqigctAfOgFwYoQvfdM+0mKb4pefG+zXEGfxxQr4r5hqZ6UMO7hto3Jnm9LRjNR8dNaDQCqQ0bkdLTAMTC3nV/gZPM679yQU3KHueVjg9pleNzuKnuBgYmH9+BrlG1dW68kqA+6Xh+wIJYrLuagWhJDlCtiU6PM5QAbFg3mabPIBG3M2IHTrOVATme+iW5vpROARhgjbQEF235DyvZaT+Tml3+PY+PfcRax2DVUhvGQViv4tzppbT0PjjBlEbGct49cFLGdqZIJBiVrYW24I2QkENTnUgZsFIBuJlVCBHZwZlLo9ldVvu4XTMKw65z42zoTzobjtbC1QPEZPiaJXSxC7W569fqL/ORXwGToFk6rQjXwEqDP2okGiusR75LXrZD6qFibNpqeypRFtqOzntsOfTUGrlaN1yTt/6dz0V0j9uI7a9/CHVcblI=
file_glob: true
file: wasm-pack-$TRAVIS_TAG-$TARGET.tar.gz
on:
condition: $DEPLOY = 1
tags: true