-
Notifications
You must be signed in to change notification settings - Fork 6
522 lines (461 loc) · 25.1 KB
/
msbuild.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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
name: VCPKG Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
OUT_PATH: install
CHECKOUT_REF: 'v103.0.0'
ARCHIVE_NAME: ${{ github.event.repository.name }}-${{ github.event.repository.tag_name }}
jobs:
# # Run the job only when we want the given arch on the given OS
# if: contains(matrix.os.archs, matrix.arch)
# wheels:
# # Note references to within matrix.os' data structure
# name: >
# Build ${{ matrix.os.name }} ${{ matrix.py }} ${{ matrix.arch }}
# wheels
# runs-on: ${{ matrix.os.version }}
# strategy:
# matrix:
# # We are limited to a matrix with 256 elements.
# # More than that and you can fall back to generating sparse
# # matrix elements with "include:", using cog.
# os:
# - ubuntu:
# # the key of the mapping does not seem to be made available
# # by the github API, so provide a value with the os name
# name: ubuntu
# version: ubuntu-latest
# archs:
# - x86_64
# - i686
# - aarch64
# - windows:
# name: windows
# version: windows-latest
# archs:
# - x86
# - amd64
# - macos:
# name: macos
# version: macos-latest
# archs:
# - x86_64
# py:
# - cp36
# - cp37
# - cp38
# - cp39
# - cp310
# arch:
# - x86_64
# - i686
# - aarch64
# - x86
# fail-fast: false
build_windows_x86:
name: Windows Build X86
runs-on: windows-latest
strategy:
matrix:
kind: [x86]
steps:
# - name: Install 7Zip PowerShell Module
# shell: powershell
# run: Install-Module 7Zip4PowerShell -Force
# - name: Get current date
# id: date
# run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- uses: actions/checkout@v2
# id: checkout
# - name: Set output
# id: vars
# run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
# - name: Check output
# env:
# RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
# run: |
# echo $RELEASE_VERSION
# echo ${{ steps.vars.outputs.tag }}
#
# run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
# git fetch --tags --force # Retrieve annotated tags. THIS TRICK REALLY HELPS
# echo ::set-output name=subject::$(git for-each-ref $GITHUB_REF --format='%(contents:subject)')
# # …
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Installing vcpkg
run: |
git clone --depth 1 https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg.exe --triplet x86-windows-static integrate install
.\vcpkg.exe install openssl:x86-windows-static
.\vcpkg.exe install openssl-windows:x86-windows-static
set OPENSSL_ROOT_DIR="./installed/x86-windows-static"
# - name: Configure CMake Static Library
# # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
# run: cmake -B ${{github.workspace}}/static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=ON
# - name: Build Static Library
# # Build your program with the given configuration
# run:
# cmake --build ${{github.workspace}}/static --config ${{env.BUILD_TYPE}} --target ${{env.OUT_PATH}}
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
#-DCMAKE_TOOLCHAIN_FILE=D:/a/live555/live555/vcpkg/scripts/buildsystems/vcpkg.cmake
#-DOPENSSL_ROOT_DIR="D:/vcpkg/installed/x64-windows"
run:
#cmake -B ${{github.workspace}}/windows -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=OFF -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake"
cmake -B ${{github.workspace}}/windows -A Win32 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_PREFIX_PATH="./vcpkg/installed/x86-windows-static" -DOPENSSL_ROOT_DIR="./vcpkg/installed/x86-windows-static" -DVCPKG_TARGET_TRIPLET=x86-windows-static
# cmake -B ${{github.workspace}}/windows -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=OFF -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake"
- name: Build
# Build your program with the given configuration
run:
cmake --build ${{github.workspace}}/windows --config ${{env.BUILD_TYPE}} --target ${{env.OUT_PATH}} -j20
# - name: create-archive
# id: create_archive
# run:
# powershell Compress-7Zip ${{env.OUT_PATH}} -ArchiveFileName ${{env.ARCHIVE_NAME}}_win64.zip -Format Zip
# - name: create-checksum
# id: create-checksum
# run: |
# sha256sum "$ARCHIVE_NAME"_win64.zip > checksum_shared.txt
# echo "::set-output name=checksum::$(cut -d ' ' -f 1 checksum_win64.txt)"
# - name: create-release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token, https://github.com/settings/tokens
# with:
# tag_name: ${{ github.ref }}_${{ steps.date.outputs.date }}
# release_name: Release ${{ github.ref }} ${{ steps.date.outputs.date }}
# draft: false
# prerelease: false
# - name: upload-archive-shared
# id: upload-release-asset_shared
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token, https://github.com/settings/tokens
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ${{ env.ARCHIVE_NAME }}_win64.zip
# asset_name: ${{ env.ARCHIVE_NAME }}_win64.zip
# asset_content_type: application/gzip
# - name: Package
# run: .\package.ps1
# - name: Create Release
# id: create_release
# uses: actions/create-release@latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: ${{ github.ref }}
build_windows_x86_dll:
name: Windows Build X86 Dynamic Link Library
runs-on: windows-latest
strategy:
matrix:
kind: [x86]
steps:
# - name: Install 7Zip PowerShell Module
# shell: powershell
# run: Install-Module 7Zip4PowerShell -Force
# - name: Get current date
# id: date
# run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- uses: actions/checkout@v2
# id: checkout
# - name: Set output
# id: vars
# run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
# - name: Check output
# env:
# RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
# run: |
# echo $RELEASE_VERSION
# echo ${{ steps.vars.outputs.tag }}
#
# run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
# git fetch --tags --force # Retrieve annotated tags. THIS TRICK REALLY HELPS
# echo ::set-output name=subject::$(git for-each-ref $GITHUB_REF --format='%(contents:subject)')
# # …
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Installing vcpkg
run: |
git clone --depth 1 https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg.exe --triplet x86-windows-static integrate install
.\vcpkg.exe install openssl:x86-windows-static
.\vcpkg.exe install openssl-windows:x86-windows
set OPENSSL_ROOT_DIR="./installed/x86-windows"
# - name: Configure CMake Static Library
# # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
# run: cmake -B ${{github.workspace}}/static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=ON
# - name: Build Static Library
# # Build your program with the given configuration
# run:
# cmake --build ${{github.workspace}}/static --config ${{env.BUILD_TYPE}} --target ${{env.OUT_PATH}}
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
#-DCMAKE_TOOLCHAIN_FILE=D:/a/live555/live555/vcpkg/scripts/buildsystems/vcpkg.cmake
#-DOPENSSL_ROOT_DIR="D:/vcpkg/installed/x64-windows"
run:
#cmake -B ${{github.workspace}}/windows -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=OFF -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake"
#cmake -B ${{github.workspace}}/windows -A Win32 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_PREFIX_PATH="./vcpkg/installed/x86-windows" -DOPENSSL_ROOT_DIR="./vcpkg/installed/x86-windows" -DVCPKG_TARGET_TRIPLET=x86-windows
cmake -B ${{github.workspace}}/windows -A Win32 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=OFF -DLIVE555_MONOLITH_BUILD=ON -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_PREFIX_PATH="./vcpkg/installed/x86-windows" -DOPENSSL_ROOT_DIR="./vcpkg/installed/x86-windows" -DVCPKG_TARGET_TRIPLET=x86-windows
#cmake -B ${{github.workspace}}/windows -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=OFF -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake"
- name: Build
# Build your program with the given configuration
run:
cmake --build ${{github.workspace}}/windows --config ${{env.BUILD_TYPE}} --target ${{env.OUT_PATH}} -j20
# - name: create-archive
# id: create_archive
# run:
# powershell Compress-7Zip ${{env.OUT_PATH}} -ArchiveFileName ${{env.ARCHIVE_NAME}}_win64.zip -Format Zip
# - name: create-checksum
# id: create-checksum
# run: |
# sha256sum "$ARCHIVE_NAME"_win64.zip > checksum_shared.txt
# echo "::set-output name=checksum::$(cut -d ' ' -f 1 checksum_win64.txt)"
# - name: create-release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token, https://github.com/settings/tokens
# with:
# tag_name: ${{ github.ref }}_${{ steps.date.outputs.date }}
# release_name: Release ${{ github.ref }} ${{ steps.date.outputs.date }}
# draft: false
# prerelease: false
# - name: upload-archive-shared
# id: upload-release-asset_shared
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token, https://github.com/settings/tokens
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ${{ env.ARCHIVE_NAME }}_win64.zip
# asset_name: ${{ env.ARCHIVE_NAME }}_win64.zip
# asset_content_type: application/gzip
# - name: Package
# run: .\package.ps1
# - name: Create Release
# id: create_release
# uses: actions/create-release@latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: ${{ github.ref }}
build_windows_x64:
name: Windows Build X64
runs-on: windows-latest
strategy:
matrix:
kind: [x64]
steps:
# - name: Install 7Zip PowerShell Module
# shell: powershell
# run: Install-Module 7Zip4PowerShell -Force
# - name: Get current date
# id: date
# run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- uses: actions/checkout@v2
# id: checkout
# - name: Set output
# id: vars
# run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
# - name: Check output
# env:
# RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
# run: |
# echo $RELEASE_VERSION
# echo ${{ steps.vars.outputs.tag }}
#
# run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
# git fetch --tags --force # Retrieve annotated tags. THIS TRICK REALLY HELPS
# echo ::set-output name=subject::$(git for-each-ref $GITHUB_REF --format='%(contents:subject)')
# # …
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Installing vcpkg
run: |
git clone --depth 1 https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg.exe integrate install
.\vcpkg.exe install openssl:x64-windows-static
.\vcpkg.exe install openssl-windows:x64-windows-static
set OPENSSL_ROOT_DIR="./installed/x64-windows-static"
# - name: Configure CMake Static Library
# # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
# run: cmake -B ${{github.workspace}}/static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=ON
# - name: Build Static Library
# # Build your program with the given configuration
# run:
# cmake --build ${{github.workspace}}/static --config ${{env.BUILD_TYPE}} --target ${{env.OUT_PATH}}
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
#-DCMAKE_TOOLCHAIN_FILE=D:/a/live555/live555/vcpkg/scripts/buildsystems/vcpkg.cmake
#-DOPENSSL_ROOT_DIR="D:/vcpkg/installed/x64-windows"
run:
#cmake -B ${{github.workspace}}/windows -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=OFF -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake"
cmake -B ${{github.workspace}}/windows -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_PREFIX_PATH="./vcpkg/installed/x64-windows-static" -DOPENSSL_ROOT_DIR="./vcpkg/installed/x64-windows-static" -DVCPKG_TARGET_TRIPLET=x64-windows-static
# cmake -B ${{github.workspace}}/windows -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=OFF -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake"
- name: Build
# Build your program with the given configuration
run:
cmake --build ${{github.workspace}}/windows --config ${{env.BUILD_TYPE}} --target ${{env.OUT_PATH}} -j20
# - name: create-archive
# id: create_archive
# run:
# powershell Compress-7Zip ${{env.OUT_PATH}} -ArchiveFileName ${{env.ARCHIVE_NAME}}_win64.zip -Format Zip
# - name: create-checksum
# id: create-checksum
# run: |
# sha256sum "$ARCHIVE_NAME"_win64.zip > checksum_shared.txt
# echo "::set-output name=checksum::$(cut -d ' ' -f 1 checksum_win64.txt)"
# - name: create-release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token, https://github.com/settings/tokens
# with:
# tag_name: ${{ github.ref }}_${{ steps.date.outputs.date }}
# release_name: Release ${{ github.ref }} ${{ steps.date.outputs.date }}
# draft: false
# prerelease: false
# - name: upload-archive-shared
# id: upload-release-asset_shared
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token, https://github.com/settings/tokens
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ${{ env.ARCHIVE_NAME }}_win64.zip
# asset_name: ${{ env.ARCHIVE_NAME }}_win64.zip
# asset_content_type: application/gzip
# - name: Package
# run: .\package.ps1
# - name: Create Release
# id: create_release
# uses: actions/create-release@latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: ${{ github.ref }}
build_windows_x64_dll:
name: Windows Build X64 Dynamic Link Library
runs-on: windows-latest
strategy:
matrix:
kind: [x64]
steps:
# - name: Install 7Zip PowerShell Module
# shell: powershell
# run: Install-Module 7Zip4PowerShell -Force
# - name: Get current date
# id: date
# run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- uses: actions/checkout@v2
# id: checkout
# - name: Set output
# id: vars
# run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
# - name: Check output
# env:
# RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
# run: |
# echo $RELEASE_VERSION
# echo ${{ steps.vars.outputs.tag }}
#
# run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
# git fetch --tags --force # Retrieve annotated tags. THIS TRICK REALLY HELPS
# echo ::set-output name=subject::$(git for-each-ref $GITHUB_REF --format='%(contents:subject)')
# # …
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Installing vcpkg
run: |
git clone --depth 1 https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg.exe integrate install
.\vcpkg.exe install openssl:x64-windows
.\vcpkg.exe install openssl-windows:x64-windows
set OPENSSL_ROOT_DIR="./installed/x64-windows"
# - name: Configure CMake Static Library
# # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
# run: cmake -B ${{github.workspace}}/static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=ON
# - name: Build Static Library
# # Build your program with the given configuration
# run:
# cmake --build ${{github.workspace}}/static --config ${{env.BUILD_TYPE}} --target ${{env.OUT_PATH}}
- name: Configure CMake Dynamic Library
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
#-DCMAKE_TOOLCHAIN_FILE=D:/a/live555/live555/vcpkg/scripts/buildsystems/vcpkg.cmake
#-DOPENSSL_ROOT_DIR="D:/vcpkg/installed/x64-windows"
run:
#cmake -B ${{github.workspace}}/windows -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=OFF -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake"
#cmake -B ${{github.workspace}}/windows -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_PREFIX_PATH="./vcpkg/installed/x64-windows" -DOPENSSL_ROOT_DIR="./vcpkg/installed/x64-windows" -DVCPKG_TARGET_TRIPLET=x64-windows
cmake -B ${{github.workspace}}/windows -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=OFF -DLIVE555_MONOLITH_BUILD=ON -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_PREFIX_PATH="./vcpkg/installed/x64-windows" -DOPENSSL_ROOT_DIR="./vcpkg/installed/x64-windows" -DVCPKG_TARGET_TRIPLET=x64-windows
#cmake -B ${{github.workspace}}/windows -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=OFF -DLIVE555_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake"
- name: Build
# Build your program with the given configuration
run:
cmake --build ${{github.workspace}}/windows --config ${{env.BUILD_TYPE}} --target ${{env.OUT_PATH}} -j20
# - name: create-archive
# id: create_archive
# run:
# powershell Compress-7Zip ${{env.OUT_PATH}} -ArchiveFileName ${{env.ARCHIVE_NAME}}_win64.zip -Format Zip
# - name: create-checksum
# id: create-checksum
# run: |
# sha256sum "$ARCHIVE_NAME"_win64.zip > checksum_shared.txt
# echo "::set-output name=checksum::$(cut -d ' ' -f 1 checksum_win64.txt)"
# - name: create-release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token, https://github.com/settings/tokens
# with:
# tag_name: ${{ github.ref }}_${{ steps.date.outputs.date }}
# release_name: Release ${{ github.ref }} ${{ steps.date.outputs.date }}
# draft: false
# prerelease: false
# - name: upload-archive-shared
# id: upload-release-asset_shared
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token, https://github.com/settings/tokens
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ${{ env.ARCHIVE_NAME }}_win64.zip
# asset_name: ${{ env.ARCHIVE_NAME }}_win64.zip
# asset_content_type: application/gzip
# - name: Package
# run: .\package.ps1
# - name: Create Release
# id: create_release
# uses: actions/create-release@latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: ${{ github.ref }}