diff --git a/.drone.star b/.drone.star new file mode 100644 index 0000000000..713b7b549e --- /dev/null +++ b/.drone.star @@ -0,0 +1,43 @@ +# Use, modification, and distribution are +# subject to the Boost Software License, Version 1.0. (See accompanying +# file LICENSE.txt) +# +# Copyright Rene Rivera 2020. + +# For Drone CI we use the Starlark scripting language to reduce duplication. +# As the yaml syntax for Drone CI is rather limited. +# +# +globalenv={'secure': 'gB1wvjk565j3O4UBGjyN44Vd8IGqcNHzkbvRdFNHp7C+C+JG2vhAeLlpiK0Zd483gdTjq9gPjIDwpwyG2UJ+yjT1kMTJvD1YNWpGcK6vOHYl1yMOwv/LBdnKn+J7i/FnoeULGRCCI2Fpp1qILhxeZgLxTxsdQaYXlAkkR0i8cgQ='} +linuxglobalimage="cppalliance/droneubuntu1404:1" +windowsglobalimage="cppalliance/dronevs2019" + +def main(ctx): + return [ + linux_cxx("UNIT_TESTS=true COMPILER=clang++-3.9 BOOST_VE Job 0", "clang++-3.9", packages="clang-3.9 valgrind doxygen", llvm_os="trusty", llvm_ver="3.9", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'clang++-3.9', 'BOOST_VERSION': 'default', 'ENABLE_MEMCHECK': 'true', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=clang++-4.0 BOOST_VE Job 1", "clang++-4.0", packages="clang-4.0 valgrind doxygen", llvm_os="trusty", llvm_ver="4.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'clang++-4.0', 'BOOST_VERSION': 'default', 'ENABLE_MEMCHECK': 'true', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=clang++-5.0 BOOST_VE Job 2", "clang++-5.0", packages="clang-5.0 valgrind doxygen", llvm_os="trusty", llvm_ver="5.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'clang++-5.0', 'BOOST_VERSION': 'default', 'ENABLE_MEMCHECK': 'true', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=clang++-6.0 BOOST_VE Job 3", "clang++-6.0", packages="clang-6.0 valgrind doxygen", llvm_os="trusty", llvm_ver="6.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'clang++-6.0', 'BOOST_VERSION': 'default', 'ENABLE_MEMCHECK': 'true', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=clang++-7 BOOST_VERS Job 4", "clang++-7", packages="clang-7 valgrind doxygen", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'clang++-7', 'BOOST_VERSION': 'default', 'ENABLE_MEMCHECK': 'true', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=g++-6 BOOST_VERSION= Job 5", "g++-6", packages="g++-6 valgrind doxygen", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'g++-6', 'BOOST_VERSION': 'default', 'ENABLE_MEMCHECK': 'true', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=g++-7 BOOST_VERSION= Job 6", "g++-7", packages="g++-7 valgrind doxygen", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'g++-7', 'BOOST_VERSION': 'default', 'ENABLE_MEMCHECK': 'true', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=g++-8 BOOST_VERSION= Job 7", "g++-8", packages="g++-8 valgrind doxygen", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'g++-8', 'BOOST_VERSION': 'default', 'ENABLE_MEMCHECK': 'true', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv), + osx_cxx("UNIT_TESTS=true BOOST_VERSION=default Job 8", "g++", packages=" doxygen", buildtype="boost", buildscript="drone", xcode_version="11", environment={'UNIT_TESTS': 'true', 'BOOST_VERSION': 'default', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=default BOOST_VERSIO Job 9", "default", packages="clang-7 valgrind doxygen", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'CMAKE_OPTIONS': '-DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON', 'UNIT_TESTS': 'true', 'COMPILER': 'default', 'BOOST_VERSION': 'default', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=g++-6 BOOST_VERS Job 10", "g++-6", packages="g++-6 valgrind doxygen", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'CMAKE_OPTIONS': '-DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON', 'UNIT_TESTS': 'true', 'COMPILER': 'g++-6', 'BOOST_VERSION': 'default', 'DRONE_JOB_UUID': 'b1d5781111'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=default BOOST_VERSIO Job 11", "default", packages="clang-7 valgrind doxygen", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'CMAKE_OPTIONS': '-DBOOST_HANA_ENABLE_CONCEPT_CHECKS=OFF', 'UNIT_TESTS': 'true', 'COMPILER': 'default', 'BOOST_VERSION': 'default', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=default BOOST_VERSIO Job 12", "default", packages="clang-7 valgrind doxygen", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'CMAKE_OPTIONS': '-DBOOST_HANA_ENABLE_DEBUG_MODE=ON', 'UNIT_TESTS': 'true', 'COMPILER': 'default', 'BOOST_VERSION': 'default', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=default BOOST_VERSIO Job 13", "default", packages="clang-7 valgrind doxygen", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'CMAKE_OPTIONS': '-DBOOST_HANA_ENABLE_EXCEPTIONS=OFF', 'UNIT_TESTS': 'true', 'COMPILER': 'default', 'BOOST_VERSION': 'default', 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv), + osx_cxx("UNIT_TESTS=true BOOST_VERSION=default CMAKE_O Job 14", "g++", packages=" doxygen", buildtype="boost", buildscript="drone", xcode_version="11", environment={'CMAKE_OPTIONS': '-DBOOST_HANA_ENABLE_EXCEPTIONS=OFF', 'UNIT_TESTS': 'true', 'BOOST_VERSION': 'default', 'DRONE_JOB_UUID': 'fa35e19212'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=default BOOST_VERSIO Job 15", "default", packages="clang-7 valgrind doxygen", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'default', 'BOOST_VERSION': '1.64.0', 'DRONE_JOB_UUID': 'f1abd67035'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=default BOOST_VERSIO Job 16", "default", packages="clang-7 valgrind doxygen", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'default', 'BOOST_VERSION': '1.65.1', 'DRONE_JOB_UUID': '1574bddb75'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=default Job 17", "default", packages="clang-7 valgrind doxygen", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'default', 'DRONE_JOB_UUID': '0716d9708d'}, globalenv=globalenv), + linux_cxx("BOOST_BUILD=true COMPILER=default BOOST_VERSI Job 18", "default", packages="clang-7 valgrind doxygen", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'BOOST_BUILD': 'true', 'COMPILER': 'default', 'BOOST_VERSION': 'default', 'DRONE_JOB_UUID': '9e6a55b6b4'}, globalenv=globalenv), + osx_cxx("BOOST_BUILD=true BOOST_VERSION=default Job 19", "g++", packages=" doxygen", buildtype="boost", buildscript="drone", xcode_version="11", environment={'BOOST_BUILD': 'true', 'BOOST_VERSION': 'default', 'DRONE_JOB_UUID': 'b3f0c7f6bb'}, globalenv=globalenv), + osx_cxx("DOCUMENTATION=true BOOST_VERSION=default Job 20", "g++", packages=" doxygen", buildtype="boost", buildscript="drone", environment={'DOCUMENTATION': 'true', 'BOOST_VERSION': 'default', 'DRONE_JOB_UUID': '91032ad7bb'}, globalenv=globalenv), + linux_cxx("BENCHMARKS=true COMPILER=default BOOST_VERSIO Job 21", "default", packages="clang-7 valgrind doxygen", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'CMAKE_OPTIONS': '-DCMAKE_BUILD_TYPE=Release', 'BENCHMARKS': 'true', 'COMPILER': 'default', 'BOOST_VERSION': 'default', 'DRONE_JOB_UUID': '472b07b9fc'}, globalenv=globalenv), + linux_cxx("UNIT_TESTS=true COMPILER=default BOOST_VERSIO Job 22", "default", packages="clang-7 valgrind doxygen", llvm_os="trusty", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'UNIT_TESTS': 'true', 'COMPILER': 'default', 'BOOST_VERSION': 'trunk', 'DRONE_JOB_UUID': '12c6fc06c9'}, globalenv=globalenv), + ] + +# from https://github.com/boostorg/boost-ci +load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx") diff --git a/.drone/before-script.sh b/.drone/before-script.sh new file mode 100755 index 0000000000..6cc0b88092 --- /dev/null +++ b/.drone/before-script.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Copyright 2020 Rene Rivera, Sam Darwin +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt) + +if [ "$DRONE_JOB_UUID" = "b6589fc6ab" ] || [ "$DRONE_JOB_UUID" = "356a192b79" ] || [ "$DRONE_JOB_UUID" = "da4b9237ba" ] || [ "$DRONE_JOB_UUID" = "77de68daec" ] || [ "$DRONE_JOB_UUID" = "1b64538924" ] || [ "$DRONE_JOB_UUID" = "ac3478d69a" ] || [ "$DRONE_JOB_UUID" = "c1dfd96eea" ] || [ "$DRONE_JOB_UUID" = "902ba3cda1" ] || [ "$DRONE_JOB_UUID" = "fe5dbbcea5" ] || [ "$DRONE_JOB_UUID" = "0ade7c2cf9" ] || [ "$DRONE_JOB_UUID" = "b1d5781111" ] || [ "$DRONE_JOB_UUID" = "17ba079149" ] || [ "$DRONE_JOB_UUID" = "7b52009b64" ] || [ "$DRONE_JOB_UUID" = "bd307a3ec3" ] || [ "$DRONE_JOB_UUID" = "fa35e19212" ] || [ "$DRONE_JOB_UUID" = "f1abd67035" ] || [ "$DRONE_JOB_UUID" = "1574bddb75" ] || [ "$DRONE_JOB_UUID" = "0716d9708d" ] || [ "$DRONE_JOB_UUID" = "9e6a55b6b4" ] || [ "$DRONE_JOB_UUID" = "b3f0c7f6bb" ] || [ "$DRONE_JOB_UUID" = "91032ad7bb" ] || [ "$DRONE_JOB_UUID" = "472b07b9fc" ] || [ "$DRONE_JOB_UUID" = "12c6fc06c9" ] ; then + if [[ "${BOOST_BUILD}" == "true" ]]; then + rm -rf "${BOOST_DIR}/libs/hana" + cp -rp ${TRAVIS_BUILD_DIR} "${BOOST_DIR}/libs/hana" + export TRAVIS_BUILD_DIR="${BOOST_DIR}/libs/hana" + fi + + git config --global user.name "Travis bot" + git config --global user.email "<>" + cd "${TRAVIS_BUILD_DIR}" + (mkdir build && cd build && cmake .. ${CMAKE_OPTIONS}) +fi + diff --git a/.drone/drone.sh b/.drone/drone.sh new file mode 100755 index 0000000000..11ae0e69ab --- /dev/null +++ b/.drone/drone.sh @@ -0,0 +1,188 @@ +#!/bin/bash + +# Copyright 2020 Rene Rivera, Sam Darwin +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt) + +set -e +export TRAVIS_BUILD_DIR=$(pwd) +export DRONE_BUILD_DIR=$(pwd) +export TRAVIS_BRANCH=$DRONE_BRANCH +export VCS_COMMIT_ID=$DRONE_COMMIT +export GIT_COMMIT=$DRONE_COMMIT +export REPO_NAME=$DRONE_REPO +export PATH=~/.local/bin:/usr/local/bin:$PATH + +if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then + +echo '==================================> INSTALL' + + +# Drone adding ruby +git clone https://github.com/sstephenson/rbenv.git ~/.rbenv +echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"' >> ~/.bash_profile +exec $SHELL +pushd $HOME +git clone git@github.com:sstephenson/ruby-build.git +cd ruby-build +./install.sh +ruby-build 1.8.7-p352 ~/.rbenv/versions/1.8.7-p352 +ruby-build 1.9.3-preview1 ~/.rbenv/versions/1.9.3-preview1 +rbenv rehash +rbenv set-default 2.1.4 +ruby --version +popd + +DEPS_DIR="${HOME}/deps" +mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR} +if [[ "${COMPILER}" == "default" ]]; then COMPILER=clang++-7; fi +if [[ "${BOOST_VERSION}" == "default" ]]; then BOOST_VERSION=1.66.0; fi +if [[ "${COMPILER}" != "" ]]; then export CXX=${COMPILER}; fi +${CXX} --version +if [[ "${BOOST_VERSION}" != "" ]]; then + BOOST_DIR=${DEPS_DIR}/boost-${BOOST_VERSION} + if [[ "${BOOST_VERSION}" == "trunk" ]]; then + BOOST_URL="http://github.com/boostorg/boost.git" + git clone --depth 1 --recursive ${BOOST_URL} ${BOOST_DIR} || exit 1 + (cd ${BOOST_DIR} && ./bootstrap.sh && ./b2 headers) || exit 1 + else + BOOST_URL="https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION//\./_}.tar.gz" + mkdir -p ${BOOST_DIR} + { wget -O - ${BOOST_URL} | tar --strip-components=1 -xz -C ${BOOST_DIR}; } || exit 1 + fi + # Make sure we don't conflict with the Hana shipped with Boost + rm -r ${BOOST_DIR}/boost/{hana,hana.hpp} || exit 1 + + CMAKE_OPTIONS+=" -DBOOST_ROOT=${BOOST_DIR}" +fi + +if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then + CMAKE_URL="https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.tar.gz" + mkdir cmake && wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake + export PATH=${DEPS_DIR}/cmake/bin:${PATH} +else + true brew install cmake || true brew upgrade cmake +fi + +cmake --version || true +if [[ "${BOOST_BUILD}" == "true" ]]; then + (cd ${BOOST_DIR}/tools/build && ./bootstrap.sh && ./b2 install --prefix=${DEPS_DIR}/b2) + export PATH=${DEPS_DIR}/b2/bin:${PATH} + b2 --version || true # b2 --version returns 1 +fi + +if [[ "${CXX%%+*}" == "clang" ]]; then + if [[ "${CXX}" == "clang++-3.9" ]]; then LLVM_VERSION="3.9.1"; + elif [[ "${CXX}" == "clang++-4.0" ]]; then LLVM_VERSION="4.0.1"; + elif [[ "${CXX}" == "clang++-5.0" ]]; then LLVM_VERSION="5.0.2"; + elif [[ "${CXX}" == "clang++-6.0" ]]; then LLVM_VERSION="6.0.1"; + elif [[ "${CXX}" == "clang++-7" ]]; then LLVM_VERSION="7.0.1"; + fi + + LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz" + LIBCXX_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxx-${LLVM_VERSION}.src.tar.xz" + LIBCXXABI_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxxabi-${LLVM_VERSION}.src.tar.xz" + + mkdir -p llvm llvm/build llvm/projects/libcxx llvm/projects/libcxxabi + wget -O - ${LLVM_URL} | tar --strip-components=1 -xJ -C llvm || exit 1 + wget -O - ${LIBCXX_URL} | tar --strip-components=1 -xJ -C llvm/projects/libcxx || exit 1 + wget -O - ${LIBCXXABI_URL} | tar --strip-components=1 -xJ -C llvm/projects/libcxxabi || exit 1 + (cd llvm/build && cmake .. -DCMAKE_INSTALL_PREFIX=${DEPS_DIR}/llvm/install) || exit 1 + (cd llvm/build/projects/libcxx && make install -j2) || exit 1 + (cd llvm/build/projects/libcxxabi && make install -j2) || exit 1 + + export CXXFLAGS="-isystem ${DEPS_DIR}/llvm/install/include/c++/v1" + export LDFLAGS="-L ${DEPS_DIR}/llvm/install/lib -l c++ -l c++abi" + export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DEPS_DIR}/llvm/install/lib" +fi + +if [[ "${DOCUMENTATION}" == "true" ]]; then + true brew install doxygen + doxygen --version +fi + +if [[ "${BENCHMARKS}" == "true" ]]; then + rvm use 2.1 --install --binary --fuzzy + gem install ruby-progressbar tilt +fi + +echo '==================================> BEFORE_SCRIPT' + +. $DRONE_BUILD_DIR/.drone/before-script.sh + +echo '==================================> SCRIPT' + +sources=($(find include doc test example -name "*.hpp" -or -name "*.cpp")) +LANG=POSIX grep '[^[:print:][:cntrl:]]' "${sources[@]}"; [[ $? == 1 ]] || exit 1 +LANG=POSIX grep $'\r' "${sources[@]}"; [[ $? == 1 ]] || exit 1 +LANG=POSIX grep $'\t' "${sources[@]}"; [[ $? == 1 ]] || exit 1 +LANG=POSIX grep '[[:blank:]]$' "${sources[@]}"; [[ $? == 1 ]] || exit 1 +if [[ "${DOCUMENTATION}" == "true" ]]; then + (cd build && ! make doc 2>&1 | grep -E "error") || exit 1 + + if [[ "${TRAVIS_PULL_REQUEST}" == "false" && "${TRAVIS_BRANCH}" == "master" ]]; then + # Suppress output to avoid leaking the token when the command fails + git clone https://ldionne:${GITHUB_TOKEN}@github.com/boostorg/hana --depth 1 --branch=gh-pages doc/html &>/dev/null + + rm -rf doc/html/{search,*.png,*.css,*.js,*.html} + cp -R build/doc/html/* doc/html/ + + pushd doc/html + git add --all . + git commit --allow-empty -m "Update documentation to ${TRAVIS_COMMIT:0:7}" + # Suppress output to avoid leaking the token + git push origin gh-pages &>/dev/null + popd + fi +fi + +if [[ "${BENCHMARKS}" == "true" ]]; then + if [[ "${TRAVIS_PULL_REQUEST}" == "false" && "${TRAVIS_BRANCH}" == "master" ]]; then + (cd build && make benchmarks) || exit 1 + compiler_slug=$(cd build && make travis_compiler_slug | grep 'travis_compiler_slug:' | cut -d ' ' -f 2) + config_slug=$(cd build && make travis_config_slug | grep 'travis_config_slug:' | cut -d ' ' -f 2) + + # Suppress output to avoid leaking the token when the command fails + git clone https://ldionne:${GITHUB_TOKEN}@github.com/boostorg/hana --depth 1 --branch=gh-pages doc/html &>/dev/null + rm -rf doc/html/benchmarks/${config_slug}/${compiler_slug}/ + mkdir -p doc/html/benchmarks/${config_slug}/${compiler_slug}/ + for benchmark in $(ls build/benchmark/*.json | grep -v ".erb"); do + cp ${benchmark} doc/html/benchmarks/${config_slug}/${compiler_slug}/ + done + + pushd doc/html + git add --all . + git commit --allow-empty -m "Update benchmarks to ${TRAVIS_COMMIT:0:7} for build type '${config_slug}' and compiler '${compiler_slug}'" + # Suppress output to avoid leaking the token + git push origin gh-pages &>/dev/null + popd + else + export BOOST_HANA_JUST_CHECK_BENCHMARKS=true + (cd build && make benchmarks -j2) + fi +fi + +if [[ "${UNIT_TESTS}" == "true" ]]; then + (cd build && make tests examples -j2 -k) && + if [[ "${ENABLE_MEMCHECK}" == "true" ]]; then + (cd build && ctest --output-on-failure -j2 -D ExperimentalMemCheck) + else + (cd build && ctest --output-on-failure -j2) + fi +fi + +if [[ "${BOOST_BUILD}" == "true" ]]; then + # Build documentation + (cd doc && b2) || exit 1 + if [[ ! -d doc/html ]]; then exit 1; fi + + # Build tests + echo "using clang : : ${CXX} ;" > project-config.jam + if [[ "${LDFLAGS}" == "" ]]; then + (cd test && b2 toolset=clang cxxflags="-std=c++1y ${CXXFLAGS}" include="${BOOST_DIR}") || exit 1 + else + (cd test && b2 toolset=clang cxxflags="-std=c++1y ${CXXFLAGS}" include="${BOOST_DIR}" linkflags="${LDFLAGS}") || exit 1 + fi +fi + +fi