forked from arvidn/libtorrent
-
Notifications
You must be signed in to change notification settings - Fork 1
171 lines (144 loc) · 5.09 KB
/
windows.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
162
163
164
165
166
167
168
169
170
name: Windows
on:
push:
branches: [ RC_1_2 RC_2_0 master ]
pull_request:
defaults:
run:
shell: cmd
jobs:
tests:
name: Test
runs-on: windows-2019
continue-on-error: true
strategy:
matrix:
include:
- config: address-model=32
- config: address-model=64 crypto=openssl openssl-lib=vcpkg\installed\x64-windows\lib\ openssl-include=vcpkg\installed\x64-windows\include
- config: release
steps:
- name: checkout
uses: actions/[email protected]
with:
submodules: true
# we only build with openssl on 64 bit. The github action images comes
# with openssl pre-installed, but only the 64 bit version and there's no
# naming convention to separate the two. When building the 32 bit version
# it appears it still picks up the 64 bit DLL, and fails.
- name: install openssl (64 bit)
if: ${{ contains(matrix.config, 'crypto=openssl') }}
uses: lukka/run-vcpkg@v6
with:
vcpkgArguments: 'openssl'
vcpkgTriplet: 'x64-windows'
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: 0bf3923f9fab4001c00f0f429682a0853b5749e0
- name: install boost
run: |
git clone --depth=1 --recurse-submodules -j10 --branch=boost-1.72.0 https://github.com/boostorg/boost.git
cd boost
bootstrap.bat
- name: boost headers
run: |
cd boost
.\b2 headers
- name: tests (deterministic)
run: |
set BOOST_ROOT=%CD%\boost
set PATH=%BOOST_ROOT%;%PATH%
set PYTHON_INTERPRETER=python
cd test
b2 -l400 warnings=all warnings-as-errors=on ${{ matrix.config }} deterministic-tests
- name: tests (flaky)
run: |
set BOOST_ROOT=%CD%\boost
set PATH=%BOOST_ROOT%;%PATH%
set PYTHON_INTERPRETER=python
cd test
set c=3
:retry
if %c%==0 exit /B 1
set /a c = %c% -1
b2 -l400 warnings=all warnings-as-errors=on ${{ matrix.config }}
if %errorlevel%==0 exit /B 0
if %c% gtr 0 goto retry
exit /B 1
simulations:
name: Simulations
runs-on: windows-2019
steps:
- name: checkout
uses: actions/[email protected]
with:
submodules: true
- name: install boost
run: |
git clone --depth=1 --recurse-submodules -j10 --branch=boost-1.72.0 https://github.com/boostorg/boost.git
cd boost
bootstrap.bat
- name: boost headers
run: |
cd boost
.\b2 headers
# 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)
- name: build sims
run: |
set BOOST_ROOT=%CD%\boost
set PATH=%BOOST_ROOT%;%PATH%
cd simulation
b2 --hash address-model=64 link=static debug-iterators=off invariant-checks=on crypto=built-in define=BOOST_ASIO_DISABLE_IOCP asserts=on testing.execute=off
- name: run sims
run: |
set BOOST_ROOT=%CD%\boost
set PATH=%BOOST_ROOT%;%PATH%
cd simulation
b2 --hash -l500 address-model=64 link=static debug-iterators=off invariant-checks=on crypto=built-in define=BOOST_ASIO_DISABLE_IOCP asserts=on
build:
name: Build
runs-on: windows-2019
continue-on-error: true
strategy:
matrix:
include:
- config: asio-debugging=on picker-debugging=on windows-version=vista
- config: windows-api=store windows-version=win10
- config: deprecated-functions=off
steps:
- name: checkout
uses: actions/[email protected]
with:
submodules: true
- name: install boost
run: |
git clone --depth=1 --recurse-submodules -j10 --branch=boost-1.72.0 https://github.com/boostorg/boost.git
cd boost
bootstrap.bat
- name: boost headers
run: |
cd boost
.\b2 headers
- name: build library
run: |
set BOOST_ROOT=%CD%\boost
set PATH=%BOOST_ROOT%;%PATH%
b2 ${{ matrix.config }} cxxstd=14 warnings=all warnings-as-errors=on
- name: build examples
if: ${{ ! contains(matrix.config, 'windows-api=store') }}
run: |
set BOOST_ROOT=%CD%\boost
set PATH=%BOOST_ROOT%;%PATH%
cd examples
b2 ${{ matrix.config }} warnings=all warnings-as-errors=on
- name: build tools
if: ${{ ! contains(matrix.config, 'windows-api=store') }}
run: |
set BOOST_ROOT=%CD%\boost
set PATH=%BOOST_ROOT%;%PATH%
cd tools
b2 ${{ matrix.config }} warnings=all warnings-as-errors=on