From 741b8b395baa15f3a886c7b3b1b498e73499c1b5 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 22 Aug 2019 19:17:36 +0100 Subject: [PATCH] clean up inspection failures and add circle-ci testing. --- .circleci/config.yml | 57 +++++++++++++++++++++++++++++++ meta/explicit-failures-markup.xml | 6 ++++ test/has_binary_operators.hpp | 4 +++ test/has_postfix_operators.hpp | 4 +++ test/has_prefix_operators.hpp | 4 +++ 5 files changed, 75 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..4638d1e --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,57 @@ +version: 2 + +jobs: + build: + environment: + - BOOST_LIBRARY=type_traits + - CXX_STANDARD=gnu++11 + docker: + - image: gcc:7 + steps: + - checkout + - run: + name: Setting up Environment + command: | + echo 'export BOOST="$HOME/boost-local"' >> $BASH_ENV + if [ $CIRCLE_BRANCH = "master" ]; then + echo 'export BOOST_BRANCH="master"' >> $BASH_ENV; + else + echo 'export BOOST_BRANCH="develop"' >> $BASH_ENV; + fi + echo 'export BOOST_REMOVE="$BOOST/boost/libs/$BOOST_LIBRARY"' >> $BASH_ENV + HOME_SED_=$(echo $HOME | sed -e 's/\//\\\//g') + echo 'export HOME_SED=$HOME_SED_' >> $BASH_ENV + - run: + name: install pre dependencies + command: | + apt-get update -yqq + apt-get install git xsltproc docbook-xsl docbook-xml -y + - run: + name: Initializing git repo for boost + command: | + echo BOOST=$BOOST BOOST_REMOVE=$BOOST_REMOVE BOOST_LIBRARY=$BOOST_LIBRARY BOOST_BRANCH=$BOOST_BRANCH PWD=$PWD + mkdir $BOOST + cd $BOOST + git clone --single-branch --branch $BOOST_BRANCH https://github.com/boostorg/boost.git + cd boost + git submodule update --init --merge + rm -rf $BOOST_REMOVE + mv $HOME/project $BOOST_REMOVE + - run: + name: Bootstrapping boost-build + command: | + cd $BOOST/boost && ./bootstrap.sh && ./b2 headers + echo "using xsltproc ;" | tee $HOME/user-config.jam + echo "using boostbook : /usr/share/xml/docbook/stylesheet/docbook-xsl : /usr/share/sgml/docbook/dtd/xml/4.2 ;" | tee -a $HOME/user-config.jam + - run: + name: Building inspect + command: | + cd $BOOST/boost/tools/inspect/build && ../../../b2 -j2 address-model=64 architecture=x86 toolset=gcc cxxflags="-std=gnu++14" release dist-bin + - run: + name: Building docs + command: | + cd $BOOST_REMOVE/doc && rm -rf html && ../../../b2 -j2 address-model=64 architecture=x86 toolset=gcc cxxflags="-std=gnu++14" release + - run: + name: Running Inspect + command: | + cd $BOOST_REMOVE && ../../dist/bin/inspect -text diff --git a/meta/explicit-failures-markup.xml b/meta/explicit-failures-markup.xml index e73de51..01514e0 100644 --- a/meta/explicit-failures-markup.xml +++ b/meta/explicit-failures-markup.xml @@ -236,3 +236,9 @@ + \ No newline at end of file diff --git a/test/has_binary_operators.hpp b/test/has_binary_operators.hpp index d4cac69..8eb6c7b 100644 --- a/test/has_binary_operators.hpp +++ b/test/has_binary_operators.hpp @@ -3,6 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// It would be nice to get rid of the unnamed namespace here, +// but for now we just turn off inspection reporting :( +// boostinspect:nounnamed + #ifndef TT_HAS_BINARY_OPERATORS_HPP #define TT_HAS_BINARY_OPERATORS_HPP diff --git a/test/has_postfix_operators.hpp b/test/has_postfix_operators.hpp index c1a8f98..2bbcb9c 100644 --- a/test/has_postfix_operators.hpp +++ b/test/has_postfix_operators.hpp @@ -6,6 +6,10 @@ #ifndef TT_HAS_POSTFIX_OPERATORS_HPP #define TT_HAS_POSTFIX_OPERATORS_HPP +// It would be nice to get rid of the unnamed namespace here, +// but for now we just turn off inspection reporting :( +// boostinspect:nounnamed + // test with one template parameter #define TEST_T(TYPE,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME::value), RESULT) // test with one template parameter plus return value diff --git a/test/has_prefix_operators.hpp b/test/has_prefix_operators.hpp index 0c1d1ab..8b43653 100644 --- a/test/has_prefix_operators.hpp +++ b/test/has_prefix_operators.hpp @@ -11,6 +11,10 @@ #pragma GCC diagnostic ignored "-Wunused-function" #endif +// It would be nice to get rid of the unnamed namespace here, +// but for now we just turn off inspection reporting :( +// boostinspect:nounnamed + // test with one template parameter #define TEST_T(TYPE,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME::value), RESULT) // test with one template parameter plus return value