simplify travis script by putting all common bjam command line arguments in a variable

This commit is contained in:
Arvid Norberg 2019-09-15 07:18:30 -06:00 committed by Arvid Norberg
parent dee84280dc
commit 96bec628e7
1 changed files with 12 additions and 8 deletions

View File

@ -212,19 +212,23 @@ script:
${B2} -a -j3 clang_tidy;
fi'
# the common boost-build command line arguments. It's important they are all
# the same, in order for builds to be reused between invocations
- export B2_ARGS="crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant"
- 'if [ "$check_headers" == "1" ]; then
${B2} -j3 check-headers crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant;
${B2} -j3 check-headers ${B2_ARGS};
fi'
# if we are building with code coverage, report it as soon as possible
# libtorrent is the name of the test suite target
- cd test
- 'if [ "$tests" == "1" ]; then
${B2} -j3 warnings-as-errors=on warnings=all crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant testing.execute=off &&
travis_retry ${B2} -j3 warnings-as-errors=on warnings=all crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant -l300 &&
travis_retry ${B2} -j3 warnings-as-errors=on warnings=all crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant test_natpmp enum_if -l300 &&
${B2} -j3 warnings-as-errors=on warnings=all ${B2_ARGS} testing.execute=off &&
travis_retry ${B2} -j3 warnings-as-errors=on warnings=all ${B2_ARGS} -l300 &&
travis_retry ${B2} -j3 warnings-as-errors=on warnings=all ${B2_ARGS} test_natpmp enum_if -l300 &&
if [[ $TRAVIS_OS_NAME != "osx" ]]; then
travis_retry ${B2} -j3 warnings-as-errors=on warnings=all crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant test_lsd -l300;
travis_retry ${B2} -j3 warnings-as-errors=on warnings=all ${B2_ARGS} test_lsd -l300;
fi &&
if [ "$coverage" == "1" ]; then
codecov --root .. --gcov-exec gcov-5;
@ -240,13 +244,13 @@ script:
- cd ../examples
- 'if [ "$examples" == "1" ]; then
${B2} -j3 warnings-as-errors=on warnings=all crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant link=shared;
${B2} -j3 warnings-as-errors=on warnings=all ${B2_ARGS} link=shared;
fi'
- cd ..
- cd tools
- 'if [ "$tools" == "1" ]; then
${B2} -j3 warnings-as-errors=on warnings=all crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant link=shared;
${B2} -j3 warnings-as-errors=on warnings=all ${B2_ARGS} link=shared;
fi'
- cd ..
@ -258,7 +262,7 @@ script:
# on OSX we need to use the brew version of python, for reasons explained above
- cd bindings/python
- 'if [[ "$python" == "1" ]]; then
${B2} -j3 warnings-as-errors=on warnings=all crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant stage_module stage_dependencies libtorrent-link=shared boost-link=shared &&
${B2} -j3 warnings-as-errors=on warnings=all ${B2_ARGS} stage_module stage_dependencies libtorrent-link=shared boost-link=shared &&
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
DYLD_LIBRARY_PATH=./dependencies python2 test.py -b;
else