|
|
|
@ -1,51 +1,8 @@ |
|
|
|
|
language: rust |
|
|
|
|
sudo: false |
|
|
|
|
cache: cargo |
|
|
|
|
|
|
|
|
|
matrix: |
|
|
|
|
include: |
|
|
|
|
|
|
|
|
|
# tests pass |
|
|
|
|
- rust: nightly |
|
|
|
|
script: |
|
|
|
|
- cargo test --locked |
|
|
|
|
- rustup component add rustfmt-preview |
|
|
|
|
- cargo fmt --all -- --check |
|
|
|
|
env: RUST_BACKTRACE=1 |
|
|
|
|
|
|
|
|
|
# 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.1" mdbook) |
|
|
|
|
- cargo install-update -a |
|
|
|
|
script: |
|
|
|
|
- cd docs && mdbook build |
|
|
|
|
|
|
|
|
|
# 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 |
|
|
|
|
|
|
|
|
|
DEPLOY_TO_GITHUB: &DEPLOY_TO_GITHUB |
|
|
|
|
before_deploy: |
|
|
|
|
- git config --local user.name "Ashley Williams" |
|
|
|
|
- git config --local user.email "ashley666ashley@gmail.com" |
|
|
|
@ -54,7 +11,6 @@ before_deploy: |
|
|
|
|
- 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: |
|
|
|
@ -67,6 +23,28 @@ deploy: |
|
|
|
|
condition: $DEPLOY = 1 |
|
|
|
|
tags: true |
|
|
|
|
|
|
|
|
|
matrix: |
|
|
|
|
include: |
|
|
|
|
|
|
|
|
|
# tests pass |
|
|
|
|
|
|
|
|
|
- env: JOB=test RUST_BACKTRACE=1 |
|
|
|
|
rust: nightly |
|
|
|
|
script: |
|
|
|
|
- cargo test --locked |
|
|
|
|
- rustup component add rustfmt-preview |
|
|
|
|
- cargo fmt --all -- --check |
|
|
|
|
|
|
|
|
|
# book |
|
|
|
|
- env: JOB=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.1" mdbook) |
|
|
|
|
- cargo install-update -a |
|
|
|
|
script: |
|
|
|
|
- cd docs && mdbook build |
|
|
|
|
deploy: |
|
|
|
|
provider: pages |
|
|
|
|
skip-cleanup: true |
|
|
|
|
github-token: $GITHUB_TOKEN |
|
|
|
@ -74,3 +52,26 @@ deploy: |
|
|
|
|
keep-history: false |
|
|
|
|
on: |
|
|
|
|
branch: master |
|
|
|
|
|
|
|
|
|
# dist linux binary |
|
|
|
|
- env: JOB=dist-linux TARGET=x86_64-unknown-linux-musl DEPLOY=1 |
|
|
|
|
rust: nightly |
|
|
|
|
before_script: rustup target add $TARGET |
|
|
|
|
script: cargo build --release --target $TARGET --locked |
|
|
|
|
addons: |
|
|
|
|
apt: |
|
|
|
|
packages: |
|
|
|
|
- musl-tools |
|
|
|
|
<<: *DEPLOY_TO_GITHUB |
|
|
|
|
|
|
|
|
|
# dist OSX binary |
|
|
|
|
- env: JOB=dist-osx MACOSX_DEPLOYMENT_TARGET=10.7 DEPLOY=1 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 |
|
|
|
|