fix travis build
This commit is contained in:
parent
32959318ff
commit
faa807c0f3
75
.travis.yml
75
.travis.yml
|
@ -5,7 +5,8 @@ matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- if: repo = arvidn/libtorrent
|
- if: repo = arvidn/libtorrent
|
||||||
env: variant=release sonar_scan=1 toolset=gcc check_headers=1
|
env: variant=release sonar_scan=1 toolset=gcc
|
||||||
|
- env: variant=release toolset=gcc check_headers=1 python=1
|
||||||
- env: variant=test_debug crypto=openssl docs=1 tests=1 examples=1 tools=1 toolset=darwin
|
- env: variant=test_debug crypto=openssl docs=1 tests=1 examples=1 tools=1 toolset=darwin
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode11.2
|
osx_image: xcode11.2
|
||||||
|
@ -17,14 +18,16 @@ matrix:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- libboost-all-dev
|
|
||||||
- libboost-tools-dev
|
|
||||||
- env: variant=test_debug tests=1 toolset=gcc-sanitizer fuzzers=1
|
- env: variant=test_debug tests=1 toolset=gcc-sanitizer fuzzers=1
|
||||||
- env: variant=test_debug sim=1 crypto=openssl toolset=gcc-sanitizer
|
- env: variant=test_debug sim=1 crypto=openssl toolset=gcc-sanitizer
|
||||||
- env: variant=test_release coverage=1 tests=1 toolset=gcc-coverage python=1
|
- env: variant=test_release coverage=1 tests=1 toolset=gcc-coverage
|
||||||
- env: autotools=1 toolset=gcc
|
- env: autotools=1 toolset=gcc install_boost=1
|
||||||
- env: cmake=1 toolset=gcc
|
- env: cmake=1 toolset=gcc install_boost=1
|
||||||
- env: arch=arm toolset=gcc-arm
|
- env: arch=arm toolset=gcc-arm
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- libboost-tools-dev
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
@ -42,16 +45,14 @@ branches:
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.ccache
|
- $HOME/.ccache
|
||||||
|
- $HOME/boost
|
||||||
|
|
||||||
# sources list: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json,
|
# sources list: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json,
|
||||||
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
|
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- libboost-all-dev
|
|
||||||
- libboost-tools-dev
|
|
||||||
- python3.7-dev
|
- python3.7-dev
|
||||||
- g++-5
|
|
||||||
- ninja-build
|
- ninja-build
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
@ -60,21 +61,46 @@ before_install:
|
||||||
export sonar_scan=0;
|
export sonar_scan=0;
|
||||||
fi'
|
fi'
|
||||||
|
|
||||||
|
# pull down a recent version of boost and build boost-build
|
||||||
|
- 'if [[ "$arch" != "arm" ]]; then
|
||||||
|
cd $HOME;
|
||||||
|
if [[ ! -d boost/.git ]]; then
|
||||||
|
git clone --depth=1 --branch=boost-1.72.0 https://github.com/boostorg/boost.git;
|
||||||
|
fi;
|
||||||
|
export BOOST_ROOT=$PWD/boost;
|
||||||
|
echo ${BOOST_ROOT};
|
||||||
|
cd boost;
|
||||||
|
git submodule update --init --depth=1;
|
||||||
|
./bootstrap.sh;
|
||||||
|
./b2 headers;
|
||||||
|
if [[ "$install_boost" = "1" ]]; then
|
||||||
|
sudo ./b2 cxxstd=11 release install --with-python --with-system | grep -v "^common.copy " | grep -v "^\.\.\.skipped " | grep -v "th target\.\.\.$";
|
||||||
|
cd tools/build;
|
||||||
|
./bootstrap.sh;
|
||||||
|
echo "installing boost.build";
|
||||||
|
sudo ./b2 install --prefix=/usr/;
|
||||||
|
sudo ln -s /usr/local/lib/libboost_python37.so /usr/local/lib/libboost_python.so;
|
||||||
|
sudo ln -s /usr/local/lib/libboost_python36.so /usr/local/lib/libboost_python3.so;
|
||||||
|
fi;
|
||||||
|
fi'
|
||||||
|
- export PATH=$BOOST_ROOT:$PATH
|
||||||
|
|
||||||
|
- cd $TRAVIS_BUILD_DIR
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
- 'if [[ $crypto == "" ]]; then export crypto=built-in; fi'
|
- 'if [[ $crypto == "" ]]; then export crypto=built-in; fi'
|
||||||
- 'if [[ $TRAVIS_OS_NAME == "osx" && ( "$tests" == "1" || "$sim" == 1 || "$examples" == "1" || "$tools" == "1" || "$python" == "1" || "$check_headers" == "1" ) ]]; then
|
- 'if [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
||||||
travis_retry brew update > /dev/null && brew install ccache boost-build;
|
travis_retry brew update > /dev/null && brew install ccache;
|
||||||
fi'
|
fi'
|
||||||
- 'if [[ $TRAVIS_OS_NAME == "osx" && "$python" == "1" ]]; then
|
- 'if [[ $TRAVIS_OS_NAME == "osx" && "$python" == "1" ]]; then
|
||||||
brew unlink python@2;
|
brew unlink python@2;
|
||||||
travis_retry brew install boost-python3 python;
|
travis_retry brew install python;
|
||||||
fi'
|
fi'
|
||||||
- 'if [[ "$python" == "1" ]]; then
|
- 'if [[ "$python" == "1" ]]; then
|
||||||
which python3;
|
which python3;
|
||||||
python3 --version;
|
python3 --version;
|
||||||
fi'
|
fi'
|
||||||
- 'if [[ $TRAVIS_OS_NAME != "osx" ]]; then
|
- 'if [[ $TRAVIS_OS_NAME != "osx" ]]; then
|
||||||
export B2=bjam;
|
export B2=b2;
|
||||||
export PIP=pip;
|
export PIP=pip;
|
||||||
else
|
else
|
||||||
export B2=b2;
|
export B2=b2;
|
||||||
|
@ -101,13 +127,14 @@ before_install:
|
||||||
- ulimit -a
|
- ulimit -a
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
|
||||||
- touch ~/user-config.jam
|
- touch ~/user-config.jam
|
||||||
- 'if [[ $toolset == "gcc" ]]; then
|
- 'if [[ $toolset == "gcc" ]]; then
|
||||||
g++-5 --version;
|
g++ --version;
|
||||||
echo "using gcc : : ccache g++-5 : <cxxflags>-std=c++11 ;" >> ~/user-config.jam;
|
echo "using gcc : : ccache g++ : <cxxflags>-std=c++11 ;" >> ~/user-config.jam;
|
||||||
fi'
|
fi'
|
||||||
- 'if [[ $toolset == "gcc-sanitizer" ]]; then
|
- 'if [[ $toolset == "gcc-sanitizer" ]]; then
|
||||||
echo "using gcc : sanitizer : ccache g++-5 :
|
echo "using gcc : sanitizer : ccache g++ :
|
||||||
<cxxflags>-std=c++11
|
<cxxflags>-std=c++11
|
||||||
<compileflags>-fstack-protector-all
|
<compileflags>-fstack-protector-all
|
||||||
<compileflags>-fstack-check
|
<compileflags>-fstack-check
|
||||||
|
@ -118,7 +145,7 @@ install:
|
||||||
<linkflags>-fuse-ld=gold ;" >> ~/user-config.jam;
|
<linkflags>-fuse-ld=gold ;" >> ~/user-config.jam;
|
||||||
fi'
|
fi'
|
||||||
- 'if [[ $toolset == "gcc-coverage" ]]; then
|
- 'if [[ $toolset == "gcc-coverage" ]]; then
|
||||||
echo "using gcc : coverage : ccache g++-5 --coverage : <cxxflags>-std=c++11 <linkflags>--coverage ;" >> ~/user-config.jam;
|
echo "using gcc : coverage : ccache g++ --coverage : <cxxflags>-std=c++11 <linkflags>--coverage ;" >> ~/user-config.jam;
|
||||||
fi'
|
fi'
|
||||||
- 'if [[ $toolset == "gcc-arm" ]]; then
|
- 'if [[ $toolset == "gcc-arm" ]]; then
|
||||||
echo "using gcc : arm : ccache armv8l-linux-gnueabihf-g++ :
|
echo "using gcc : arm : ccache armv8l-linux-gnueabihf-g++ :
|
||||||
|
@ -272,9 +299,10 @@ script:
|
||||||
|
|
||||||
# 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
|
||||||
|
# boost.python cannot be built with warnings-as-errors=on
|
||||||
- cd bindings/python
|
- cd bindings/python
|
||||||
- 'if [[ "$python" == "1" ]]; then
|
- 'if [[ "$python" == "1" ]]; then
|
||||||
${B2} -j2 warnings-as-errors=on warnings=all ${B2_ARGS} stage_module stage_dependencies libtorrent-link=shared boost-link=shared &&
|
${B2} -j2 warnings-as-errors=off warnings=all ${B2_ARGS} 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 python3 test.py -b;
|
DYLD_LIBRARY_PATH=./dependencies python3 test.py -b;
|
||||||
else
|
else
|
||||||
|
@ -293,8 +321,8 @@ script:
|
||||||
# minimal support for cmake build
|
# minimal support for cmake build
|
||||||
- mkdir build && cd build
|
- mkdir build && cd build
|
||||||
- if [[ "$cmake" == "1" ]]; then
|
- if [[ "$cmake" == "1" ]]; then
|
||||||
export CXX=g++-5 &&
|
export CXX=g++ &&
|
||||||
export CC=gcc-5 &&
|
export CC=gcc &&
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_CXX_STANDARD=11 -Dbuild_tests=ON -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=ON -G Ninja .. &&
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_CXX_STANDARD=11 -Dbuild_tests=ON -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=ON -G Ninja .. &&
|
||||||
cmake --build . --parallel 2;
|
cmake --build . --parallel 2;
|
||||||
fi
|
fi
|
||||||
|
@ -303,8 +331,8 @@ script:
|
||||||
# run through autotools and ./configure to make sure it works
|
# run through autotools and ./configure to make sure it works
|
||||||
- if [[ "$autotools" == "1" ]]; then
|
- if [[ "$autotools" == "1" ]]; then
|
||||||
./autotool.sh &&
|
./autotool.sh &&
|
||||||
export CXX=g++-5 &&
|
export CXX=g++ &&
|
||||||
export CC=gcc-5 &&
|
export CC=gcc &&
|
||||||
export CXXFLAGS="-Werror -Wno-deprecated-declarations" &&
|
export CXXFLAGS="-Werror -Wno-deprecated-declarations" &&
|
||||||
./configure --enable-debug --enable-encryption --enable-examples --enable-tests --enable-python-binding &&
|
./configure --enable-debug --enable-encryption --enable-examples --enable-tests --enable-python-binding &&
|
||||||
make -j2 check;
|
make -j2 check;
|
||||||
|
@ -313,8 +341,7 @@ script:
|
||||||
- ccache --show-stats
|
- ccache --show-stats
|
||||||
|
|
||||||
- cd test
|
- cd test
|
||||||
- 'if [[ "$arch" == "arm" ]];
|
- 'if [[ "$arch" == "arm" ]]; then
|
||||||
then
|
|
||||||
${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";
|
${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 ..
|
||||||
|
|
|
@ -1331,7 +1331,7 @@ examples:
|
||||||
rate_limit_locals = true;
|
rate_limit_locals = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '0': disable_storage = true; --i;
|
case '0': disable_storage = true; --i; break;
|
||||||
case 'e':
|
case 'e':
|
||||||
{
|
{
|
||||||
loop_limit = atoi(arg);
|
loop_limit = atoi(arg);
|
||||||
|
|
|
@ -35,6 +35,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
#include "libtorrent/aux_/export.hpp"
|
#include "libtorrent/aux_/export.hpp"
|
||||||
#include "libtorrent/units.hpp"
|
#include "libtorrent/units.hpp"
|
||||||
|
|
|
@ -76,7 +76,7 @@ namespace libtorrent {
|
||||||
address gateway;
|
address gateway;
|
||||||
address source_hint;
|
address source_hint;
|
||||||
char name[64]{};
|
char name[64]{};
|
||||||
int mtu;
|
int mtu = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
// returns a list of the configured IP interfaces
|
// returns a list of the configured IP interfaces
|
||||||
|
|
|
@ -39,7 +39,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
#if defined TORRENT_BUILD_SIMULATOR
|
#if defined TORRENT_BUILD_SIMULATOR
|
||||||
|
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||||
#include "simulator/simulator.hpp"
|
#include "simulator/simulator.hpp"
|
||||||
|
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace libtorrent {
|
namespace libtorrent {
|
||||||
|
|
|
@ -19,7 +19,6 @@ test_programs = \
|
||||||
test_receive_buffer \
|
test_receive_buffer \
|
||||||
test_resume \
|
test_resume \
|
||||||
test_read_resume \
|
test_read_resume \
|
||||||
test_ssl \
|
|
||||||
test_stack_allocator \
|
test_stack_allocator \
|
||||||
test_storage \
|
test_storage \
|
||||||
test_time_critical \
|
test_time_critical \
|
||||||
|
@ -249,7 +248,6 @@ test_time_critical_SOURCES = test_time_critical.cpp
|
||||||
test_resume_SOURCES = test_resume.cpp
|
test_resume_SOURCES = test_resume.cpp
|
||||||
test_read_resume_SOURCES = test_read_resume.cpp
|
test_read_resume_SOURCES = test_read_resume.cpp
|
||||||
test_stack_allocator_SOURCES = test_stack_allocator.cpp
|
test_stack_allocator_SOURCES = test_stack_allocator.cpp
|
||||||
test_ssl_SOURCES = test_ssl.cpp
|
|
||||||
test_torrent_SOURCES = test_torrent.cpp
|
test_torrent_SOURCES = test_torrent.cpp
|
||||||
test_tracker_SOURCES = test_tracker.cpp
|
test_tracker_SOURCES = test_tracker.cpp
|
||||||
test_transfer_SOURCES = test_transfer.cpp
|
test_transfer_SOURCES = test_transfer.cpp
|
||||||
|
|
Loading…
Reference in New Issue