Unverified Commit 10a18490 authored by Xinye Tao's avatar Xinye Tao Committed by GitHub

Optimize Travis CI (#211)

In our CI mac build, homebrew update often timeout. Mitigate this issue by upgrading Xcode image (spec was ineffective before).
Also optimize build time by adding format stage and fail_fast flag so that failed test can trigger immediate termination.
Signed-off-by: 's avatartabokie <xy.tao@outlook.com>
parent 46809e59
...@@ -4,7 +4,6 @@ language: cpp ...@@ -4,7 +4,6 @@ language: cpp
os: linux os: linux
compiler: clang compiler: clang
osx_image: xcode12.2
addons: addons:
apt: apt:
...@@ -18,6 +17,10 @@ addons: ...@@ -18,6 +17,10 @@ addons:
- lcov - lcov
- zlib1g - zlib1g
stages:
- format
- test
env: env:
- BUILD_TYPE="Release" - BUILD_TYPE="Release"
- SANITIZER="ASAN" - SANITIZER="ASAN"
...@@ -26,14 +29,12 @@ env: ...@@ -26,14 +29,12 @@ env:
# For GCC build, we also report code coverage to codecov. # For GCC build, we also report code coverage to codecov.
matrix: matrix:
exclude: fast_finish: true
- os: osx
env: SANITIZER="TSAN"
- os: osx
env: SANITIZER="UBSAN"
- os: osx
env: BUILD_TYPE="Release"
include: include:
- os: osx
osx_image: xcode12.2
env:
- SANITIZER="ASAN"
- os: linux - os: linux
compiler: compiler:
env: env:
...@@ -42,19 +43,17 @@ matrix: ...@@ -42,19 +43,17 @@ matrix:
arch: arm64 arch: arm64
env: env:
- SANITIZER="ASAN" - SANITIZER="ASAN"
- os: osx - stage: format
env: os: linux
- SANITIZER="ASAN"
- os: linux
compiler: compiler:
env: env:
- FORMATTER=ON - FORMATTER=ON
install: install:
# osx dependencies # Don't do package update because Travis homebrew aren't cached.
- if [ "${TRAVIS_OS_NAME}" == osx ]; then - if [ "${TRAVIS_OS_NAME}" == osx ]; then
to_install=( "gflags" "zstd" "lz4" "snappy" "xz" ); to_install=( "gflags" "zstd" "lz4" "snappy" "xz" );
brew list > tmp; brew list --formula > tmp;
for ins in ${to_install[*]}; do for ins in ${to_install[*]}; do
grep -q "$ins" tmp; grep -q "$ins" tmp;
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment