-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
387 lines (217 loc) · 13 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
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
version: '{build}'
branches:
only:
- master
image:
- macos-sonoma
- Visual Studio 2022
environment:
BUILD_OPTIONS: -DENABLE_DECKLINK=OFF -DENABLE_SYPHON=OFF -DENABLE_LIBFDK=OFF -DENABLE_NVENC=OFF -DENABLE_QSV11=OFF -DENABLE_VST=OFF -DENABLE_WEBRTC=OFF -DENABLE_WEBSOCKET=OFF -DENABLE_OSS=OFF -DENABLE_SNDIO=OFF -DENABLE_VLC=OFF -DENABLE_VIRTUALCAM=OFF -DENABLE_TEST_INPUT=OFF -DENABLE_AJA=OFF -DENABLE_SCRIPTING=OFF -DENABLE_SCRIPTING_LUA=OFF -DENABLE_UI=OFF
BUGSPLAT_USERNAME: [email protected]
BUGSPLAT_PASSWORD:
secure: VuWpM4WRVv4EBc27bOHR4Q==
GS_ACCESS_KEY_ID: GOOG1EUHPDNLJSIO6BYONVXJ5EVRHVGWLZKM6W2JG3RLFC2HU5JRYZQWQ7IQP
GS_SECRET_ACCESS_KEY:
secure: JNxZoufjrYu4BTO5KNsm9mkiPmxUlIBfeABlnt9OAdh16PrY0xLQLnWdY+PcULyB
matrix:
fast_finish: true
for:
-
matrix:
only:
- image: macos-sonoma
configuration: RelWithDebInfo
clone_folder: ~/src/obs-streamelements-core
environment:
CHECKOUT: 31.0.1
install:
- sh: >-
git clone --recursive https://github.com/obsproject/obs-studio.git ~/src/obs-studio
if [ $? -ne 0 ]; then exit 1; fi
cd ~/src/obs-studio
git checkout $CHECKOUT
if [ $? -ne 0 ]; then exit 1; fi
cp -R ~/src/obs-streamelements-core ~/src/obs-studio/plugins/obs-streamelements-core
if [ $? -ne 0 ]; then exit 1; fi
echo "add_obs_plugin(obs-streamelements-core)" >>~/src/obs-studio/plugins/CMakeLists.txt
if [ $? -ne 0 ]; then exit 1; fi
cd /tmp
#curl -sL -O "https://app.bugsplat.com/download/symbol-upload-macos"
curl -sL -O "https://app.bugsplat.com/download/symbol-upload-macos-intel"
curl -sL -O "https://github.com/BugSplat-Git/symbol-upload/releases/download/v10.1.7/symbol-upload-macos-intel"
if [ $? -ne 0 ]; then exit 1; fi
cp symbol-upload-macos-intel symbol-upload-macos
if [ $? -ne 0 ]; then exit 1; fi
chmod +x symbol-upload-macos
if [ $? -ne 0 ]; then exit 1; fi
build_script:
- sh: >-
# Create plugin version integer representation
cd ~/src/obs-studio
export STREAMELEMENTS_PLUGIN_VERSION="$(date "+%Y%m%d")$(printf "%06d" $APPVEYOR_BUILD_NUMBER)"
echo "#define STREAMELEMENTS_PLUGIN_VERSION $STREAMELEMENTS_PLUGIN_VERSION" >~/src/obs-studio/plugins/obs-streamelements-core/streamelements/Version.generated.hpp
if [ $? -ne 0 ]; then exit 1; fi
# Extract version components and format full version string
export STREAMELEMENTS_PLUGIN_VERSION_MAJOR=$(echo $STREAMELEMENTS_PLUGIN_VERSION | awk '{ str = substr($1, 3, 2); sub(/^0+/, "", str); print str }')
if [ $? -ne 0 ]; then exit 1; fi
export STREAMELEMENTS_PLUGIN_VERSION_MINOR=$(echo $STREAMELEMENTS_PLUGIN_VERSION | awk '{ str = substr($1, 5, 2); sub(/^0+/, "", str); print str }')
if [ $? -ne 0 ]; then exit 1; fi
export STREAMELEMENTS_PLUGIN_VERSION_PATCH=$(echo $STREAMELEMENTS_PLUGIN_VERSION | awk '{ str = substr($1, 7, 2); sub(/^0+/, "", str); print str }')
if [ $? -ne 0 ]; then exit 1; fi
export STREAMELEMENTS_PLUGIN_VERSION_BUILD=$(echo $STREAMELEMENTS_PLUGIN_VERSION | awk '{ str = substr($1, 9, 6); sub(/^0+/, "", str); print str }')
if [ $? -ne 0 ]; then exit 1; fi
export STREAMELEMENTS_PLUGIN_VERSION_FULL=$STREAMELEMENTS_PLUGIN_VERSION_MAJOR.$STREAMELEMENTS_PLUGIN_VERSION_MINOR.$STREAMELEMENTS_PLUGIN_VERSION_PATCH.$STREAMELEMENTS_PLUGIN_VERSION_BUILD
# Prepare bugsplat Framework: we store it as a ZIP since on Windows the resulting paths of the unpacked archive are just way too long
cd ~/src/obs-studio/plugins/obs-streamelements-core/deps
unzip BugSplat.xcframework.zip
# Build ARM64 (Apple Silicon)
cd ~/src/obs-studio
cmake --preset=macos -DCMAKE_OSX_ARCHITECTURES=arm64 -Bbuild_macos_arm64 $BUILD_OPTIONS
if [ $? -ne 0 ]; then exit 1; fi
cd ~/src/obs-studio/build_macos_arm64
# xcodebuild -configuration RelWithDebInfo -scheme obs-studio -destination "generic/platform=macOS,name=Any Mac"
xcodebuild -configuration RelWithDebInfo -scheme obs-streamelements-core -destination "generic/platform=macOS,name=Any Mac"
if [ $? -ne 0 ]; then exit 1; fi
cd ~/src/obs-studio/build_macos_arm64/plugins/obs-streamelements-core/RelWithDebInfo
xcrun dsymutil obs-streamelements-core.plugin/Contents/MacOS/obs-streamelements-core -o obs-streamelements-core.dSYM
if [ $? -ne 0 ]; then exit 1; fi
if [ -z "$APPVEYOR_PULL_REQUEST_HEAD_COMMIT" ]; then /tmp/symbol-upload-macos -a "obs-streamelements-core-macos" -b "OBS_Live" -u "$BUGSPLAT_USERNAME" -p "$BUGSPLAT_PASSWORD" -f "obs-streamelements-core.dSYM" -d . -v "$STREAMELEMENTS_PLUGIN_VERSION_FULL"; fi
if [ $? -ne 0 ]; then exit 1; fi
7z a $APPVEYOR_BUILD_FOLDER/build_arm64.zip .
if [ $? -ne 0 ]; then exit 1; fi
# Build x86_64 (Intel)
cd ~/src/obs-studio
cmake --preset=macos -DCMAKE_OSX_ARCHITECTURES=x86_64 -Bbuild_macos_x86_64 $BUILD_OPTIONS
if [ $? -ne 0 ]; then exit 1; fi
cd ~/src/obs-studio/build_macos_x86_64
# xcodebuild -configuration RelWithDebInfo -scheme obs-studio -destination "generic/platform=macOS,name=Any Mac"
xcodebuild -configuration RelWithDebInfo -scheme obs-streamelements-core -destination "generic/platform=macOS,name=Any Mac"
if [ $? -ne 0 ]; then exit 1; fi
cd ~/src/obs-studio/build_macos_x86_64/plugins/obs-streamelements-core/RelWithDebInfo
xcrun dsymutil obs-streamelements-core.plugin/Contents/MacOS/obs-streamelements-core -o obs-streamelements-core.dSYM
if [ $? -ne 0 ]; then exit 1; fi
if [ -z "$APPVEYOR_PULL_REQUEST_HEAD_COMMIT" ]; then /tmp/symbol-upload-macos -a "obs-streamelements-core-macos" -b "OBS_Live" -u "$BUGSPLAT_USERNAME" -p "$BUGSPLAT_PASSWORD" -f "obs-streamelements-core.dSYM" -d . -v "$STREAMELEMENTS_PLUGIN_VERSION_FULL"; fi
if [ $? -ne 0 ]; then exit 1; fi
7z a $APPVEYOR_BUILD_FOLDER/build_x86_64.zip .
if [ $? -ne 0 ]; then exit 1; fi
# Copy version file
cp ~/src/obs-studio/plugins/obs-streamelements-core/streamelements/Version.generated.hpp $APPVEYOR_BUILD_FOLDER/Version.generated.hpp
if [ $? -ne 0 ]; then exit 1; fi
- sh: >-
echo if this is a pull request build, complete build. otherwise, upload artifacts to google storage
if [ "$APPVEYOR_PULL_REQUEST_HEAD_COMMIT" != "" ]; then exit 0; fi
echo install gsutil
curl https://sdk.cloud.google.com > /tmp/install-google-cloud-sdk.sh
bash /tmp/install-google-cloud-sdk.sh --disable-prompts
echo prepare a .boto file for gsutil
echo [Credentials] >~/.boto
echo gs_access_key_id = $GS_ACCESS_KEY_ID >>~/.boto
echo gs_secret_access_key = $GS_SECRET_ACCESS_KEY >>~/.boto
echo upload artifacts to google storage
cd $APPVEYOR_BUILD_FOLDER
~/google-cloud-sdk/bin/gsutil cp "$APPVEYOR_BUILD_FOLDER/build_x86_64.zip" "gs://se-obs-builds/obs-streamelements-core/latest/macos/build_x86_64.zip"
~/google-cloud-sdk/bin/gsutil cp "$APPVEYOR_BUILD_FOLDER/build_arm64.zip" "gs://se-obs-builds/obs-streamelements-core/latest/macos/build_arm64.zip"
~/google-cloud-sdk/bin/gsutil cp "$APPVEYOR_BUILD_FOLDER/Version.generated.hpp" "gs://se-obs-builds/obs-streamelements-core/latest/macos/Version.generated.hpp"
test: off
artifacts:
- path: build_*.zip
name: build
- path: Version.generated.hpp
name: version.generated.hpp
#deploy:
#- provider: S3
# access_key_id: AKIAJESHQW2DGHPN57KQ
# secret_access_key:
# secure: lhOyqT4/E0Oqv8BOQR81rx/SweOIbDELTYW7iJTqRz5shmkZ8eXMCgFzcIuXyvpB
# bucket: obs-builds
# folder: obs-streamelements-core/latest/macos
# artifact: build,version.generated.hpp
# max_error_retry: 5
# on:
# branch: master
on_success:
- cmd: echo.All done.
-
matrix:
only:
- image: Visual Studio 2022
configuration: RelWithDebInfo
clone_folder: c:\local\source
init:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
environment:
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
CHECKOUT: 31.0.1
install:
- cmd: >-
if not exist c:\local md c:\local
git clone --recursive https://github.com/obsproject/obs-studio.git c:\local\obs-studio
cd /d c:\local\obs-studio
git checkout %CHECKOUT%
cd /d c:\local\obs-studio\plugins
md obs-streamelements-core
xcopy c:\local\source\*.* c:\local\obs-studio\plugins\obs-streamelements-core /S /E /I /Y
cd /d c:\local\obs-studio
echo add_obs_plugin(obs-streamelements-core) >c:\local\obs-studio\plugins\CMakeLists.txt
cache:
- c:\local\obs-build-dependencies
build_script:
- cmd: >-
echo ("#define STREAMELEMENTS_PLUGIN_VERSION " + (Get-Date).ToUniversalTime().ToString("yyyyMMdd") + "${Env:APPVEYOR_BUILD_NUMBER}".PadLeft(6, '0')) >c:\local\generate_version.ps1
echo ("set STREAMELEMENTS_PLUGIN_VERSION=" + (Get-Date).ToUniversalTime().ToString("y.M.d") + "." + "${Env:APPVEYOR_BUILD_NUMBER}".PadLeft(1, '0')) >c:\local\generate_version_cmd.ps1
powershell -File c:\local\generate_version.ps1 >c:\local\obs-studio\plugins\obs-streamelements-core\streamelements\Version.generated.hpp
powershell -File c:\local\generate_version_cmd.ps1 >c:\local\generate_version_cmd.bat
c:\local\generate_version_cmd.bat
echo %STREAMELEMENTS_PLUGIN_VERSION%
cd /d c:\local\obs-studio
echo Setting up CMAKE build projects
cmake --preset=windows-x64 %BUILD_OPTIONS%
echo Building 64bit ...
cd /d c:\local\obs-studio\build_x64
msbuild obs-studio.sln -p:Configuration=RelWithDebInfo
cd /d c:\local\obs-studio
- cmd: >-
echo.Upload PDBs to BugSplat in case this is a commit to master branch (64bit. QT6).
if "%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%"=="" c:\local\obs-studio\plugins\obs-streamelements-core\deps\BugSplat\Tools\symbol-upload-windows.exe -u "%BUGSPLAT_USERNAME%" -p "%BUGSPLAT_PASSWORD%" -a obs-streamelements-core -v "%STREAMELEMENTS_PLUGIN_VERSION%" -b OBS_Live -d "c:\local\obs-studio\build_x64\rundir\RelWithDebInfo\obs-plugins\64bit" -f obs-streamelements*.pdb
if "%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%"=="" c:\local\obs-studio\plugins\obs-streamelements-core\deps\BugSplat\Tools\symbol-upload-windows.exe -u "%BUGSPLAT_USERNAME%" -p "%BUGSPLAT_PASSWORD%" -a obs-streamelements-core -v "%STREAMELEMENTS_PLUGIN_VERSION%" -b OBS_Live -d "c:\local\obs-studio\build_x64\rundir\RelWithDebInfo\obs-plugins\64bit" -f obs-streamelements*.dll
echo.Pack 64bit, QT6 artifacts...
cd /d c:\local\obs-studio\build_x64\rundir\RelWithDebInfo
7z a c:\local\source\build64_qt6.zip .
echo.Update generated version header...
copy /Y c:\local\obs-studio\plugins\obs-streamelements-core\streamelements\Version.generated.hpp c:\local\source\streamelements\Version.generated.hpp
cd /d c:\local\obs-studio
- cmd: >-
echo if this is a pull request build, complete build. otherwise, upload artifacts to google storage
if not "%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%"=="" exit 0
echo install gsutil
cd /d c:\local\source
curl https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe --output GoogleCloudSDKInstaller.exe
start /wait GoogleCloudSDKInstaller.exe /S
refreshenv
echo prepare a .boto file for gsutil
echo.[Credentials] >%USERPROFILE%\.boto
echo.gs_access_key_id = %GS_ACCESS_KEY_ID% >>%USERPROFILE%\.boto
echo.gs_secret_access_key = %GS_SECRET_ACCESS_KEY% >>%USERPROFILE%\.boto
echo upload artifacts to google storage
cd /d c:\local\source
gsutil cp "build64_qt6.zip" "gs://se-obs-builds/obs-streamelements-core/latest/windows/build64_qt6.zip"
gsutil cp "streamelements\Version.generated.hpp" "gs://se-obs-builds/obs-streamelements-core/latest/windows/Version.generated.hpp"
test: off
artifacts:
- path: build64_qt6.zip
name: build64
- path: streamelements\Version.generated.hpp
name: version.generated.hpp
#deploy:
#- provider: S3
# access_key_id: AKIAJESHQW2DGHPN57KQ
# secret_access_key:
# secure: lhOyqT4/E0Oqv8BOQR81rx/SweOIbDELTYW7iJTqRz5shmkZ8eXMCgFzcIuXyvpB
# bucket: obs-builds
# folder: obs-streamelements-core/latest/windows
# artifact: build64,version.generated.hpp
# max_error_retry: 5
# on:
# branch: master
on_success:
- cmd: echo.All done.