Skip to content

Commit

Permalink
windows build tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
yeastplume committed Feb 25, 2019
1 parent dbb8b00 commit 36ae74e
Showing 1 changed file with 60 additions and 32 deletions.
92 changes: 60 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,84 @@

language: rust

git:
depth: false

dist: trusty
sudo: required

cache:
cargo: true
timeout: 240
directories:
- "$HOME/.cargo"
- "$TRAVIS_BUILD_DIR/target"
- $HOME/.cargo
- $TRAVIS_BUILD_DIR/target

before_cache:
- rm -rf $TRAVIS_BUILD_DIR/target/tmp
- rm -rf $TRAVIS_BUILD_DIR/target/tmp

rust:
- stable
- stable

addons:
apt:
sources:
- ubuntu-toolchain-r-test
- ubuntu-toolchain-r-test
packages:
- g++-5
- cmake
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
- g++-5
- cmake
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev

env:
global:
- RUST_BACKTRACE="1"
- RUST_FLAGS="-C debug-assertions"
- RUST_BACKTRACE="1"
- RUST_FLAGS="-C debug-assertions"

matrix:
include:
- os: windows
env: TEST_SUITE=release
# - os: linux
# env: TEST_SUITE=integration
# - os: linux
# env: TEST_SUITE=config-libwallet-apiwallet
# - os: linux
# env: TEST_SUITE=refwallet-.
# - os: osx
# env: TEST_SUITE=release
- os: windows
env: TEST_SUITE=release

script:
- IFS='-' read -r -a DIRS <<< "$TEST_SUITE"; DIR=${DIRS[0]}; echo "start testing on
folder $DIR..."; 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..."; cd $DIR && cargo test --release && cd -
> /dev/null; fi;
- IFS='-' read -r -a DIRS <<< "$TEST_SUITE"; DIR=${DIRS[2]}; if [[ -n "$DIR" ]]; then
echo "start testing on folder $DIR..."; cd $DIR && cargo test --release && cd -
> /dev/null; fi;
- IFS='-' read -r -a DIRS <<< "$TEST_SUITE"; DIR=${DIRS[0]};
echo "start testing on folder $DIR...";
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...";
cd $DIR && cargo test --release && cd - > /dev/null;
fi;
- IFS='-' read -r -a DIRS <<< "$TEST_SUITE"; DIR=${DIRS[2]};
if [[ -n "$DIR" ]]; then
echo "start testing on folder $DIR...";
cd $DIR && cargo test --release && cd - > /dev/null;
fi;

before_deploy:
- if [[ "$TEST_SUITE" == "refwallet-." ]]; 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
- if [[ "$TEST_SUITE" == "release" ]] && [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
cargo clean && cargo build --release && ./.auto-release.sh; fi
- if [[ "$TEST_SUITE" == "refwallet-." ]]; 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
- if [[ "$TEST_SUITE" == "release" ]] && [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
cargo clean && cargo build --release && ./.auto-release.sh;
fi

deploy:
provider: releases
api_key:
Expand Down

0 comments on commit 36ae74e

Please sign in to comment.