binary release for osx (#2027)

* a dedicated test suit for mac binary release

* Moved `matrix:` at the root
This commit is contained in:
Gary Yu 2018-11-27 18:42:38 +08:00 committed by GitHub
parent 92ac80f0d3
commit ae49f30b2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,10 +3,6 @@ language: rust
git: git:
depth: false depth: false
os:
- linux
# - osx
dist: trusty dist: trusty
sudo: required sudo: required
@ -37,24 +33,30 @@ addons:
- gcc - gcc
- binutils-dev - binutils-dev
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
env: env:
global: global:
- RUST_BACKTRACE="1" - RUST_BACKTRACE="1"
- RUST_FLAGS="-C debug-assertions" - RUST_FLAGS="-C debug-assertions"
matrix:
- TEST_SUITE=servers matrix:
- TEST_SUITE=chain-core include:
- TEST_SUITE=pool-p2p - os: linux
- TEST_SUITE=keychain-wallet env: TEST_SUITE=servers
- TEST_SUITE=api-util-store - os: linux
env: TEST_SUITE=chain-core
- os: linux
env: TEST_SUITE=pool-p2p
- os: linux
env: TEST_SUITE=keychain-wallet
- os: linux
env: TEST_SUITE=api-util-store
- os: osx
env: TEST_SUITE=release
script: script:
- IFS='-' read -r -a DIRS <<< "$TEST_SUITE"; DIR=${DIRS[0]}; - IFS='-' read -r -a DIRS <<< "$TEST_SUITE"; DIR=${DIRS[0]};
echo "start testing on folder $DIR..."; echo "start testing on folder $DIR...";
if [[ -n "$DIR" ]]; then cd $DIR && cargo test --release && cd - > /dev/null; fi; if [[ -n "$DIR" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd $DIR && cargo test --release && cd - > /dev/null; fi;
- IFS='-' read -r -a DIRS <<< "$TEST_SUITE"; DIR=${DIRS[1]}; - IFS='-' read -r -a DIRS <<< "$TEST_SUITE"; DIR=${DIRS[1]};
if [[ -n "$DIR" ]]; then if [[ -n "$DIR" ]]; then
echo "start testing on folder $DIR..."; echo "start testing on folder $DIR...";
@ -70,6 +72,10 @@ before_deploy:
- if [[ "$TEST_SUITE" == "pool-p2p" ]]; then - if [[ "$TEST_SUITE" == "pool-p2p" ]]; then
cargo clean && cargo build --release && ./.auto-release.sh; cargo clean && cargo build --release && ./.auto-release.sh;
fi fi
- if [[ "$TEST_SUITE" == "release" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
cargo clean && cargo build --release && ./.auto-release.sh;
fi
deploy: deploy:
provider: releases provider: releases
@ -81,6 +87,3 @@ deploy:
on: on:
repo: mimblewimble/grin repo: mimblewimble/grin
tags: true tags: true
condition: $TEST_SUITE = "pool-p2p"