From e4de6ce087aaf72dfce7d8d252c3a82f18419cae Mon Sep 17 00:00:00 2001 From: costan Date: Thu, 27 Jul 2017 16:34:19 -0700 Subject: Small improvements to open source CI configuration. This CL fixes 64-bit Windows testing (), makes it possible to view the test output in the Travis / AppVeyor CI console while the test is running, and takes advantage of the new support for the .appveyor.yml file name to make the CI configuration less obtrusive. --- .appveyor.yml | 41 +++++++++++++++++++++++++++++++++++++++++ .travis.yml | 14 ++++++++++---- appveyor.yml | 38 -------------------------------------- 3 files changed, 51 insertions(+), 42 deletions(-) create mode 100644 .appveyor.yml delete mode 100644 appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..f54dbfb --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,41 @@ +# 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 + - if "%platform%"=="x64" set CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64 + - cmake .. -G "%CMAKE_GENERATOR%" + -DCMAKE_CONFIGURATION_TYPES="%CONFIGURATION%" + - cmake --build . --config %CONFIGURATION% + - cd .. + - cmake --version + +test_script: + - out\%CONFIGURATION%\snappy-unittest \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 88c28fd..65ee97e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,8 @@ matrix: 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 packages for ubuntu-trusty can be found here: + # https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-trusty # List of whitelisted in travis apt-sources: # https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json sources: @@ -48,6 +48,12 @@ install: - echo ${CXX} - ${CXX} --version +before_script: +- mkdir -p build && cd build +- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE +- cmake --build . +- cd .. +- cmake --version + script: -- mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE && - CTEST_OUTPUT_ON_FAILURE=1 make all test \ No newline at end of file +- build/snappy-unittest \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 886150f..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,38 +0,0 @@ -# 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 -- cgit v1.2.1