Update Travis CI configuration.
The Travis CI configuration updates reflect the following changes: * Container-based builds (sudo: false) have been removed. https://changelog.travis-ci.com/the-container-based-build-environment-is-fully-deprecated-84517 * Ubuntu Xenial (16.04) is available as a base image. https://blog.travis-ci.com/2018-11-08-xenial-release * Homebrew now has a dedicated DSL. https://docs.travis-ci.com/user/installing-dependencies/#installing-packages-on-os-x To take full advantage of VM resources, CI builds now use Ninja https://ninja-build.org/ instead of Make.
This commit is contained in:
29
.travis.yml
29
.travis.yml
@@ -2,8 +2,7 @@
|
|||||||
# http://about.travis-ci.org/docs/user/build-configuration/
|
# http://about.travis-ci.org/docs/user/build-configuration/
|
||||||
# This file can be validated on: http://lint.travis-ci.org/
|
# This file can be validated on: http://lint.travis-ci.org/
|
||||||
|
|
||||||
sudo: false
|
dist: xenial
|
||||||
dist: trusty
|
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
compiler:
|
compiler:
|
||||||
@@ -31,26 +30,28 @@ addons:
|
|||||||
# List of whitelisted in travis apt-sources:
|
# List of whitelisted in travis apt-sources:
|
||||||
# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
|
# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
|
||||||
sources:
|
sources:
|
||||||
|
- llvm-toolchain-xenial-7
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-trusty-6.0
|
|
||||||
packages:
|
packages:
|
||||||
|
- clang-7
|
||||||
- cmake
|
- cmake
|
||||||
- gcc-8
|
- gcc-8
|
||||||
- g++-8
|
- g++-8
|
||||||
- clang-6.0
|
- ninja-build
|
||||||
|
homebrew:
|
||||||
|
packages:
|
||||||
|
- cmake
|
||||||
|
- gcc@8
|
||||||
|
- ninja
|
||||||
|
|
||||||
install:
|
before_install:
|
||||||
# Travis doesn't have a DSL for installing homebrew packages yet. Status tracked
|
|
||||||
# in https://github.com/travis-ci/travis-ci/issues/5377
|
|
||||||
# The Travis VM image for Mac already has a link at /usr/local/include/c++,
|
# The Travis VM image for Mac already has a link at /usr/local/include/c++,
|
||||||
# causing Homebrew's gcc@7 installation to error out. This was reported to
|
# causing Homebrew's gcc installation to error out. This was reported to
|
||||||
# Homebrew maintainers at https://github.com/Homebrew/brew/issues/1742 and
|
# Homebrew maintainers at https://github.com/Homebrew/brew/issues/1742 and
|
||||||
# removing the link emerged as a workaround.
|
# removing the link emerged as a workaround.
|
||||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then rm -f /usr/local/include/c++ ; fi
|
||||||
brew update;
|
|
||||||
if [ -L /usr/local/include/c++ ]; then rm /usr/local/include/c++; fi;
|
install:
|
||||||
brew install gcc@8;
|
|
||||||
fi
|
|
||||||
# /usr/bin/gcc is stuck to old versions on both Linux and OSX.
|
# /usr/bin/gcc is stuck to old versions on both Linux and OSX.
|
||||||
- if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi
|
||||||
- echo ${CC}
|
- echo ${CC}
|
||||||
@@ -60,7 +61,7 @@ install:
|
|||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p build && cd build
|
- mkdir -p build && cd build
|
||||||
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSNAPPY_REQUIRE_AVX=ON
|
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSNAPPY_REQUIRE_AVX=ON
|
||||||
- cmake --build .
|
- cmake --build .
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user