forked from boostorg/conversion
Update CI scripts, add appveyor CI
This commit is contained in:
113
.travis.yml
113
.travis.yml
@@ -2,87 +2,118 @@
|
|||||||
# subject to the Boost Software License, Version 1.0. (See accompanying
|
# subject to the Boost Software License, Version 1.0. (See accompanying
|
||||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
#
|
#
|
||||||
# Copyright Antony Polukhin 2014-2015.
|
# Copyright Antony Polukhin 2014-2016.
|
||||||
|
|
||||||
#
|
#
|
||||||
# See https://svn.boost.org/trac/boost/wiki/TravisCoverals for description of this file
|
# See https://svn.boost.org/trac/boost/wiki/TravisCoverals for description of this file
|
||||||
# and how it can be used with Boost libraries.
|
# and how it can be used with Boost libraries.
|
||||||
#
|
#
|
||||||
|
# File revision #6
|
||||||
|
|
||||||
|
sudo: false
|
||||||
language: cpp
|
language: cpp
|
||||||
|
compiler:
|
||||||
|
- gcc
|
||||||
|
# - clang
|
||||||
|
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- CXX_STANDARD=c++98
|
global:
|
||||||
- CXX_STANDARD=c++0x
|
# Autodetect Boost branch by using the following code: - BRANCH_TO_TEST=$TRAVIS_BRANCH
|
||||||
|
# or just directly specify it
|
||||||
|
- BRANCH_TO_TEST=$TRAVIS_BRANCH
|
||||||
|
|
||||||
|
# Files, which coverage results must be ignored (files from other projects).
|
||||||
|
# Example: - IGNORE_COVERAGE='*/boost/progress.hpp */filesystem/src/*'
|
||||||
|
- IGNORE_COVERAGE=''
|
||||||
|
|
||||||
|
# Explicitly remove the following library from Boost. This may be usefull, if you're for example running Travis
|
||||||
|
# from `Boost.DLL` repo, while Boost already has `dll`.
|
||||||
|
#
|
||||||
|
# By default is eaual to - BOOST_REMOVE=$(basename $TRAVIS_BUILD_DIR)
|
||||||
|
# This will force to use local repo content, instead of the Boost's default.
|
||||||
|
- BOOST_REMOVE=$(basename $TRAVIS_BUILD_DIR)
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
# Note that "--coverage -fsanitize=address,leak,undefined -DBOOST_TRAVISCI_BUILD" are added automatically lower in code
|
||||||
|
- CXX_FLAGS="-std=c++98" LINK_FLAGS="" TOOLSET=gcc-6
|
||||||
|
- CXX_FLAGS="-std=c++11" LINK_FLAGS="" TOOLSET=gcc-6
|
||||||
|
- CXX_FLAGS="-std=c++1y" LINK_FLAGS="" TOOLSET=gcc-6
|
||||||
|
#- CXX_FLAGS="-std=c++11 -stdlib=libc++" LINK_FLAGS="-stdlib=libc++" TOOLSET=clang
|
||||||
|
#- CXX_FLAGS="-std=c++1y -stdlib=libc++" LINK_FLAGS="-stdlib=libc++" TOOLSET=clang
|
||||||
|
|
||||||
|
###############################################################################################################
|
||||||
|
# From this point and below code is same for all the Boost libs
|
||||||
|
###############################################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Installing additional tools
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- git-core
|
||||||
|
packages:
|
||||||
|
- git
|
||||||
|
- python-yaml
|
||||||
|
- gcc-6
|
||||||
|
- g++-6
|
||||||
|
- clang
|
||||||
|
- libc++-dev
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
# Set this to the name of your Boost library
|
# Set this to the name of the library
|
||||||
# Autodetect library name by using the following code: - PROJECT_TO_TEST=$(basename $(pwd))
|
- PROJECT_TO_TEST=`basename $TRAVIS_BUILD_DIR`
|
||||||
- PROJECT_TO_TEST=$(basename $(pwd))
|
|
||||||
|
|
||||||
# Autodetect Boost branch by using the following code: - BRANCH_TO_TEST=`git rev-parse --abbrev-ref HEAD`
|
|
||||||
# or by - BRANCH_TO_TEST=$TRAVIS_BRANCH or just directly specify it
|
|
||||||
- BRANCH_TO_TEST=$TRAVIS_BRANCH
|
|
||||||
|
|
||||||
# Files, which coverage results must be ignored (files from other projects). Example: - IGNORE_COVERAGE=
|
|
||||||
- IGNORE_COVERAGE=
|
|
||||||
|
|
||||||
|
|
||||||
# From this point and below code is same for all the Boost libs
|
|
||||||
# Cloning Boost libraries (fast nondeep cloning)
|
# Cloning Boost libraries (fast nondeep cloning)
|
||||||
- PROJECT_DIR=`pwd`
|
|
||||||
- BOOST=$HOME/boost-local
|
- BOOST=$HOME/boost-local
|
||||||
|
- echo "Testing $PROJECT_TO_TEST, to remove $BOOST/libs/$BOOST_REMOVE, testing branch $BRANCH_TO_TEST"
|
||||||
- git init $BOOST
|
- git init $BOOST
|
||||||
- cd $BOOST
|
- cd $BOOST
|
||||||
- git remote add --no-tags -t $BRANCH_TO_TEST origin https://github.com/boostorg/boost.git
|
- git remote add --no-tags -t $BRANCH_TO_TEST origin https://github.com/boostorg/boost.git
|
||||||
- git fetch --depth=1
|
- git fetch --depth=1
|
||||||
- git checkout $BRANCH_TO_TEST
|
- git checkout $BRANCH_TO_TEST
|
||||||
- git submodule update --init --merge
|
- git submodule update --jobs=3 --init --merge
|
||||||
- git remote set-branches --add origin $BRANCH_TO_TEST
|
- git remote set-branches --add origin $BRANCH_TO_TEST
|
||||||
- git pull --recurse-submodules
|
- git pull --recurse-submodules
|
||||||
- git submodule update --init
|
|
||||||
- git checkout $BRANCH_TO_TEST
|
|
||||||
- git submodule foreach "git reset --quiet --hard; git clean -fxd"
|
|
||||||
- git reset --hard; git clean -fxd
|
|
||||||
- git status
|
- git status
|
||||||
- rm -rf $BOOST/libs/$PROJECT_TO_TEST
|
- rm -rf $BOOST/libs/$BOOST_REMOVE
|
||||||
- mv $PROJECT_DIR/../$PROJECT_TO_TEST/ $BOOST/libs/$PROJECT_TO_TEST
|
- mv $TRAVIS_BUILD_DIR $BOOST/libs/$PROJECT_TO_TEST
|
||||||
- PROJECT_DIR=$BOOST/libs/$PROJECT_TO_TEST
|
- TRAVIS_BUILD_DIR=$BOOST/libs/$PROJECT_TO_TEST
|
||||||
- ./bootstrap.sh
|
- ./bootstrap.sh
|
||||||
- ./b2 headers
|
- ./b2 headers
|
||||||
- sudo apt-get update -qq
|
- cd $BOOST/libs/$PROJECT_TO_TEST/test/
|
||||||
- sudo apt-get install -qq valgrind
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if [ "$CCFLAGS" != "" ]; then FLAGS="cxxflags=\"$CCFLAGS\" linkflags=\"$LINKFLAGS\""; else FLAGS=""; fi
|
|
||||||
- cd $BOOST/libs/$PROJECT_TO_TEST/test/
|
|
||||||
# `--coverage` flags required to generate coverage info for Coveralls
|
# `--coverage` flags required to generate coverage info for Coveralls
|
||||||
- ../../../b2 testing.launcher=valgrind cxxflags="--coverage -std=$CXX_STANDARD" linkflags="--coverage"
|
- ../../../b2 "testing.launcher=LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.3 " address-model=64 architecture=x86 toolset=$TOOLSET cxxflags="--coverage -fsanitize=address,leak,undefined -DBOOST_TRAVISCI_BUILD $CXX_FLAGS" linkflags="$LINK_FLAGS --coverage -lasan -lubsan"
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
# Copying Coveralls data to a separate folder
|
# Copying Coveralls data to a separate folder
|
||||||
- mkdir -p $PROJECT_DIR/coverals
|
- mkdir -p $TRAVIS_BUILD_DIR/coverals
|
||||||
- find ../../../bin.v2/ -name "*.gcda" -exec cp "{}" $PROJECT_DIR/coverals/ \;
|
- find ../../../bin.v2/ -name "*.gcda" -exec cp "{}" $TRAVIS_BUILD_DIR/coverals/ \;
|
||||||
- find ../../../bin.v2/ -name "*.gcno" -exec cp "{}" $PROJECT_DIR/coverals/ \;
|
- find ../../../bin.v2/ -name "*.gcno" -exec cp "{}" $TRAVIS_BUILD_DIR/coverals/ \;
|
||||||
|
- find ../../../bin.v2/ -name "*.da" -exec cp "{}" $TRAVIS_BUILD_DIR/coverals/ \;
|
||||||
|
- find ../../../bin.v2/ -name "*.no" -exec cp "{}" $TRAVIS_BUILD_DIR/coverals/ \;
|
||||||
|
- wget https://github.com/linux-test-project/lcov/archive/v1.12.zip
|
||||||
|
- unzip v1.12.zip
|
||||||
|
- LCOV="`pwd`/lcov-1.12/bin/lcov --gcov-tool gcov-6"
|
||||||
|
|
||||||
# Preparing Coveralls data by
|
# Preparing Coveralls data by changind data format to a readable one
|
||||||
# ... installing the tools
|
- echo "$LCOV --directory $TRAVIS_BUILD_DIR/coverals --base-directory `pwd` --capture --output-file $TRAVIS_BUILD_DIR/coverals/coverage.info"
|
||||||
- sudo apt-get install -qq python-yaml lcov
|
- $LCOV --directory $TRAVIS_BUILD_DIR/coverals --base-directory `pwd` --capture --output-file $TRAVIS_BUILD_DIR/coverals/coverage.info
|
||||||
# ... changind data format to a readable one
|
|
||||||
- lcov --directory $PROJECT_DIR/coverals --base-directory ./ --capture --output-file $PROJECT_DIR/coverals/coverage.info
|
|
||||||
|
|
||||||
# ... erasing /test/ /example/ folder data
|
# ... erasing /test/ /example/ folder data
|
||||||
- cd $BOOST
|
- cd $BOOST
|
||||||
- lcov --remove $PROJECT_DIR/coverals/coverage.info "/usr*" "*/$PROJECT_TO_TEST/test/*" $IGNORE_COVERAGE "*/$PROJECT_TO_TEST/tests/*" "*/$PROJECT_TO_TEST/examples/*" "*/$PROJECT_TO_TEST/example/*" -o $PROJECT_DIR/coverals/coverage.info
|
- $LCOV --remove $TRAVIS_BUILD_DIR/coverals/coverage.info "/usr*" "*/$PROJECT_TO_TEST/test/*" $IGNORE_COVERAGE "*/$PROJECT_TO_TEST/tests/*" "*/$PROJECT_TO_TEST/examples/*" "*/$PROJECT_TO_TEST/example/*" -o $TRAVIS_BUILD_DIR/coverals/coverage.info
|
||||||
|
|
||||||
# ... erasing data that is not related to this project directly
|
# ... erasing data that is not related to this project directly
|
||||||
- OTHER_LIBS=`grep "submodule .*" .gitmodules | sed 's/\[submodule\ "\(.*\)"\]/"\*\/boost\/\1\.hpp" "\*\/boost\/\1\/\*"/g'| sed "/\"\*\/boost\/$PROJECT_TO_TEST\/\*\"/d" | sed ':a;N;$!ba;s/\n/ /g'`
|
- OTHER_LIBS=`grep "submodule .*" .gitmodules | sed 's/\[submodule\ "\(.*\)"\]/"\*\/boost\/\1\.hpp" "\*\/boost\/\1\/\*"/g'| sed "/\"\*\/boost\/$PROJECT_TO_TEST\/\*\"/d" | sed ':a;N;$!ba;s/\n/ /g'`
|
||||||
- echo $OTHER_LIBS
|
- echo $OTHER_LIBS
|
||||||
- eval "lcov --remove $PROJECT_DIR/coverals/coverage.info $OTHER_LIBS -o $PROJECT_DIR/coverals/coverage.info"
|
- eval "$LCOV --remove $TRAVIS_BUILD_DIR/coverals/coverage.info $OTHER_LIBS -o $TRAVIS_BUILD_DIR/coverals/coverage.info"
|
||||||
|
|
||||||
# Sending data to Coveralls
|
# Sending data to Coveralls
|
||||||
- cd $PROJECT_DIR
|
- cd $TRAVIS_BUILD_DIR
|
||||||
- gem install coveralls-lcov
|
- gem install coveralls-lcov
|
||||||
- coveralls-lcov coverals/coverage.info
|
- coveralls-lcov coverals/coverage.info
|
||||||
|
@@ -5,8 +5,8 @@ Boost.Conversion is one of the [Boost C++ Libraries](http://github.com/boostorg)
|
|||||||
|
|
||||||
@ | Build | Tests coverage | More info
|
@ | Build | Tests coverage | More info
|
||||||
----------------|-------------- | -------------- |-----------
|
----------------|-------------- | -------------- |-----------
|
||||||
Develop branch: | [](https://travis-ci.org/apolukhin/conversion) | [](https://coveralls.io/r/apolukhin/conversion?branch=develop) | [details...](http://www.boost.org/development/tests/develop/developer/conversion.html)
|
Develop branch: | [](https://travis-ci.org/apolukhin/conversion) [](https://ci.appveyor.com/project/apolukhin/conversion/branch/develop) | [](https://coveralls.io/r/apolukhin/conversion?branch=develop) | [details...](http://www.boost.org/development/tests/develop/developer/conversion.html)
|
||||||
Master branch: | [](https://travis-ci.org/apolukhin/conversion) | [](https://coveralls.io/r/apolukhin/conversion?branch=master) | [details...](http://www.boost.org/development/tests/master/developer/conversion.html)
|
Master branch: | [](https://travis-ci.org/apolukhin/conversion) [](https://ci.appveyor.com/project/apolukhin/conversion/branch/master) | [](https://coveralls.io/r/apolukhin/conversion?branch=master) | [details...](http://www.boost.org/development/tests/master/developer/conversion.html)
|
||||||
|
|
||||||
|
|
||||||
[Open Issues](https://svn.boost.org/trac/boost/query?status=!closed&component=conversion&or&status=!closed&component=lexical_cast)
|
[Open Issues](https://svn.boost.org/trac/boost/query?status=!closed&component=conversion&or&status=!closed&component=lexical_cast)
|
||||||
|
67
test/appveyor.yml
Normal file
67
test/appveyor.yml
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
# Use, modification, and distribution are
|
||||||
|
# subject to the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
#
|
||||||
|
# Copyright Antony Polukhin 2016.
|
||||||
|
|
||||||
|
#
|
||||||
|
# See https://svn.boost.org/trac/boost/wiki/TravisCoverals for description of this file
|
||||||
|
# and how it can be used with Boost libraries.
|
||||||
|
#
|
||||||
|
# File revision #2
|
||||||
|
|
||||||
|
init:
|
||||||
|
- set BRANCH_TO_TEST=%APPVEYOR_REPO_BRANCH%
|
||||||
|
- set BOOST_REMOVE=conversion
|
||||||
|
|
||||||
|
os: Visual Studio 2015
|
||||||
|
configuration: Debug
|
||||||
|
platform: x64
|
||||||
|
|
||||||
|
###############################################################################################################
|
||||||
|
# From this point and below code is same for all the Boost libs
|
||||||
|
###############################################################################################################
|
||||||
|
|
||||||
|
version: 1.61.{build}-{branch}
|
||||||
|
|
||||||
|
# branches to build
|
||||||
|
branches:
|
||||||
|
except:
|
||||||
|
- gh-pages
|
||||||
|
|
||||||
|
skip_tags: true
|
||||||
|
|
||||||
|
before_build:
|
||||||
|
# Set this to the name of the library
|
||||||
|
- set PROJECT_TO_TEST=%APPVEYOR_PROJECT_NAME%
|
||||||
|
- echo "Testing %PROJECT_TO_TEST%"
|
||||||
|
# Cloning Boost libraries (fast nondeep cloning)
|
||||||
|
- set BOOST=C:/boost-local
|
||||||
|
- git init %BOOST%
|
||||||
|
- cd %BOOST%
|
||||||
|
- git remote add --no-tags -t %BRANCH_TO_TEST% origin https://github.com/boostorg/boost.git
|
||||||
|
- git fetch --depth=1
|
||||||
|
- git checkout %BRANCH_TO_TEST%
|
||||||
|
- git submodule update --init --merge
|
||||||
|
- git remote set-branches --add origin %BRANCH_TO_TEST%
|
||||||
|
- git pull --recurse-submodules
|
||||||
|
- git status
|
||||||
|
- rm -rf %BOOST%/libs/%BOOST_REMOVE%
|
||||||
|
- mv %APPVEYOR_BUILD_FOLDER% %BOOST%/libs/%PROJECT_TO_TEST%
|
||||||
|
- set TRAVIS_BUILD_DIR=%BOOST%/libs/%PROJECT_TO_TEST%
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
|
||||||
|
- bootstrap.bat
|
||||||
|
- b2.exe headers
|
||||||
|
- cd %BOOST%/libs/%PROJECT_TO_TEST%/test
|
||||||
|
|
||||||
|
after_build:
|
||||||
|
before_test:
|
||||||
|
test_script:
|
||||||
|
- ..\..\..\b2.exe address-model=64 architecture=x86 cxxflags="-DBOOST_TRAVISCI_BUILD" -sBOOST_BUILD_PATH=.
|
||||||
|
|
||||||
|
after_test:
|
||||||
|
on_success:
|
||||||
|
on_failure:
|
||||||
|
on_finish:
|
Reference in New Issue
Block a user