don't support c++98 anymore. build bt-get and bt-get2 by default (which require C++11). simplify address-model configuration in appveyor script. enable msvc-14 builds. use boost 1.59 on appveyor (#618)

This commit is contained in:
Arvid Norberg 2016-04-24 09:17:58 -04:00
parent c9c6dd2d3b
commit 97bdb4ba25
4 changed files with 44 additions and 73 deletions

View File

@ -5,10 +5,9 @@ os:
- osx
env:
- variant=test_release lang=cpp11 sim=0 coverage=1 docs=1
- variant=test_debug lang=cpp11 sim=1 coverage=0
- variant=test_debug lang=cpp98 sim=0 coverage=0
- variant=test_barebones lang=cpp11 sim=0 coverage=0
- variant=test_release sim=0 coverage=1 docs=1
- variant=test_debug sim=1 coverage=0
- variant=test_barebones sim=0 coverage=0
git:
submodules: false
@ -52,9 +51,9 @@ before_install:
fi'
# disable simulations on OSX for now. It hangs on travis
- if [ $TRAVIS_OS_NAME == "osx" ]; then export toolset="darwin-${lang}"; export sim="0"; fi
- if [ $TRAVIS_OS_NAME == "osx" ]; then export toolset="darwin"; export sim="0"; fi
- if [ $TRAVIS_OS_NAME == "osx" ]; then export target="osx-tests"; fi
- if [ $TRAVIS_OS_NAME == "linux" ]; then export toolset="gcc-${lang}"; fi
- if [ $TRAVIS_OS_NAME == "linux" ]; then export toolset="gcc"; fi
- if [[ $TRAVIS_OS_NAME == "linux" && $coverage == "1" ]]; then
export coverage_toolset=gcc-coverage;
pip install --user codecov;
@ -65,15 +64,13 @@ before_install:
install:
- g++-4.8 --version
- 'echo "using gcc : cpp11 : ccache g++-4.8 : <cflags>-std=c11 <cxxflags>-std=c++11 ;" > ~/user-config.jam'
- 'echo "using gcc : : ccache g++-4.8 : <cflags>-std=c11 <cxxflags>-std=c++11 ;" > ~/user-config.jam'
- 'echo "using gcc : coverage : ccache g++-4.8 : <cflags>-std=c11 <cxxflags>-std=c++11 <compileflags>--coverage <linkflags>--coverage ;" >> ~/user-config.jam'
- 'echo "using gcc : cpp98 : ccache g++-4.8 : <cflags>-std=c99 <cxxflags>-std=c++98 ;" >> ~/user-config.jam'
# osx builds need to disable the deprecated warning because of the openssl
# shipping with the system having marked all functions as deprecated. Since
# we're building with -Werror, we can't have those warnings
- 'echo "using darwin : cpp11 : ccache clang++ : <cflags>-std=c11 <cxxflags>-std=c++11 <compileflags>-Wno-deprecated-declarations ;" >> ~/user-config.jam'
- 'echo "using darwin : cpp98 : ccache clang++ : <cflags>-std=c99 <cxxflags>-std=c++98 <compileflags>-Wno-deprecated-declarations ;" >> ~/user-config.jam'
- 'echo "using darwin : : ccache clang++ : <cflags>-std=c11 <cxxflags>-std=c++11 <compileflags>-Wno-deprecated-declarations ;" >> ~/user-config.jam'
- 'echo "using python : 2.7 ;" >> ~/user-config.jam'
- ccache -V && ccache --show-stats && ccache --zero-stats
- if [[ $docs == "1" && $TRAVIS_OS_NAME == "osx" ]]; then rst2html.py --version; fi
@ -92,10 +89,7 @@ script:
fi
- cd ../examples
- bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset link=shared
- if [[ $lang == "cpp11" ]]; then
bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset link=shared bt-get bt-get2;
fi
- bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset link=shared bt-get bt-get2;
- cd ..
# build libtorrent separately and install it in a temporary (well known) dir

View File

@ -8,32 +8,26 @@ os: Visual Studio 2015
clone_depth: 1
environment:
matrix:
# - variant: test_debug
# compiler: msvc-14.0
# sim: 1
# linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2015\\lib"'
# include: '"c:\\openssl-1.0.1p-vs2015\\include"'
- variant: test_debug
compiler: msvc-12.0
compiler: msvc-14.0
model: 64
sim: 1
linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2013\\lib"'
include: '"c:\\openssl-1.0.1p-vs2013\\include"'
linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2015\\lib64"'
include: '"c:\\openssl-1.0.1p-vs2015\\include"'
- variant: test_debug
compiler: msvc-12.0
x64: 1
model: 64
linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2013\\lib64"'
include: '"c:\\openssl-1.0.1p-vs2013\\include"'
- variant: test_debug
python_package: 1
compiler: msvc-10.0
linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2010\\lib"'
include: '"c:\\openssl-1.0.1p-vs2010\\include"'
- variant: test_barebones
compiler: msvc-12.0
model: 32
python_package: 1
linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2013\\lib"'
include: '"c:\\openssl-1.0.1p-vs2013\\include"'
- variant: test_release
compiler: msvc-12.0
model: 32
linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2013\\lib"'
include: '"c:\\openssl-1.0.1p-vs2013\\include"'
@ -62,20 +56,6 @@ install:
& copy c:\openssl-1.0.1p-vs2013\lib\ssleay32MT.lib c:\openssl-1.0.1p-vs2013\lib\ssleay32.lib
& copy c:\openssl-1.0.1p-vs2013\lib\libeay32MT.lib c:\openssl-1.0.1p-vs2013\lib\libeay32.lib
)
- if %compiler% == msvc-10.0 (
if not exist openssl-1.0.1p-vs2010.7z (
echo downloading openssl-2010
& appveyor DownloadFile "http://www.npcglib.org/~stathis/downloads/openssl-1.0.1p-vs2010.7z"
)
)
- if %compiler% == msvc-10.0 (
echo extracting openssl-2010
& 7z x -oc:\ -aoa openssl-1.0.1p-vs2010.7z > nul
& copy c:\openssl-1.0.1p-vs2010\lib64\ssleay32MT.lib c:\openssl-1.0.1p-vs2010\lib64\ssleay32.lib
& copy c:\openssl-1.0.1p-vs2010\lib64\libeay32MT.lib c:\openssl-1.0.1p-vs2010\lib64\libeay32.lib
& copy c:\openssl-1.0.1p-vs2010\lib\ssleay32MT.lib c:\openssl-1.0.1p-vs2010\lib\ssleay32.lib
& copy c:\openssl-1.0.1p-vs2010\lib\libeay32MT.lib c:\openssl-1.0.1p-vs2010\lib\libeay32.lib
)
- if %compiler% == msvc-14.0 (
if not exist openssl-1.0.1p-vs2015.7z (
echo downloading openssl-2015
@ -91,14 +71,13 @@ install:
& copy c:\openssl-1.0.1p-vs2015\lib\libeay32MT.lib c:\openssl-1.0.1p-vs2015\lib\libeay32.lib
)
- cd %ROOT_DIRECTORY%
- set BOOST_ROOT=c:\Libraries\boost
- set BOOST_ROOT=c:\Libraries\boost_1_59_0
- set BOOST_BUILD_PATH=%BOOST_ROOT%\tools\build
- echo %BOOST_ROOT%
- echo %BOOST_BUILD_PATH%
- set PATH=%PATH%;%BOOST_BUILD_PATH%\src\engine\bin.ntx86
- 'echo using msvc : 10.0 ; >%HOMEDRIVE%%HOMEPATH%/user-config.jam'
- 'echo using msvc : 12.0 ; >>%HOMEDRIVE%%HOMEPATH%/user-config.jam'
- 'echo using msvc : 9.0 ; >>%HOMEDRIVE%%HOMEPATH%/user-config.jam'
- 'echo using msvc : 12.0 ; >%HOMEDRIVE%%HOMEPATH%/user-config.jam'
- 'echo using msvc : 14.0 ; >>%HOMEDRIVE%%HOMEPATH%/user-config.jam'
- type %HOMEDRIVE%%HOMEPATH%\user-config.jam
- cd %ROOT_DIRECTORY%
- set PATH=%PATH%;c:\Mingw\bin
@ -110,34 +89,38 @@ install:
- cd %ROOT_DIRECTORY%
cache:
- openssl-1.0.1p-vs2010.7z
- openssl-1.0.1p-vs2013.7z
- openssl-1.0.1p-vs2015.7z
build_script:
- if not defined x64 (
cd %ROOT_DIRECTORY%\examples
& b2.exe --hash -j2 %compiler% variant=%variant% linkflags=%linkflags% include=%include% link=shared
& if %compiler% == msvc-14.0 ( b2.exe --hash -j2 %compiler% variant=%variant% linkflags=%linkflags% include=%include% link=shared bt-get bt-get2 )
& cd %ROOT_DIRECTORY%\examples
& b2.exe --hash -j2 %compiler% variant=%variant% linkflags=%linkflags% include=%include% link=shared
& cd %ROOT_DIRECTORY%\bindings\python
& b2.exe --hash -j2 %compiler% stage_module install-dependencies=on variant=%variant% libtorrent-link=shared linkflags=%linkflags% include=%include%
& python test.py
& if defined python_package ( python setup.py --bjam bdist_msi )
# examples
- cd %ROOT_DIRECTORY%\examples
- b2.exe --hash -j2 %compiler% address-model=%model% variant=%variant% linkflags=%linkflags% include=%include% link=shared
# test
- cd %ROOT_DIRECTORY%\test
- b2.exe --hash -j2 address-model=%model% win-tests %compiler% variant=%variant% link=shared linkflags=%linkflags% include=%include% testing.execute=off
# python binding
- cd %ROOT_DIRECTORY%\bindings\python
# 64 bit python module builds don't work
- if %model% == 32 ( b2.exe --hash -j2 %compiler% address-model=%model% stage_module install-dependencies=on variant=%variant% libtorrent-link=shared linkflags=%linkflags% include=%include% )
- if defined python_package ( python setup.py --bjam bdist_msi )
# simulations
- if defined sim (
cd %ROOT_DIRECTORY%\simulation
& b2.exe --hash -j2 link=shared crypto=built-in %compiler% address-model=%model% testing.execute=off
)
test_script:
- cd %ROOT_DIRECTORY%\test
- if defined x64 (
b2.exe --hash -j2 address-model=64 win-tests %compiler% variant=%variant% link=shared linkflags=%linkflags% include=%include%
) else (
b2.exe --hash -j2 address-model=32 win-tests %compiler% variant=%variant% link=shared linkflags=%linkflags% include=%include%
)
- if defined sim (
cd %ROOT_DIRECTORY%\simulation
& b2.exe --hash -j2 link=shared crypto=built-in %compiler%
)
- b2.exe --hash -j2 address-model=%model% win-tests %compiler% variant=%variant% link=shared linkflags=%linkflags% include=%include%
- cd %ROOT_DIRECTORY%\bindings\python
# 64 bit python module builds don't work
- if %model% == 32 ( python test.py )
- cd %ROOT_DIRECTORY%\simulation
- if defined sim ( b2.exe --hash -j2 link=shared crypto=built-in %compiler% address-model=%model% )
artifacts:
- path: bindings\python\dist\*.msi

View File

@ -70,19 +70,15 @@ if '--bjam' in sys.argv:
if not '--help' in sys.argv \
and not '--help-commands' in sys.argv:
toolset = ''
file_ext = '.so'
if platform.system() == 'Windows':
# msvc 9.0 (2008) is the official windows compiler for python 2.6
# http://docs.python.org/whatsnew/2.6.html#build-and-c-api-changes
toolset = ' msvc-9.0'
file_ext = '.pyd'
parallel_builds = ' -j%d' % multiprocessing.cpu_count()
# build libtorrent using bjam and build the installer with distutils
cmdline = 'b2 libtorrent-link=static boost-link=static release optimization=space stage_module --abbreviate-paths' + toolset + parallel_builds
cmdline = 'b2 libtorrent-link=static boost-link=static release optimization=space stage_module --abbreviate-paths' + parallel_builds
print(cmdline)
if os.system(cmdline) != 0:
print('build failed')

View File

@ -30,8 +30,6 @@ exe upnp_test : upnp_test.cpp ;
explicit stage_client_test ;
explicit stage_connection_tester ;
explicit bt-get ;
explicit bt-get2 ;
install stage_client_test : client_test : <location>. ;
install stage_connection_tester : connection_tester : <location>. ;