fix travis osx build
This commit is contained in:
parent
9b1607a63c
commit
47bd25230c
33
.travis.yml
33
.travis.yml
|
@ -66,6 +66,11 @@ before_install:
|
||||||
travis_retry brew install boost-python python2;
|
travis_retry brew install boost-python python2;
|
||||||
brew link --overwrite python@2;
|
brew link --overwrite python@2;
|
||||||
fi'
|
fi'
|
||||||
|
- 'if [[ $TRAVIS_OS_NAME != "osx" ]]; then
|
||||||
|
export B2=bjam;
|
||||||
|
else
|
||||||
|
export B2=b2;
|
||||||
|
fi'
|
||||||
# we have to use python from brew rather than the system provided python
|
# we have to use python from brew rather than the system provided python
|
||||||
# because of OSX System Integrity Protection, which prevents injecting
|
# because of OSX System Integrity Protection, which prevents injecting
|
||||||
# user-libraries (i.e. python modules) into system binaries (i.e. /usr/bin/python)
|
# user-libraries (i.e. python modules) into system binaries (i.e. /usr/bin/python)
|
||||||
|
@ -198,28 +203,28 @@ script:
|
||||||
python3 -m flake8 --max-line-length=120;
|
python3 -m flake8 --max-line-length=120;
|
||||||
fi'
|
fi'
|
||||||
- 'if [ "$sonar_scan" == "1" ]; then
|
- 'if [ "$sonar_scan" == "1" ]; then
|
||||||
build-wrapper-linux-x86-64 --out-dir bw-output bjam -a -j3 optimization=off crypto=$crypto deprecated-functions=off $toolset variant=$variant -l300 &&
|
build-wrapper-linux-x86-64 --out-dir bw-output ${B2} -a -j3 optimization=off crypto=$crypto deprecated-functions=off $toolset variant=$variant -l300 &&
|
||||||
sonar-scanner -D sonar.login=$SONAR_TOKEN;
|
sonar-scanner -D sonar.login=$SONAR_TOKEN;
|
||||||
fi'
|
fi'
|
||||||
- 'if [[ $clang_tidy == "1" ]]; then
|
- 'if [[ $clang_tidy == "1" ]]; then
|
||||||
which clang-tidy;
|
which clang-tidy;
|
||||||
clang-tidy --version;
|
clang-tidy --version;
|
||||||
bjam -a -j3 clang_tidy;
|
${B2} -a -j3 clang_tidy;
|
||||||
fi'
|
fi'
|
||||||
|
|
||||||
- 'if [ "$check_headers" == "1" ]; then
|
- 'if [ "$check_headers" == "1" ]; then
|
||||||
bjam -j3 check-headers crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant;
|
${B2} -j3 check-headers crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant;
|
||||||
fi'
|
fi'
|
||||||
|
|
||||||
# if we are building with code coverage, report it as soon as possible
|
# if we are building with code coverage, report it as soon as possible
|
||||||
# libtorrent is the name of the test suite target
|
# libtorrent is the name of the test suite target
|
||||||
- cd test
|
- cd test
|
||||||
- 'if [ "$tests" == "1" ]; then
|
- 'if [ "$tests" == "1" ]; then
|
||||||
bjam -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 &&
|
${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 bjam -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 -l300 &&
|
||||||
travis_retry bjam -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 &&
|
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 &&
|
||||||
if [[ $TRAVIS_OS_NAME != "osx" ]]; then
|
if [[ $TRAVIS_OS_NAME != "osx" ]]; then
|
||||||
travis_retry bjam -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 crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant test_lsd -l300;
|
||||||
fi &&
|
fi &&
|
||||||
if [ "$coverage" == "1" ]; then
|
if [ "$coverage" == "1" ]; then
|
||||||
codecov --root .. --gcov-exec gcov-5;
|
codecov --root .. --gcov-exec gcov-5;
|
||||||
|
@ -230,30 +235,30 @@ script:
|
||||||
# rebuilding libtorrent itself.
|
# rebuilding libtorrent itself.
|
||||||
- cd ../fuzzers
|
- cd ../fuzzers
|
||||||
- 'if [ "$fuzzers" == "1" ]; then
|
- 'if [ "$fuzzers" == "1" ]; then
|
||||||
bjam -j3 warnings-as-errors=on warnings=all crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant sanitize=off fuzz=off link=shared stage;
|
${B2} -j3 warnings-as-errors=on warnings=all crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant sanitize=off fuzz=off link=shared stage;
|
||||||
fi'
|
fi'
|
||||||
|
|
||||||
- cd ../examples
|
- cd ../examples
|
||||||
- 'if [ "$examples" == "1" ]; then
|
- 'if [ "$examples" == "1" ]; then
|
||||||
bjam -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 crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant link=shared;
|
||||||
fi'
|
fi'
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
- cd tools
|
- cd tools
|
||||||
- 'if [ "$tools" == "1" ]; then
|
- 'if [ "$tools" == "1" ]; then
|
||||||
bjam -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 crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant link=shared;
|
||||||
fi'
|
fi'
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
- if [[ $ios == "1" ]]; then
|
- if [[ $ios == "1" ]]; then
|
||||||
bjam -q darwin-ios darwin-ios_sim -j2 link=static;
|
${B2} -q darwin-ios darwin-ios_sim -j2 link=static;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# a binary built with sanitizer does not interact well with python
|
# a binary built with sanitizer does not interact well with python
|
||||||
# on OSX we need to use the brew version of python, for reasons explained above
|
# on OSX we need to use the brew version of python, for reasons explained above
|
||||||
- cd bindings/python
|
- cd bindings/python
|
||||||
- 'if [[ "$python" == "1" ]]; then
|
- 'if [[ "$python" == "1" ]]; then
|
||||||
bjam -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 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 &&
|
||||||
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
||||||
DYLD_LIBRARY_PATH=./dependencies python2 test.py -b;
|
DYLD_LIBRARY_PATH=./dependencies python2 test.py -b;
|
||||||
else
|
else
|
||||||
|
@ -265,7 +270,7 @@ script:
|
||||||
# simulation
|
# simulation
|
||||||
- cd simulation
|
- cd simulation
|
||||||
- 'if [[ "$sim" == "1" ]]; then
|
- 'if [[ "$sim" == "1" ]]; then
|
||||||
bjam -j2 crypto=built-in warnings-as-errors=on warnings=all debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset deprecated-functions=off;
|
${B2} -j2 crypto=built-in warnings-as-errors=on warnings=all debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset deprecated-functions=off;
|
||||||
fi'
|
fi'
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
|
@ -294,6 +299,6 @@ script:
|
||||||
- cd test
|
- cd test
|
||||||
- 'if [[ "$arch" == "arm" ]];
|
- 'if [[ "$arch" == "arm" ]];
|
||||||
then
|
then
|
||||||
bjam arm-tests warnings-as-errors=on warnings=all crypto=$crypto variant=test_arm $toolset target-os=linux link=static testing.launcher="sudo cp -R bin rootfs/; sudo chroot rootfs";
|
${B2} arm-tests warnings-as-errors=on warnings=all crypto=$crypto variant=test_arm $toolset target-os=linux link=static testing.launcher="sudo cp -R bin rootfs/; sudo chroot rootfs";
|
||||||
fi'
|
fi'
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
Loading…
Reference in New Issue