From 96f8f85eef537776251795208c0b6e1889318332 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 20 Apr 2017 23:39:44 +0100 Subject: [PATCH] Use environment variable to set user-config.jam --- .travis.yml | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index 199da13c..44392aa3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,42 +18,40 @@ addons: matrix: include: - compiler: gcc - env: BJAM_TOOLSET=gcc + env: | + label="gcc C++03"; + user_config="using gcc : : g++-4.8 -fsanitize=address -Werror --std=c++03 ;" - compiler: gcc - env: BJAM_TOOLSET=gcc-std11 - #- compiler: gcc - # env: BJAM_TOOLSET=gcc-m32 + env: | + label="gcc C++11"; + user_config="using gcc : : g++-4.8 -fsanitize=address -Werror --std=c++11 ;" - compiler: gcc - env: BJAM_TOOLSET=gcc-std11m32 - #- compiler: clang - # env: BJAM_TOOLSET=clang + env: | + label="gcc 32 bit C++11"; + user_config="using gcc : : g++-4.8 -m32 -fsanitize=address -Werror --std=c++11 ;" - compiler: clang - env: BJAM_TOOLSET=clang-std11 + env: | + label="clang C++11"; + user_config="using clang : : clang++ -fsanitize=address -Werror --std=c++11 ;" + # sanitized=address not available for 32-bit clang on travis. - compiler: clang - env: BJAM_TOOLSET=clang-m32 - #- compiler: clang - # env: BJAM_TOOLSET=clang-std11m32 + env: | + label="clang 32 bit"; + user_config="using clang : : clang++ -m32 -Werror --std=c++03 ;" - compiler: gcc - env: BJAM_TOOLSET=gcc-interopable + env: | + label="gcc C++03 interopable1"; + user_config="using gcc : : g++-4.8 -fsanitize=address -Werror --std=c++03 -DBOOST_UNORDERED_INTEROPERABLE_NODES=1 ;" - compiler: clang - env: BJAM_TOOLSET=clang-interopable + env: | + label="gcc C++11 interopable1"; + user_config="using clang : : clang++ -fsanitize=address -Werror --std=c++03 -DBOOST_UNORDERED_INTEROPERABLE_NODES=1 ;" before_script: - cd ${TRAVIS_BUILD_DIR} - touch Jamroot.jam - cd $HOME - - | - echo "using gcc : : g++-4.8 -Werror --std=c++03 -fsanitize=address ;" > ~/user-config.jam - echo "using gcc : std11 : g++-4.8 -Werror --std=c++11 -fsanitize=address ;" >> ~/user-config.jam - echo "using gcc : m32 : g++-4.8 -m32 -Werror -fsanitize=address ;" >> ~/user-config.jam - echo "using gcc : std11m32 : g++-4.8 -m32 -Werror --std=c++11 -fsanitize=address ;" >> ~/user-config.jam - echo "using clang : : clang++ -Werror --std=c++03 -fsanitize=address ;" >> ~/user-config.jam - echo "using clang : std11 : clang++ -Werror --std=c++11 -fsanitize=address ;" >> ~/user-config.jam - # sanitized=address not available for 32-bit clang on travis. - echo "using clang : m32 : clang++ -m32 -Werror --std=c++03 ;" >> ~/user-config.jam - echo "using clang : std11m32 : clang++ -m32 -Werror --std=c++11 ;" >> ~/user-config.jam - echo "using gcc : interopable : g++-4.8 -Werror --std=c++03 -fsanitize=address -DBOOST_UNORDERED_INTEROPERABLE_NODES=1 ;" >> ~/user-config.jam - echo "using clang : interopable : clang++ -Werror --std=c++11 -fsanitize=address -DBOOST_UNORDERED_INTEROPERABLE_NODES=1 ;" >> ~/user-config.jam + - echo $user_config > ~/user-config.jam - cat ~/user-config.jam - wget -O boost.tar.bz2 https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.bz2 - tar -xjf boost.tar.bz2 @@ -62,5 +60,5 @@ before_script: script: - cd ${TRAVIS_BUILD_DIR}/test - - bjam ${BJAM_TOOLSET} include=${HOME}/boost include=${TRAVIS_BUILD_DIR}/include + - bjam include=${HOME}/boost include=${TRAVIS_BUILD_DIR}/include - xmllint --noout ${TRAVIS_BUILD_DIR}/doc/ref.xml