-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·363 lines (354 loc) · 15.5 KB
/
build-N-test-v1-Release.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
#
# build-N-test-v1-Dev and build-N-test-v1-Release are nearly
# identical, but a few tests are commented out (to not needlessly stress CI system)
# for v1-Dev builds; and on.push.branches setting
#
# NOTE: I've tried many tricks - none which seem to work - to get this working on one file with one
# workflow and tests
# https://github.community/t/what-is-the-correct-if-condition-syntax-for-checking-matrix-os-version/16221
# https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853
#
# but none seem to work
#
name: build-N-test-v1-Release
on:
push:
branches:
# - v1-Dev
- v1-Release
workflow_dispatch:
inputs:
ignored:
description: "ignored"
required: false
default: ""
env:
COMMIT_ID2BUILD: ${{ github.sha }}
# vm has 2 virtual CPUs, but 8GB ram, so jobs=5 (empirical), and QUICK_BUILD avoids some internal testing
MAKEFLAGS: "--jobs=3 QUICK_BUILD=1"
## NB: JOBS section IDENTICAL between v1-Dev and v1-Release files EXCEPT that on v1-Dev file
## comment out all entries marked with includeInDevBranchBuilds: false
jobs:
build-n-test-Linux:
runs-on: ${{ matrix.runs_on }}
strategy:
matrix:
include:
## ubuntu 18.04
- displayTargetName: ubuntu-18.04-g++-8 (Debug)
os: unix
compiler: g++-8
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-1804
cpp_version: c++17
config_name: Debug
# Turn off debug syms to save space, avoid failed build
extra_config_args: --apply-default-debug-flags --trace2file enable --debug-symbols false
includeInDevBranchBuilds: true
- displayTargetName: ubuntu-18.04-g++-8
os: unix
compiler: g++-8
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-1804
cpp_version: c++17
config_name: Release
extra_config_args: --apply-default-release-flags
includeInDevBranchBuilds: false
- displayTargetName: ubuntu-18.04-X2-raspberrypi
os: unix
compiler: arm-linux-gnueabihf-g++-8
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-1804
cpp_version: c++17
config_name: Release
extra_config_args: --apply-default-release-flags --compiler-driver arm-linux-gnueabihf-g++-8 --cross-compiling true
includeInDevBranchBuilds: false
# ubuntu 20.04
- displayTargetName: ubuntu-20.04-g++-10 (Debug)
os: unix
compiler: g++-10
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-2004
cpp_version: c++17
config_name: Debug
extra_config_args: --apply-default-debug-flags --trace2file enable
includeInDevBranchBuilds: true
- displayTargetName: ubuntu-20.04-g++-10
os: unix
compiler: g++-10
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-2004
cpp_version: c++17
config_name: Release
extra_config_args: --apply-default-release-flags
includeInDevBranchBuilds: true
- displayTargetName: ubuntu-20.04-g++-10-c++2a
os: unix
compiler: g++-10
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-2004
cpp_version: c++2a
config_name: Release
extra_config_args: --apply-default-release-flags --trace2file enable
includeInDevBranchBuilds: true
- displayTargetName: ubuntu-20.04-X2-raspberrypi
os: unix
compiler: arm-linux-gnueabihf-g++-10
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-2004
cpp_version: c++2a
config_name: Release
extra_config_args: --apply-default-release-flags --compiler-driver arm-linux-gnueabihf-g++-10 --cross-compiling true
includeInDevBranchBuilds: true
- displayTargetName: ubuntu-20.04-X2-raspberrypi (Debug)
os: unix
compiler: arm-linux-gnueabihf-g++-10
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-2004
cpp_version: c++2a
config_name: Debug
# https://github.com/SophistSolutions/WhyTheFuckIsMyNetworkSoSlow/issues/22 - explains the suppression of ASAN
extra_config_args: --apply-default-debug-flags --compiler-driver arm-linux-gnueabihf-g++-10 --cross-compiling true --no-sanitize address
includeInDevBranchBuilds: true
# ubuntu 22.04
- displayTargetName: ubuntu-22.04-g++-12 (Debug)
os: unix
compiler: g++-12
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-2204
cpp_version: c++20
config_name: Debug
extra_config_args: --apply-default-debug-flags --trace2file enable
includeInDevBranchBuilds: false
- displayTargetName: ubuntu-22.04-g++-12 (Debug-tsan-ubsan)
os: unix
compiler: g++-12
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-2204
cpp_version: c++20
config_name: Debug-tsan-ubsan
extra_config_args: --apply-default-debug-flags --trace2file enable --sanitize none,thread,undefined
includeInDevBranchBuilds: false
- displayTargetName: ubuntu-22.04-g++-12
os: unix
compiler: g++-12
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-2204
cpp_version: c++20
config_name: Release
extra_config_args: --apply-default-release-flags
includeInDevBranchBuilds: true
- displayTargetName: ubuntu-22.04-X2-raspberrypi
os: unix
compiler: arm-linux-gnueabihf-g++-12
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-2204
cpp_version: c++20
config_name: Release
extra_config_args: --apply-default-release-flags --compiler-driver arm-linux-gnueabihf-g++-12 --cross-compiling true
includeInDevBranchBuilds: true
- displayTargetName: ubuntu-22.04-X2-raspberrypi (Debug)
os: unix
compiler: arm-linux-gnueabihf-g++-12
runs_on: ubuntu-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-ubuntu-2204
cpp_version: c++20
config_name: Debug
extra_config_args: --apply-default-debug-flags --compiler-driver arm-linux-gnueabihf-g++-12 --cross-compiling true
includeInDevBranchBuilds: false
container: ${{ matrix.container_image }}
steps:
- name: Build System Info
if: ${{ matrix.os=='unix' }}
run: |
lsb_release -d 2>/dev/null || true
echo "CWD=" `pwd`
echo "nproc=" `nproc`
grep "model name" /proc/cpuinfo | head -1
grep processor /proc/cpuinfo | wc -l
grep MemTotal /proc/meminfo
df -h
- name: Build System Info (Windows)
if: ${{ matrix.os=='windows' }}
run: |
echo "CWD=" `pwd`
df -h
# Couldn't get uses: actions/checkout@v2 working with submodules
- name: Checkout
run: |
git clone https://github.com/SophistSolutions/WhyTheFuckIsMyNetworkSoSlow.git
cd WhyTheFuckIsMyNetworkSoSlow
git checkout $COMMIT_ID2BUILD
git submodule update --recursive --init
- name: Create build root structure
shell: "bash"
run: |
cd WhyTheFuckIsMyNetworkSoSlow
make build-root
- name: Configure ${{ matrix.config_name }}
run: |
cd WhyTheFuckIsMyNetworkSoSlow
cd ThirdPartyComponents/Stroika/StroikaRoot && ./configure ${{ matrix.config_name }} --compiler-driver ${{ matrix.compiler }} ${{ matrix.extra_config_args }} --cppstd-version ${{ matrix.cpp_version }}
cat ConfigurationFiles/${{ matrix.config_name }}.xml
- name: Make ThirdPartyComponents
# break out this make and clean to reduce disk space usage (running out of space on debug builds)
run: |
cd WhyTheFuckIsMyNetworkSoSlow
make --directory=ThirdPartyComponents CONFIGURATION=${{ matrix.config_name }} all
make --directory=ThirdPartyComponents CONFIGURATION=${{ matrix.config_name }} clean
- name: Make all
run: |
cd WhyTheFuckIsMyNetworkSoSlow
make all
- name: Archive Build Results
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.displayTargetName }} Installers
path: |
WhyTheFuckIsMyNetworkSoSlow/Builds/${{ matrix.config_name }}/WhyTheFuckIsMyNetworkSoSlow/*.deb
build-n-test-MacOS:
runs-on: ${{ matrix.runs_on }}
strategy:
matrix:
# Add to extra_config_args for build speed: --Xerces no --OpenSSL no --lzma no --boost no
include:
- displayTargetName: MacOS-x86_64-Debug
os: macos-latest
runs_on: macos-latest
config_name: Debug
extra_config_args: --apply-default-debug-flags --trace2file enable
includeInDevBranchBuilds: false
- displayTargetName: MacOS-x86_64
os: macos-latest
runs_on: macos-latest
config_name: Release
extra_config_args: --apply-default-release-flags
includeInDevBranchBuilds: true
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.COMMIT_ID2BUILD }}
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Build System Info
run: |
echo "CWD: `pwd`"
df -h
system_profiler SPSoftwareDataType
sw_vers
# If we had docker ability, most of these would be built into a docker file
- name: Install Basic Build requirements
run: |
brew install gnu-sed
brew install p7zip
brew install automake
make --no-print-directory --directory ThirdPartyComponents/Stroika/StroikaRoot install-realpath
- name: Create build root structure
run: |
make build-root
- name: Configure
run: |
cd ThirdPartyComponents/Stroika/StroikaRoot && ./configure ${{ matrix.config_name }} ${{ matrix.extra_config_args }}
cat ConfigurationFiles/${{ matrix.config_name }}.xml
- name: Build All
run: |
make all
- name: Build System Info
run: |
df -h
- name: Archive Installers Results
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.displayTargetName }} Installers
path: |
Builds/${{ matrix.config_name }}/WhyTheFuckIsMyNetworkSoSlow/*
build-n-test-Windows:
runs-on: ${{ matrix.runs_on }}
strategy:
matrix:
# Add to extra_config_args for build speed: --Xerces no --OpenSSL no --lzma no --boost no
include:
- displayTargetName: windows-x86-Debug
os: windows
runs_on: windows-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-windows-cygwin-vs2k19
config_name: windows-x86-Debug
extra_config_args: --arch x86 --apply-default-debug-flags --trace2file enable
includeInDevBranchBuilds: true
- displayTargetName: windows-x86-Release
os: windows
runs_on: windows-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-windows-cygwin-vs2k19
config_name: Release
extra_config_args: --arch x86 --apply-default-release-flags --trace2file enable
includeInDevBranchBuilds: false
- displayTargetName: windows-x86_64-Debug
os: windows
runs_on: windows-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-windows-cygwin-vs2k19
config_name: Debug
extra_config_args: --arch x86_64 --apply-default-debug-flags --trace2file enable
includeInDevBranchBuilds: false
- displayTargetName: windows-x86_64-Release
os: windows
runs_on: windows-latest
container_image: sophistsolutionsinc/whythefuckismynetworksoslow-windows-cygwin-vs2k19
config_name: Release
extra_config_args: --arch x86_64 --apply-default-release-flags --trace2file enable
includeInDevBranchBuilds: false
env:
ARTIFACTS_DIR: "c:/Artifacts/"
steps:
- name: Build System Info
shell: "bash"
run: |
echo "CWD: `pwd`"
df -h
systeminfo
echo NUMBER_OF_PROCESSORS=$NUMBER_OF_PROCESSORS
- name: docker pull ${{ matrix.container_image }}
run: docker pull ${{ matrix.container_image }}
- name: Start docker build environment
run: |
docker run --tty --memory 5G --cpus 2 --storage-opt 'size=50GB' --detach --name buildContainer ${{ matrix.container_image }}
- name: Print Info about docker system
shell: "bash"
run: |
docker exec buildContainer systeminfo
docker exec buildContainer df -h
- name: Git Checkout
shell: "bash"
run: |
docker exec buildContainer git clone https://github.com/SophistSolutions/WhyTheFuckIsMyNetworkSoSlow.git
docker exec --workdir c:/WhyTheFuckIsMyNetworkSoSlow/ buildContainer git checkout $COMMIT_ID2BUILD
docker exec --workdir c:/WhyTheFuckIsMyNetworkSoSlow/ buildContainer git submodule update --recursive --init
- name: Create build root structure
shell: "bash"
run: |
docker exec --workdir c:/WhyTheFuckIsMyNetworkSoSlow buildContainer make build-root
- name: Configure
shell: "bash"
run: |
docker exec --workdir c:/WhyTheFuckIsMyNetworkSoSlow/ThirdPartyComponents/Stroika/StroikaRoot buildContainer sh -c "./configure ${{ matrix.config_name }} ${{ matrix.extra_config_args }}"
docker exec --workdir c:/WhyTheFuckIsMyNetworkSoSlow/ThirdPartyComponents/Stroika/StroikaRoot buildContainer cat ConfigurationFiles/${{ matrix.config_name }}.xml
- name: Build
shell: "bash"
run: |
docker exec --workdir c:/WhyTheFuckIsMyNetworkSoSlow --env MAKEFLAGS="$MAKEFLAGS" buildContainer make all
- name: Build System Info
shell: "bash"
run: |
df -h
docker exec buildContainer df -h
- name: Copy Build Artifacts
shell: "bash"
# due to flaws in docker (windows must stop) - and cp no wildcards
run: |
docker stop buildContainer
docker cp buildContainer:WhyTheFuckIsMyNetworkSoSlow/Builds/${{ matrix.config_name }}/ $ARTIFACTS_DIR 2> /dev/null
- name: Archive Installer Results
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.displayTargetName }} Installers
path: |
${{ env.ARTIFACTS_DIR }}/WhyTheFuckIsMyNetworkSoSlow/*.msi