Skip to content

Commit

Permalink
clean up inspection failures and add circle-ci testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzmaddock committed Aug 22, 2019
1 parent 12325df commit 741b8b3
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions meta/explicit-failures-markup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,9 @@
</mark-expected-failures>
</library>
</explicit-failures-markup>
<!--
(C) Copyright Nikita Kniazev 2019.
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)
-->
4 changes: 4 additions & 0 deletions test/has_binary_operators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions test/has_postfix_operators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<TYPE>::value), RESULT)
// test with one template parameter plus return value
Expand Down
4 changes: 4 additions & 0 deletions test/has_prefix_operators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<TYPE>::value), RESULT)
// test with one template parameter plus return value
Expand Down

0 comments on commit 741b8b3

Please sign in to comment.