-
Notifications
You must be signed in to change notification settings - Fork 6
371 lines (333 loc) · 16.3 KB
/
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
364
365
366
367
368
369
370
371
name: Release
on:
push:
# refs/remotes/origin/master
# branches: [ master ]
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
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.13'
# ARCHIVE_NAME: ${{ github.event.repository.name }}-${{env.CHECKOUT_REF}}
ARCHIVE_NAME: ${{ github.event.repository.name }}
#https://www.sysnet.pe.kr/2/0/12542
jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{env.BUILD_TYPE}} ${{ github.ref }}
body: |
Automated Release by GitHub Action CI
draft: false
prerelease: false
build_linux_static:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
name: Ubuntu Static Build
needs: create_release
# strategy:
# matrix:
# kind: [x86, x64]
runs-on: ubuntu-latest
steps:
- 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 }}
- 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}} -j20
- name: Test Static
working-directory: ${{github.workspace}}/static
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run:
ctest -C ${{env.BUILD_TYPE}}
- name: create-archive-static
id: create_archive_static
run:
tar -czf ${{env.ARCHIVE_NAME}}_static.tar.gz ${{env.OUT_PATH}}
- name: create-checksum
id: create-checksum
run: |
sha256sum "$ARCHIVE_NAME"_static.tar.gz > checksum_static.txt
echo "checksum=$(cut -d ' ' -f 1 checksum_static.txt)" >> $GITHUB_OUTPUT
# - 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 }}
# release_name: Release ${{ github.ref }}
# draft: false
# prerelease: false
- name: upload-archive-static
id: upload-release-asset_static
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: ${{ needs.create_release.outputs.upload_url }}
asset_path: ${{ env.ARCHIVE_NAME }}_static.tar.gz
asset_name: ${{ env.ARCHIVE_NAME }}_static.tar.gz
asset_content_type: application/gzip
- name: upload-checksum-static
id: upload-checksum_static
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: ${{ needs.create_release.outputs.upload_url }}
asset_path: checksum_static.txt
asset_name: checksum_static.txt
asset_content_type: text/plain
build_linux_shared:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
name: Ubuntu Shared Build
needs: create_release
# strategy:
# matrix:
# kind: [x86, x64]
runs-on: ubuntu-latest
steps:
- 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 }}
- name: Configure CMake Shared 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}}/shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=ON -DLIVE555_BUILD_SHARED_LIBS=ON
- name: Build Shared Library
# Build your program with the given configuration
run:
cmake --build ${{github.workspace}}/shared --config ${{env.BUILD_TYPE}} --target ${{env.OUT_PATH}} -j20
- name: Test Shared
working-directory: ${{github.workspace}}/shared
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run:
ctest -C ${{env.BUILD_TYPE}}
- name: create-archive
id: create_archive
run:
tar -czf ${{env.ARCHIVE_NAME}}_shared.tar.gz ${{env.OUT_PATH}}
- name: create-checksum
id: create-checksum
run: |
sha256sum "$ARCHIVE_NAME"_shared.tar.gz > checksum_shared.txt
echo "::set-output name=checksum::$(cut -d ' ' -f 1 checksum_shared.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 }}
# release_name: Release ${{ github.ref }}
# 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: ${{ needs.create_release.outputs.upload_url }}
asset_path: ${{ env.ARCHIVE_NAME }}_shared.tar.gz
asset_name: ${{ env.ARCHIVE_NAME }}_shared.tar.gz
asset_content_type: application/gzip
- name: upload-checksum-shared
id: upload-checksum_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: ${{ needs.create_release.outputs.upload_url }}
asset_path: checksum_shared.txt
asset_name: checksum_shared.txt
asset_content_type: text/plain
build_windows_static:
name: Windows Static Build
needs: create_release
# strategy:
# matrix:
# kind: [x86, x64]
runs-on: windows-latest
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 }}"
- 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
set OPENSSL_ROOT_DIR="./installed/x64-windows"
- 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_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 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=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-static
cmake -B ${{github.workspace}}/windows -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -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}}_static_win64.zip -Format Zip
# - 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: ${{ needs.create_release.outputs.upload_url }}
asset_path: ${{ env.ARCHIVE_NAME }}_static_win64.zip
asset_name: ${{ env.ARCHIVE_NAME }}_static_win64.zip
asset_content_type: application/gzip
build_windows_shared:
name: Windows Shared Build
needs: create_release
# strategy:
# matrix:
# kind: [x86, x64]
runs-on: windows-latest
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 }}"
- 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
set OPENSSL_ROOT_DIR="./installed/x64-windows"
- 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_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 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.OUT_PATH}} -DLIVE555_ENABLE_OPENSSL=ON -DLIVE555_BUILD_EXAMPLES=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-static
cmake -B ${{github.workspace}}/windows -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -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"
- 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}}_shared_win64.zip -Format Zip
# - 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: ${{ needs.create_release.outputs.upload_url }}
asset_path: ${{ env.ARCHIVE_NAME }}_shared_win64.zip
asset_name: ${{ env.ARCHIVE_NAME }}_shared_win64.zip
asset_content_type: application/gzip