This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.gitlab-ci.yml
544 lines (478 loc) · 21.2 KB
/
.gitlab-ci.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
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
variables:
GIT_SUBMODULE_STRATEGY: recursive
TF_SETTINGS_PROJECT_PATH: $CI_PROJECT_DIR/TF_Settings_Unity
TF_PROJECT_PATH: $CI_PROJECT_DIR/TF_Application
UNITY_HUB: "C:/Program Files/Unity Hub/Unity Hub.exe"
TF_SETTINGS_PATH: $CI_PROJECT_DIR/TF_Settings_Unity/Assets
BS_EXTENSION_NAME: ultouchfree
TOUCHFREE_VERSION: '2.6.0'
TF_TOOLING_API_VERSION: '1.4.0'
TARGET_TRACKING_JOBID_WIN: 859924
stages:
- build
- test
- package
- installer
.Always_Build:
stage: build
when: always
timeout: 10m
.Always_Test:
stage: test
when: always
timeout: 10m
# Build Stage
## Service Build jobs
TF_Service::Wrapper::build:
extends: .Always_Build
tags:
- docker-windows
image: registry.ultrahaptics.com/ooh/infrastructure/windows-dotnet-toolchain:latest
script:
- if ($CI_COMMIT_REF_NAME -Match 'release/.*') {
$TOUCHFREE_SUFFIX = ''
} else {
$TOUCHFREE_SUFFIX = 'dev+' + ${env:CI_COMMIT_SHORT_SHA}
}
- dotnet publish -p:VersionPrefix=$TOUCHFREE_VERSION -p:VersionSuffix=$TOUCHFREE_SUFFIX -c Release -r win-x64 "$CI_PROJECT_DIR/TF_Service_Utilities/ServiceWrapper/ServiceWrapper/ServiceWrapper.csproj"
# Move the built wrapper to the root directory
- mkdir ./Service_Wrapper_Build
- cp -R $CI_PROJECT_DIR/TF_Service_Utilities/ServiceWrapper/ServiceWrapper/bin/Release/net6.0/win-x64/publish/* ./Service_Wrapper_Build
# Sign the executable with the UltraLeap certificate
- azuresigntool sign -du "https://www.ultraleap.com" -kvu "https://$env:SIGN_VAULT_ID.vault.azure.net/" -kvi "$env:SIGN_VAULT_APPLICATION_ID" -kvs "$env:SIGN_VAULT_APPLICATION_CLIENT_CODE" -kvc "ultraleap-ltd" -kvt "$env:SIGN_VAULT_TENANT_ID" -tr http://timestamp.digicert.com -v "$CI_PROJECT_DIR/Service_Wrapper_Build/ServiceWrapper.exe"
artifacts:
name: "TouchFree_Service_Wrapper"
paths:
- ./Service_Wrapper_Build/**
expire_in: 2 weeks
when: always
.Base_TF_Service_dotNet:
extends: .Always_Build
variables:
DEFAULT_RELEASE_SUFFIX: ""
BRIGHTSIGN: ""
ARTIFACT_NAME: ""
SIGN_BINARY: ""
RUNTIME: ""
INCLUDE_SERVICE_LICENSES: ""
tags:
- docker-windows
image: registry.ultrahaptics.com/ooh/infrastructure/windows-dotnet-toolchain:latest
script:
- if ($CI_COMMIT_REF_NAME -Match 'release/.*') {
$TOUCHFREE_SUFFIX = $DEFAULT_RELEASE_SUFFIX
} else {
$TOUCHFREE_SUFFIX = 'dev+' + ${env:CI_COMMIT_SHORT_SHA}
}
- dotnet publish -p:BRIGHTSIGN=$BRIGHTSIGN -p:VersionPrefix=$TOUCHFREE_VERSION -p:VersionSuffix=$TOUCHFREE_SUFFIX -c Release -r $RUNTIME "$CI_PROJECT_DIR/TF_Service_dotNet/TouchFree/TouchFreeLib.csproj"
- dotnet publish -p:BRIGHTSIGN=$BRIGHTSIGN -p:VersionPrefix=$TOUCHFREE_VERSION -p:VersionSuffix=$TOUCHFREE_SUFFIX -c Release -r $RUNTIME "$CI_PROJECT_DIR/TF_Service_dotNet/TouchFree_Service/TouchFree_Service.csproj"
# Move the built executable to the root directory
- mkdir ./Service_dotNet_Build
- cp -R "$CI_PROJECT_DIR/TF_Service_dotNet/TouchFree_Service/bin/Release/net6.0/${RUNTIME}/publish/*" ./Service_dotNet_Build
- rm ./Service_dotNet_Build/interaction-tuning.json
- if ($INCLUDE_SERVICE_LICENSES -Match 'true') {
mkdir ./Service_dotNet_Build/ThirdParty;
cp "$CI_PROJECT_DIR/Third_Party_Licenses/Service/*" ./Service_dotNet_Build/ThirdParty;
}
# Sign the executable with the UltraLeap certificate
- if ($SIGN_BINARY -Match 'true') {
azuresigntool sign -du "https://www.ultraleap.com" -kvu "https://$env:SIGN_VAULT_ID.vault.azure.net/" -kvi "$env:SIGN_VAULT_APPLICATION_ID" -kvs "$env:SIGN_VAULT_APPLICATION_CLIENT_CODE" -kvc "ultraleap-ltd" -kvt "$env:SIGN_VAULT_TENANT_ID" -tr http://timestamp.digicert.com -v "$CI_PROJECT_DIR/Service_dotNet_Build/TouchFree_Service.exe"
}
artifacts:
name: $ARTIFACT_NAME
paths:
- ./Service_dotNet_Build/**
expire_in: 2 weeks
when: always
TF_Service::dotNet::Windows::build:
extends: .Base_TF_Service_dotNet
variables:
ARTIFACT_NAME: "TouchFree_Service_dotNet"
SIGN_BINARY: "true"
RUNTIME: "win-x64"
TF_Service::dotNet::ARMLinux::build:
extends: .Base_TF_Service_dotNet
variables:
DEFAULT_RELEASE_SUFFIX: "beta"
BRIGHTSIGN: "true"
ARTIFACT_NAME: "TouchFree_Service_dotNet_ARMLinux"
RUNTIME: "linux-arm64"
INCLUDE_SERVICE_LICENSES: "true"
TF_Service::dotNet::x64Linux::build:
extends: .Base_TF_Service_dotNet
variables:
DEFAULT_RELEASE_SUFFIX: "beta"
BRIGHTSIGN: "true"
ARTIFACT_NAME: "TouchFree_Service_dotNet_x64Linux"
RUNTIME: "linux-x64"
INCLUDE_SERVICE_LICENSES: "true"
Tracking::ARMLinux::download_package:
extends: .Always_Build
tags:
- unity
- win10
script:
- cd ./Scripts/BrightSign_Scripts
- python ./Download_Tracking.py -t ${env:GITLAB_TOKEN}
after_script:
- if (Test-Path "C:/build_machine_info.txt") { Get-Content "C:/build_machine_info.txt" }
artifacts:
paths:
- ./Scripts/BrightSign_Scripts/Build_ARM64_Linux_release/*.tar.gz
expire_in: 1 hour
TF_Service::Tray::build:
extends: .Always_Build
tags:
- unity
- win10
script:
- MSBuild.exe $CI_PROJECT_DIR/TF_Service_Utilities/ServiceUITray/ServiceUITray.sln /p:Configuration=Release /p:Platform=x64
# Move the built tray app to the root directory
- mkdir ./Service_Tray_Build
- cp -R $CI_PROJECT_DIR/TF_Service_Utilities/ServiceUITray/ServiceUITray/bin/x64/Release/* ./Service_Tray_Build
# Sign the executable with the UltraLeap certificate
- $cert=Get-ChildItem -Path Cert:\LocalMachine\My -CodeSigningCert
- Set-AuthenticodeSignature -FilePath $CI_PROJECT_DIR/Service_Tray_Build/ServiceUITray.exe -TimestampServer 'http://timestamp.comodoca.com/authenticode' -Certificate $cert
artifacts:
name: "TouchFree_Service_Tray"
paths:
- ./Service_Tray_Build/**
expire_in: 2 weeks
when: always
## Settings Build jobs
TF_Settings::Windows::build:
extends: .Always_Build
tags:
- unity
- win10
script:
# Get Unity version and changeset from the project.
- $line = Get-Content $TF_SETTINGS_PROJECT_PATH/ProjectSettings/ProjectVersion.txt | Select -Index 1
- $UNITY_VERSION = $line -Split " " | Select -Index 1
- $UNITY_CHANGESET = $line -Match '\((.+)\)' | ForEach-Object { $Matches[1] }
# Check whether the required Unity version is installed. If not, install it.
- Start-Process -Wait -RedirectStandardOutput "tmp.txt" -FilePath "$UNITY_HUB" -ArgumentList "-- --headless editors --installed"
- Get-Content "tmp.txt"
- Start-Process -Wait -RedirectStandardOutput "tmp.txt" -FilePath "$UNITY_HUB" -ArgumentList "-- --headless install-path --set C:/Unity"
- Get-Content "tmp.txt"
- if (-not (Test-Path "C:/Unity/$UNITY_VERSION")) { Start-Process -Wait -RedirectStandardOutput "tmp.txt" -FilePath "$UNITY_HUB" -ArgumentList "-- --headless install --version $UNITY_VERSION --changeset $UNITY_CHANGESET" }
- Get-Content "tmp.txt"
- $UNITY_EXE = "C:/Unity/$UNITY_VERSION/Editor/Unity.exe"
- echo "$UNITY_EXE"
# Update Version.txt with latest information before packaging
- python ./Scripts/UpdateVersionFile.py --path ${env:TF_SETTINGS_PATH}/Version.txt --swVer ${env:TOUCHFREE_VERSION} --apiVer ${env:TF_TOOLING_API_VERSION} --ref ${env:CI_COMMIT_SHORT_SHA} --branchName "$CI_COMMIT_REF_NAME"
- Get-Content ${env:TF_SETTINGS_PATH}/Version.txt
- mkdir $CI_PROJECT_DIR/UIBuild
- cp ${env:TF_SETTINGS_PATH}/Version.txt $CI_PROJECT_DIR/UIBuild
# Update ProjectSettings file with correct version & build settings
- cd ./Scripts
- python ./UpdateUnityProjVer.py --path ../TF_Settings_Unity/ProjectSettings/ProjectSettings.asset --ver ${env:TOUCHFREE_VERSION}
- "& ./build_settingsUI.bat $UNITY_EXE"
# Sign the executable with the UltraLeap certificate
- $cert=Get-ChildItem -Path Cert:\LocalMachine\My -CodeSigningCert
- Set-AuthenticodeSignature -FilePath $CI_PROJECT_DIR/UIBuild/TouchFreeSettingsUI.exe -TimestampServer 'http://timestamp.comodoca.com/authenticode' -Certificate $cert
artifacts:
name: "TouchFree_Settings_${env:TOUCHFREE_VERSION}_${env:CI_COMMIT_SHORT_SHA}"
paths:
- UIBuild/**
- ./SettingsUI_build.log
expire_in: 2 weeks
when: always
TF_Settings::Web::build:
extends: .Always_Build
tags:
- docker-windows
image: registry.ultrahaptics.com/ooh/infrastructure/windows-touchfree-toolchain:latest
script:
- npm -v
- npm install -w TF_Settings_Web
- npm ls
- cd ./TF_Settings_Web
- npm run tauri build
# npm workspaces cause the Web Settings node modules to be installed in the root folder so need to copy the Web Settings' package.json up a level
# so it's at the same level as the node modules for license file generation
- cp ./package.json ../
- cd ../
# We don't want the touchfree module to appear in the licensing file
- Remove-Item -Force -Recurse .\node_modules\touchfree\
- npx [email protected] --input ./package.json --output ./TF_Settings_Web/dist/ThirdPartyLicenses.txt --eol lf --ci
# Check license generating happened
- if ((cat ./TF_Settings_Web/dist/ThirdPartyLicenses.txt | Select-String "react").Count -eq 0) {
exit 1
}
- azuresigntool sign -du "https://www.ultraleap.com" -kvu "https://$env:SIGN_VAULT_ID.vault.azure.net/" -kvi "$env:SIGN_VAULT_APPLICATION_ID" -kvs "$env:SIGN_VAULT_APPLICATION_CLIENT_CODE" -kvc "ultraleap-ltd" -kvt "$env:SIGN_VAULT_TENANT_ID" -tr http://timestamp.digicert.com -v "$CI_PROJECT_DIR/TF_Settings_Web/src-tauri/target/release/touchfree-settings-web.exe"
- mv $CI_PROJECT_DIR/TF_Settings_Web/src-tauri/target/release/*.exe $CI_PROJECT_DIR/TF_Settings_Web/
artifacts:
name: "TouchFree_Settings_Web_${env:TOUCHFREE_VERSION}_${env:CI_COMMIT_SHORT_SHA}"
paths:
- ./TF_Settings_Web/dist/*
- ./TF_Settings_Web/*.exe
expire_in: 2 weeks
when: always
## Overlay Build jobs
TouchFree::build:
extends: .Always_Build
tags:
- unity
- win10
script:
# Get Unity version and changeset from the project.
- $line = Get-Content $TF_PROJECT_PATH/ProjectSettings/ProjectVersion.txt | Select -Index 1
- $UNITY_VERSION = $line -Split " " | Select -Index 1
- $UNITY_CHANGESET = $line -Match '\((.+)\)' | ForEach-Object { $Matches[1] }
# Check whether the required Unity version is installed. If not, install it.
- Start-Process -Wait -RedirectStandardOutput "tmp.txt" -FilePath "$UNITY_HUB" -ArgumentList "-- --headless editors --installed"
- Get-Content "tmp.txt"
- Start-Process -Wait -RedirectStandardOutput "tmp.txt" -FilePath "$UNITY_HUB" -ArgumentList "-- --headless install-path --set C:/Unity"
- Get-Content "tmp.txt"
- if (-not (Test-Path "C:/Unity/$UNITY_VERSION")) { Start-Process -Wait -RedirectStandardOutput "tmp.txt" -FilePath "$UNITY_HUB" -ArgumentList "-- --headless install --version $UNITY_VERSION --changeset $UNITY_CHANGESET" }
- Get-Content "tmp.txt"
- $UNITY_EXE = "C:/Unity/$UNITY_VERSION/Editor/Unity.exe"
- echo "$UNITY_EXE"
# Update Version.txt with latest information before packaging
- python ./Scripts/UpdateVersionFile.py --path ${env:TF_PROJECT_PATH}/Assets/Version.txt --apiVer ${env:TF_TOOLING_API_VERSION} --swVer ${env:TOUCHFREE_VERSION} --ref ${env:CI_COMMIT_SHORT_SHA} --branchName "$CI_COMMIT_REF_NAME"
- Get-Content "${env:TF_PROJECT_PATH}/Assets/Version.txt"
# Copy Version.txt to build folder
- if (Test-Path -Path "./TouchFree_Build") {
Remove-Item -LiteralPath ./TouchFree_Build -Force -Recurse
Remove-Item -LiteralPath ./TouchFree_Build -Force -Recurse
}
- mkdir ./TouchFree_Build
- cp ${env:TF_PROJECT_PATH}/Assets/Version.txt ./TouchFree_Build
# Build TouchFree
- cd ./Scripts
- python ./UpdateUnityProjVer.py --path ../TF_Application/ProjectSettings/ProjectSettings.asset --ver ${env:TOUCHFREE_VERSION}
- "& ./build_touchfree.bat $UNITY_EXE"
# Sign the executable with the UltraLeap certificate
- $cert=Get-ChildItem -Path Cert:\LocalMachine\My -CodeSigningCert
- Set-AuthenticodeSignature -FilePath $CI_PROJECT_DIR/TouchFree_Build/TouchFree.exe -TimestampServer 'http://timestamp.comodoca.com/authenticode' -Certificate $cert
artifacts:
name: "TouchFree_Build_${env:CI_COMMIT_SHORT_SHA}"
paths:
- ./TouchFree_Build/*
- ./TouchFree_build.log
expire_in: 2 weeks
when: always
Tracking::download:
extends: .Always_Build
tags:
- unity
script:
- cd ./Scripts/
- python ./Download_Tracking.py -t ${env:GITLAB_TOKEN} -j ${TARGET_TRACKING_JOBID_WIN}
- mv ./Tracking_Build/Ultraleap_Tracking_Installer*win64.exe ./Tracking_Build/Tracking_for_TouchFree_${TOUCHFREE_VERSION}.exe
after_script:
- if (Test-Path "C:/build_machine_info.txt") { Get-Content "C:/build_machine_info.txt" }
artifacts:
paths:
- ./Scripts/Tracking_Build/Tracking_for_TouchFree_*.exe
expire_in: 1 hour
# Test Stage
TF_Service::dotNet::test:
extends: .Always_Test
tags:
- docker-windows
image: registry.ultrahaptics.com/ooh/infrastructure/windows-dotnet-toolchain:latest
script:
# Run unit tests
- dotnet test "$CI_PROJECT_DIR/TF_Service_dotNet/TouchFreeTests/TouchFreeTests.csproj" --results-directory $CI_PROJECT_DIR/TestResults --collect:"XPlat Code Coverage;Format=Cobertura" --logger:"junit;LogFilePath=$CI_PROJECT_DIR/TestResults/Test_Results.xml;MethodFormat=Class;FailureBodyFormat=Verbose"
- reportgenerator "-reports:$CI_PROJECT_DIR/TestResults/*/coverage.cobertura.xml" "-targetdir:TestReports"
artifacts:
when: always
name: "TestResults"
paths:
- $CI_PROJECT_DIR/TestResults/Test_Results.xml
- $CI_PROJECT_DIR/TestResults/*/coverage.cobertura.xml
- $CI_PROJECT_DIR/TestReports/
reports:
junit: $CI_PROJECT_DIR/TestResults/Test_Results.xml
coverage_report:
coverage_format: cobertura
path: $CI_PROJECT_DIR/TestResults/*/coverage.cobertura.xml
TF_Service::Integration::test:
extends: .Always_Test
dependencies:
- TF_Service::dotNet::Windows::build
needs: ["TF_Service::dotNet::Windows::build"]
tags:
- docker-windows
image: registry.ultrahaptics.com/ooh/infrastructure/windows-touchfree-toolchain:latest
script:
- cd ./Testing/ServiceSocketTests/
- npm install
- ./node_modules/.bin/gulp build_machine_run
artifacts:
name: test_results
paths:
- ./Testing/ServiceSocketTests/results/**
- ./Testing/ServiceSocketTests/PUT_TEST_BUILD_IN_HERE/**
reports:
junit: ./Testing/ServiceSocketTests/results/test_results.xml
when: always
# Package Stage
TF_Service::Windows::package:
stage: package
dependencies:
- TF_Settings::Web::build
- TF_Service::dotNet::Windows::build
- TF_Service::Wrapper::build
- TF_Service::Tray::build
needs: [
"TF_Service::dotNet::Windows::build",
"TF_Settings::Web::build",
"TF_Service::Wrapper::build",
"TF_Service::Tray::build"
]
script:
# Package Service up neatly
- mkdir ./Service_Package/
- mkdir ./Service_Package/Service/
- mkdir ./Service_Package/SettingsUI/
- mkdir ./Service_Package/Wrapper/
- mkdir ./Service_Package/Wrapper/wwwroot/
- mkdir ./Service_Package/Tray/
- mkdir ./Service_Package/Licenses/
# Update Version.txt with latest information before packaging
- cp $CI_PROJECT_DIR/TF_Service_dotNet/Version.txt ./Service_dotNet_Build
- python ./Scripts/UpdateVersionFile.py --path ${env:CI_PROJECT_DIR}/Service_dotNet_Build/Version.txt --apiVer ${env:TF_TOOLING_API_VERSION} --swVer ${env:TOUCHFREE_VERSION} --ref ${env:CI_COMMIT_SHORT_SHA} --branchName "$CI_COMMIT_REF_NAME"
- Get-Content "${env:CI_PROJECT_DIR}/Service_dotNet_Build/Version.txt"
- cp -R ./Service_dotNet_Build/* ./Service_Package/Service/
- cp -R ./TF_Settings_Web/*.exe ./Service_Package/SettingsUI/
- cp -R ./Service_Wrapper_Build/* ./Service_Package/Wrapper/
- cp -R ./TF_Settings_Web/dist/* ./Service_Package/Wrapper/wwwroot
- cp -R ./Service_Tray_Build/* ./Service_Package/Tray/
- cp -R ./Third_Party_Licenses/* ./Service_Package/Licenses/
artifacts:
name: "TouchFree_Service_Package_${CI_COMMIT_SHORT_SHA}"
paths:
- ./Service_Package
expire_in: 2 weeks
when: always
tags:
- unity
- win10
Linux_Image::ARMLinux::package:
stage: package
image: ubuntu:20.04
dependencies:
- Tracking::ARMLinux::download_package
- TF_Settings::Web::build
- TF_Service::dotNet::ARMLinux::build
needs: [
"Tracking::ARMLinux::download_package",
"TF_Settings::Web::build",
"TF_Service::dotNet::ARMLinux::build"
]
script:
- apt-get update
- apt-get --assume-yes install squashfs-tools
- mkdir licenses
# Uncompress & chmod TouchFree Service
- ln ./Service_dotNet_Build/libatomic.so.1.2.0 ./Service_dotNet_Build/libatomic.so.1
- ln ./Service_dotNet_Build/libLeapC.so.5 ./Service_dotNet_Build/libLeapC.so
- ln ./Service_dotNet_Build/libstdc++.so.6.0.28 ./Service_dotNet_Build/libstdc++.so.6
- chmod +x ./Service_dotNet_Build/TouchFree_Service
- cp ./Service_dotNet_Build/ThirdParty/* ./licenses
# Uncompress & chmod tracking service
- tar -xzf $CI_PROJECT_DIR/Scripts/BrightSign_Scripts/Build_ARM64_Linux_release/Ultraleap_Tracking_Installer_*.tar.gz
- chmod +x ./TrackingService/bin/libtrack_server
# Combine services into one directory
- mkdir ./TouchFree_Extension
- mkdir ./TouchFree_Extension/TouchFree
- mkdir ./TouchFree_Extension/wwwroot
- mkdir ./TouchFree_Extension/Tracking
- mkdir ./TouchFree_Extension/Tracking/bin
- cp -R ./TrackingService/bin/* ./TouchFree_Extension/Tracking/bin
- cp ./LeapSDK/ThirdPartyNotices.md ./TouchFree_Extension/Tracking
- cp -R $CI_PROJECT_DIR/Service_dotNet_Build/* ./TouchFree_Extension/TouchFree
- cp -R $CI_PROJECT_DIR/TF_Settings_Web/dist/* ./TouchFree_Extension/wwwroot
- cp $CI_PROJECT_DIR/Scripts/BrightSign_Scripts/Version.txt ./TouchFree_Extension
- mkdir ./temp
- cp -rf ./TouchFree_Extension/* ./temp
- mksquashfs ./temp ext_ultouchfree.squashfs
- cp ./LeapSDK/ThirdPartyNotices.md ./licenses
- tar zcf linux_image.tar.gz ext_ultouchfree.squashfs licenses
artifacts:
name: "TouchFree_Linux_Image_${CI_COMMIT_SHORT_SHA}"
paths:
- ./linux_image.tar.gz
expire_in: 2 weeks
when: always
tags:
- docker
TF_Service::ARMLinux::package:
stage: package
image: ubuntu:20.04
dependencies:
- Tracking::ARMLinux::download_package
- TF_Settings::Web::build
- TF_Service::dotNet::ARMLinux::build
needs: [
"Tracking::ARMLinux::download_package",
"TF_Settings::Web::build",
"TF_Service::dotNet::ARMLinux::build"
]
script:
- apt-get update
- apt-get --assume-yes install squashfs-tools
# Uncompress & chmod TouchFree Service
- ln ./Service_dotNet_Build/libatomic.so.1.2.0 ./Service_dotNet_Build/libatomic.so.1
- ln ./Service_dotNet_Build/libLeapC.so.5 ./Service_dotNet_Build/libLeapC.so
- ln ./Service_dotNet_Build/libstdc++.so.6.0.28 ./Service_dotNet_Build/libstdc++.so.6
- chmod +x ./Service_dotNet_Build/TouchFree_Service
# Uncompress & chmod tracking service
- cd $CI_PROJECT_DIR/Scripts/BrightSign_Scripts/
- tar -xzf ./Build_ARM64_Linux_release/Ultraleap_Tracking_Installer_*.tar.gz
- chmod +x ./TrackingService/bin/libtrack_server
# Combine services into one directory
- mkdir ./TouchFree_Extension
- mkdir ./TouchFree_Extension/TouchFree
- mkdir ./TouchFree_Extension/wwwroot
- mkdir ./TouchFree_Extension/Tracking
- mkdir ./TouchFree_Extension/Tracking/bin
- cp -R ./TrackingService/bin/* ./TouchFree_Extension/Tracking/bin
- cp ./LeapSDK/ThirdPartyNotices.md ./TouchFree_Extension/Tracking
- cp -R $CI_PROJECT_DIR/Service_dotNet_Build/* ./TouchFree_Extension/TouchFree
- cp -R $CI_PROJECT_DIR/TF_Settings_Web/dist/* ./TouchFree_Extension/wwwroot
- cp $CI_PROJECT_DIR/Scripts/BrightSign_Scripts/Version.txt ./TouchFree_Extension
- cd "$CI_PROJECT_DIR/Scripts/BrightSign_Scripts/"
- chmod +x ./make-extension-ubi
- ./make-extension-ubi ./TouchFree_Extension/ $BS_EXTENSION_NAME
- mkdir $CI_PROJECT_DIR/TF_Service_BS/
- cp ./build-$BS_EXTENSION_NAME/*.tar.gz $CI_PROJECT_DIR/TF_Service_BS/
artifacts:
name: "TouchFree_BrightSign_${TOUCHFREE_VERSION}_${CI_COMMIT_SHORT_SHA}"
paths:
- "$CI_PROJECT_DIR/TF_Service_BS/*"
expire_in: 2 weeks
when: always
tags:
- docker
# Installer Stage
TouchFree::installer:
stage: installer
dependencies:
- TF_Service::Windows::package
- Tracking::download
- TouchFree::build
needs: [
"TF_Service::Windows::package",
"Tracking::download",
"TouchFree::build"
]
script:
# Run innosetup
- cd ./Scripts/
- "& ./compile_installer.bat ${env:TOUCHFREE_VERSION} $CI_PROJECT_DIR/TF_Service_Utilities/Installer/TouchFree_Installer.iss"
# Sign the installer with the UltraLeap certificate
- $cert=Get-ChildItem -Path Cert:\LocalMachine\My -CodeSigningCert
- Set-AuthenticodeSignature -FilePath "$CI_PROJECT_DIR/Installer_Build/TouchFree_${TOUCHFREE_VERSION}_Installer.exe" -TimestampServer 'http://timestamp.comodoca.com/authenticode' -Certificate $cert
artifacts:
name: "TouchFree_Installer_${TOUCHFREE_VERSION}_${CI_COMMIT_SHORT_SHA}"
paths:
- ./Installer_Build/*.exe
expire_in: 2 weeks
when: always
tags:
- unity
- win10