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