mirror of https://github.com/google/snappy.git
Update Travis CI config, add AppVeyor for Windows CI coverage.
This commit is contained in:
parent
f24f9d2d97
commit
e9720a001d
67
.travis.yml
67
.travis.yml
|
@ -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:
|
matrix:
|
||||||
include:
|
allow_failures:
|
||||||
- os: linux
|
- compiler: clang
|
||||||
dist: trusty # For Docker.
|
env: BUILD_TYPE=RelWithDebInfo
|
||||||
sudo: required # For Docker.
|
|
||||||
script:
|
addons:
|
||||||
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
|
apt:
|
||||||
- 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"
|
# List of whitelisted in travis packages for ubuntu-precise can be found here:
|
||||||
- os: osx
|
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
|
||||||
script:
|
# List of whitelisted in travis apt-sources:
|
||||||
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
|
# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
|
||||||
- mkdir build && cd build && cmake ../ && make all && make test
|
sources:
|
||||||
before_install:
|
- ubuntu-toolchain-r-test
|
||||||
- export CI_SOURCE_PATH=$(pwd)
|
- llvm-toolchain-trusty-4.0
|
||||||
- export REPOSITORY_NAME=${PWD##*/}
|
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
|
|
@ -0,0 +1,38 @@
|
||||||
|
# Build matrix / environment variables are explained on:
|
||||||
|
# https://www.appveyor.com/docs/appveyor-yml/
|
||||||
|
# This file can be validated on: https://ci.appveyor.com/tools/validate-yaml
|
||||||
|
|
||||||
|
version: "{build}"
|
||||||
|
|
||||||
|
environment:
|
||||||
|
matrix:
|
||||||
|
# AppVeyor currently has no custom job name feature.
|
||||||
|
# http://help.appveyor.com/discussions/questions/1623-can-i-provide-a-friendly-name-for-jobs
|
||||||
|
- JOB: Visual Studio 2017
|
||||||
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
|
CMAKE_GENERATOR: Visual Studio 15 2017
|
||||||
|
- JOB: Visual Studio 2015
|
||||||
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
|
CMAKE_GENERATOR: Visual Studio 14 2015
|
||||||
|
|
||||||
|
platform:
|
||||||
|
- x86
|
||||||
|
- x64
|
||||||
|
|
||||||
|
configuration:
|
||||||
|
- RelWithDebInfo
|
||||||
|
- Debug
|
||||||
|
|
||||||
|
build:
|
||||||
|
verbosity: minimal
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
- mkdir out
|
||||||
|
- cd out
|
||||||
|
- cmake .. -G "%CMAKE_GENERATOR%"
|
||||||
|
-DCMAKE_CONFIGURATION_TYPES="Debug;RelWithDebInfo"
|
||||||
|
- cmake --build . --config %CONFIGURATION%
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
- ctest -C %CONFIGURATION% --output-on-failure
|
|
@ -33,6 +33,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
// Needed to be able to use std::max without workarounds in the source code.
|
||||||
|
// https://support.microsoft.com/en-us/help/143208/prb-using-stl-in-windows-program-can-cause-min-max-conflicts
|
||||||
|
#define NOMINMAX
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue