Reduce appveyor builds 1.1 (#883)
reduce the number of times libtorrent is built on appveyor and travis
This commit is contained in:
parent
cf65f85dc3
commit
eeb91cb803
10
.travis.yml
10
.travis.yml
|
@ -85,27 +85,27 @@ script:
|
|||
- cd ..
|
||||
|
||||
- cd test
|
||||
- bjam --hash -j3 warnings-as-errors=on variant=$variant -l900 $coverage_toolset $target
|
||||
- bjam --hash -j3 warnings-as-errors=on invariant-checks=full variant=$variant -l900 $coverage_toolset $target
|
||||
# if we're building with code coverage, report it as soon as possible
|
||||
- if [[ $TRAVIS_OS_NAME == "linux" && $coverage == "1" ]]; then
|
||||
codecov --root .. --gcov-exec gcov-4.8;
|
||||
fi
|
||||
|
||||
- cd ../examples
|
||||
- bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset link=shared
|
||||
- bjam --hash -j3 warnings-as-errors=on debug-iterators=on picker-debugging=on invariant-checks=full variant=$variant $coverage_toolset link=shared
|
||||
- if [[ $lang == "cpp11" ]]; then
|
||||
bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset link=shared bt-get bt-get2;
|
||||
bjam --hash -j3 warnings-as-errors=on debug-iterators=on picker-debugging=on invariant-checks=full variant=$variant $coverage_toolset link=shared bt-get bt-get2;
|
||||
fi
|
||||
- cd ..
|
||||
|
||||
# build libtorrent separately and install it in a temporary (well known) dir
|
||||
# we have to do this because on linux the name of the python module is the same
|
||||
# as the main library, so we can't stage them to the same directory
|
||||
- bjam --hash -j3 warnings-as-errors=on link=shared variant=$variant $toolset install location=./lib
|
||||
- bjam --hash -j3 warnings-as-errors=on link=shared debug-iterators=on picker-debugging=on invariant-checks=full variant=$variant $coverage_toolset install location=./lib
|
||||
|
||||
- cd bindings/python
|
||||
# here we specify the temporary lib dir as a path to look for the main library
|
||||
- bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset stage_module libtorrent-link=shared install-type=LIB dll-path=../../lib
|
||||
- bjam --hash -j3 warnings-as-errors=on debug-iterators=on picker-debugging=on invariant-checks=full variant=$variant $coverage_toolset stage_module libtorrent-link=shared install-type=LIB dll-path=../../lib
|
||||
- LD_LIBRARY_PATH=../../lib DYLD_LIBRARY_PATH=../../lib python test.py
|
||||
- cd ../..
|
||||
|
||||
|
|
21
appveyor.yml
21
appveyor.yml
|
@ -7,16 +7,11 @@ 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
|
||||
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\\lib"'
|
||||
include: '"c:\\openssl-1.0.1p-vs2015\\include"'
|
||||
- variant: test_debug
|
||||
compiler: msvc-12.0
|
||||
x64: 1
|
||||
|
@ -96,6 +91,7 @@ install:
|
|||
- 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 : 14.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'
|
||||
- type %HOMEDRIVE%%HOMEPATH%\user-config.jam
|
||||
|
@ -116,10 +112,11 @@ cache:
|
|||
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
|
||||
& if %compiler% == msvc-14.0 (
|
||||
b2.exe --hash -j2 address-model=32 %compiler% variant=%variant% debug-iterators=on picker-debugging=on invariant-checks=full linkflags=%linkflags% include=%include% link=shared bt-get bt-get2
|
||||
) else (
|
||||
b2.exe --hash -j2 address-model=32 %compiler% variant=%variant% debug-iterators=on picker-debugging=on invariant-checks=full 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
|
||||
|
|
|
@ -61,7 +61,7 @@ class test_torrent_info(unittest.TestCase):
|
|||
print f.path
|
||||
|
||||
self.assertEqual(os.path.split(f.path)[1], expected[idx])
|
||||
self.assertEqual(os.path.split(f.path)[0], 'temp/foo')
|
||||
self.assertEqual(os.path.split(os.path.split(f.path)[0]), ('temp', 'foo'))
|
||||
idx += 1
|
||||
|
||||
class test_alerts(unittest.TestCase):
|
||||
|
|
|
@ -10,7 +10,8 @@ use-project /libsimulator : libsimulator ;
|
|||
project
|
||||
: requirements
|
||||
<simulator>on
|
||||
<library>/torrent//torrent/<export-extra>on
|
||||
<export-extra>on
|
||||
<library>/torrent//torrent
|
||||
<library>/libtorrent_test//libtorrent_test
|
||||
<source>setup_swarm.cpp
|
||||
<source>setup_dht.cpp
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit f0e42435dce3ff227cc81b17ccab143b21d8f771
|
||||
Subproject commit c19b35e05831ad46cefd1a9e9f8b022c799bc8d0
|
40
test/Jamfile
40
test/Jamfile
|
@ -16,38 +16,6 @@ explicit test_natpmp ;
|
|||
explicit enum_if ;
|
||||
explicit bdecode_benchmark ;
|
||||
|
||||
rule link_test ( properties * )
|
||||
{
|
||||
local result ;
|
||||
if <link>shared in $(properties)
|
||||
{
|
||||
result +=
|
||||
<library>libtorrent_test/<link>shared ;
|
||||
}
|
||||
else
|
||||
{
|
||||
result +=
|
||||
<library>libtorrent_test/<link>static ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
rule link_libtorrent ( properties * )
|
||||
{
|
||||
local result ;
|
||||
if <link>shared in $(properties)
|
||||
{
|
||||
result +=
|
||||
<library>/torrent//torrent/<link>shared/<boost-link>shared/<export-extra>on ;
|
||||
}
|
||||
else
|
||||
{
|
||||
result +=
|
||||
<library>/torrent//torrent/<link>static/<boost-link>static/<export-extra>on ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
lib libtorrent_test
|
||||
: # sources
|
||||
main.cpp
|
||||
|
@ -71,7 +39,8 @@ lib libtorrent_test
|
|||
<link>shared:<define>ED25519_BUILD_DLL
|
||||
<include>../ed25519/src
|
||||
<target-os>windows:<library>advapi32
|
||||
<conditional>@link_libtorrent
|
||||
<library>/torrent//torrent
|
||||
<export-extra>on
|
||||
<toolset>darwin:<cflags>-Wno-unused-command-line-argument
|
||||
|
||||
: # default build
|
||||
|
@ -88,8 +57,9 @@ lib advapi32 : : <name>Advapi32 ;
|
|||
|
||||
project
|
||||
: requirements
|
||||
<conditional>@link_test
|
||||
<conditional>@link_libtorrent
|
||||
<export-extra>on
|
||||
<library>libtorrent_test
|
||||
<library>/torrent//torrent
|
||||
<toolset>darwin:<cflags>-Wno-unused-command-line-argument
|
||||
: default-build
|
||||
<threading>multi
|
||||
|
|
Loading…
Reference in New Issue