forked from arvidn/libtorrent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
161 lines (147 loc) · 6.6 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
version: "{build}"
branches:
only:
- master
- RC_2_0
- RC_1_2
- RC_1_1
image: Visual Studio 2017
clone_depth: 1
environment:
matrix:
- variant: debug
compiler: msvc-14.1
model: 64
api: store
lib: 1
- variant: debug
compiler: msvc-14.1
model: 32
lib: 1
- variant: debug
compiler: gcc
model: 32
crypto: openssl
ssl_lib: /usr/local/include
ssl_include: /usr/local/lib
lib: 1
- variant: debug
compiler: msvc-14.1
model: 64
sim: 1
- cmake: 1
- variant: release
compiler: msvc-14.1
model: 64
python: 1
python_dist: 1
crypto: openssl
ssl_lib: c:\OpenSSL-v111-Win64\lib
ssl_include: c:\OpenSSL-v111-Win64\include
tests: 1
examples: 1
tools: 1
artifacts:
- path: bindings/python/dist/*
name: python-module
install:
- git submodule update --init --recursive
- set ROOT_DIRECTORY=%CD%
- cd %ROOT_DIRECTORY%
- if not defined api ( set api="desktop" )
- if not defined compiler ( set compiler="" )
- if not defined crypto ( set crypto=built-in )
- if not defined ssl_lib ( set ssl_lib=c:\ )
- if not defined ssl_include ( set ssl_include=c:\ )
- cd %ROOT_DIRECTORY%
- set BOOST_ROOT=c:\Libraries\boost_1_69_0
- set BOOST_BUILD_PATH=%BOOST_ROOT%\tools\build
- echo %BOOST_ROOT%
- echo %BOOST_BUILD_PATH%
- set PATH=%PATH%;%BOOST_BUILD_PATH%
- ps: '"using msvc : 14.1 ;`nusing gcc ;`nusing python : 3.6 : c:\\Python36-x64 : c:\\Python36-x64\\include : c:\\Python36-x64\\libs ;`n" | Set-Content $env:HOMEDRIVE\$env:HOMEPATH\user-config.jam'
- type %HOMEDRIVE%%HOMEPATH%\user-config.jam
- cd %ROOT_DIRECTORY%
- set PATH=c:\msys64\mingw32\bin;%PATH%
- g++ --version
- set PATH=c:\Python36-x64;%PATH%
- set PYTHON_INTERPRETER=c:\Python36-x64\python.exe
- python --version
- echo %ROOT_DIRECTORY%
- cd %BOOST_BUILD_PATH%
- bootstrap.bat >nul
- cd %ROOT_DIRECTORY%
build_script:
# just the library
- cd %ROOT_DIRECTORY%
- if defined lib (
b2.exe --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% asserts=on export-extra=on windows-api=%api% windows-version=win10 cxxstd=14
)
# examples
- cd %ROOT_DIRECTORY%\examples
- if defined examples (
b2.exe --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% asserts=on export-extra=on windows-api=%api% windows-version=win10
)
# tools
- cd %ROOT_DIRECTORY%\tools
- if defined tools (
b2.exe --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% asserts=on export-extra=on windows-api=%api% windows-version=win10
)
# test
- cd %ROOT_DIRECTORY%\test
- if defined tests (
b2.exe --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% asserts=on export-extra=on windows-api=%api% windows-version=win10 testing.execute=off
)
# python binding
- cd %ROOT_DIRECTORY%\bindings\python
# we use 64 bit python builds
# boost.python itself doesn't build warning free, so we can't build
# with warnings-as-errors
- if defined python (
b2.exe --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% asserts=on export-extra=on windows-api=%api% windows-version=win10 libtorrent-link=shared stage_module stage_dependencies
)
- if defined python_dist (
c:\Python35-x64\python.exe setup.py bdist --format=msi
)
# simulations
- cd %ROOT_DIRECTORY%\simulation
- if defined sim (
b2.exe --hash warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% debug-iterators=off picker-debugging=on invariant-checks=full debug boost-link=default link=static crypto=built-in define=BOOST_ASIO_DISABLE_IOCP asserts=on testing.execute=off
)
# minimal support for cmake build
# we need to build the boost libraries we use with C++14
# and stage it for cmake to pick up
- if defined cmake (
cd %BOOST_ROOT% &&
bjam cxxstd=14 release --with-python --with-system --layout=system address-model=64 link=shared stage &&
cd %ROOT_DIRECTORY% &&
mkdir build &&
cd build &&
cmake -DBOOST_LIBRARYDIR=%BOOST_ROOT%\stage\lib -DCMAKE_CXX_STANDARD=14 -Dbuild_tests=ON -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=%python% -Dboost-python-module-name="python" -Dskip-python-runtime-test=true -DPython_ADDITIONAL_VERSIONS="2.7" -G "Visual Studio 15 2017" -A x64 .. &&
cmake --build . --config Release --parallel %NUMBER_OF_PROCESSORS% -- -verbosity:minimal
)
test_script:
- cd %ROOT_DIRECTORY%\test
- if defined tests (
appveyor-retry b2.exe -l500 --hash openssl-lib=%ssl_lib% openssl-include=%ssl_include% warnings=all warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% picker-debugging=on invariant-checks=full variant=%variant% link=shared crypto=%crypto% asserts=on export-extra=on windows-api=%api% windows-version=win10
)
- cd %ROOT_DIRECTORY%\bindings\python
# we use 64 bit python build
- if defined python (
copy dependencies\*.* .
& c:\Python36-x64\python.exe test.py -b
)
- if defined cmake (
appveyor-retry ctest
)
# simulation tests
# debug iterators are turned off here because msvc has issues with noexcept
# specifiers when debug iterators are enabled. Specifically, constructors that
# allocate memory are still marked as noexcept. That results in program
# termination
# the IOCP backend in asio appears to have an issue where it hangs under
# certain unexpected terminations (through exceptions)
- cd %ROOT_DIRECTORY%\simulation
- if defined sim (
b2.exe --hash warnings-as-errors=on -j %NUMBER_OF_PROCESSORS% %compiler% address-model=%model% debug-iterators=off picker-debugging=on invariant-checks=full debug boost-link=default link=static crypto=built-in define=BOOST_ASIO_DISABLE_IOCP asserts=on
)