Update Travis CI config, add AppVeyor for Windows CI coverage.

This commit is contained in:
costan
2017-06-27 11:11:16 -07:00
committed by Victor Costan
parent f24f9d2d97
commit e9720a001d
3 changed files with 93 additions and 15 deletions

View File

@@ -1,16 +1,53 @@
language: generic
# Build matrix / environment variables are explained on:
# http://about.travis-ci.org/docs/user/build-configuration/
# This file can be validated on: http://lint.travis-ci.org/
sudo: false
dist: trusty
language: cpp
compiler:
- gcc
- clang
os:
- linux
- osx
env:
- BUILD_TYPE=Debug
- BUILD_TYPE=RelWithDebInfo
matrix:
include:
- os: linux
dist: trusty # For Docker.
sudo: required # For Docker.
script:
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
- docker run --rm -i -v $CI_SOURCE_PATH:$CI_SOURCE_PATH -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -t ubuntu:xenial sh -c "cd $CI_SOURCE_PATH; apt-get -qq update && apt-get -qq install build-essential cmake libgtest-dev; mkdir build && cd build && cmake ../ && make all && make test"
- os: osx
script:
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
- mkdir build && cd build && cmake ../ && make all && make test
before_install:
- export CI_SOURCE_PATH=$(pwd)
- export REPOSITORY_NAME=${PWD##*/}
allow_failures:
- compiler: clang
env: BUILD_TYPE=RelWithDebInfo
addons:
apt:
# List of whitelisted in travis packages for ubuntu-precise can be found here:
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
# List of whitelisted in travis apt-sources:
# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- cmake
- gcc-6
- g++-6
- clang-4.0
install:
# Travis doesn't have a nice way to install homebrew packages yet.
# https://github.com/travis-ci/travis-ci/issues/5377
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install gcc@6; fi
# /usr/bin/gcc is stuck to old versions by on both Linux and OSX.
- if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
- echo ${CC}
- echo ${CXX}
- ${CXX} --version
script:
- mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE &&
CTEST_OUTPUT_ON_FAILURE=1 make all test