@@ -255,8 +255,19 @@ jobs:
255
255
unity-version : ["2019", "2022", "6000"]
256
256
platform : ["Android", "WebGL", "Linux", "iOS"]
257
257
include :
258
+ - platform : iOS
259
+ check_symbols : false
260
+ build_platform : iOS
261
+ - platform : Android
262
+ check_symbols : false
263
+ build_platform : Android-Export
264
+ - platform : WebGL
265
+ check_symbols : true
266
+ build_platform : WebGL
258
267
- platform : Linux
259
268
image-suffix : " -il2cpp"
269
+ check_symbols : true
270
+ build_platform : Linux
260
271
env :
261
272
UNITY_PATH : docker exec unity unity-editor
262
273
steps :
@@ -317,54 +328,10 @@ jobs:
317
328
run : ./test/Scripts.Integration.Test/add-sentry.ps1 -UnityPath "${{ env.UNITY_PATH }}"
318
329
319
330
- name : Configure Sentry
320
- run : |
321
- $isAndroid = ('${{ matrix.platform }}' -eq 'Android')
322
- $isNotMainBranch = ('${{ github.ref_name }}' -ne 'main')
323
- $platform = if ($isAndroid -and $isNotMainBranch) { 'Android-Export' } else { '${{ matrix.platform }}' }
324
-
325
- ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform $platform -CheckSymbols
326
-
327
- # Dear lord, I don't know why we have to do this: If we do not "pre-build" the project then `exportAsGoogleAndroidProject` will stay `false` in `IPostGenerateGradleAndroidProject`
328
- # and breaking all further steps in CI
329
- # Things I tried:
330
- # 1. Setting the flag and restarting the editor prior to build
331
- # 2. Setting the flag and reloading the domain in a step prior to building
332
- # 3. Reloading the domain prior to building (does not work - build fails with a domain reload pending)
333
- - name : Pre-Build Project for Unity 6 and Android
334
- continue-on-error : true
335
- if : ${{ matrix.unity-version == '6000' && matrix.platform == 'Android' }}
336
- run : |
337
- $platform = '${{ matrix.platform }}'
338
- if ('${{ github.ref_name }}' -ne 'main')
339
- {
340
- $checkSymbols = $false
341
- $platform = 'Android-Export'
342
- }
343
- else
344
- {
345
- $checkSymbols = $false
346
- }
347
-
348
- ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform $platform -CheckSymbols:$checkSymbols -UnityVersion "${{ matrix.unity-version }}"
349
- Remove-Item -Path samples/IntegrationTest/Build -Recurse -Force -Confirm:$false
350
-
331
+ run : ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform ${{ matrix.build_platform }} -CheckSymbols
332
+
351
333
- name : Build Project
352
- run : |
353
- $platform = '${{ matrix.platform }}'
354
- if ($platform -eq 'iOS')
355
- {
356
- $checkSymbols = $false
357
- }
358
- elseif (($platform -eq 'Android') -and ('${{ github.ref_name }}' -ne 'main'))
359
- {
360
- $checkSymbols = $false
361
- $platform = 'Android-Export'
362
- }
363
- else
364
- {
365
- $checkSymbols = $true
366
- }
367
- ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform $platform -CheckSymbols:$checkSymbols -UnityVersion "${{ matrix.unity-version }}"
334
+ run : ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform ${{ matrix.build_platform }} -CheckSymbols:$${{ matrix.check_symbols }} -UnityVersion "${{ matrix.unity-version }}"
368
335
369
336
# We create tar explicitly because upload-artifact is slow for many files.
370
337
- name : Create archive
@@ -514,11 +481,11 @@ jobs:
514
481
515
482
- name : Setup Android
516
483
uses : android-actions/setup-android@7c5672355aaa8fde5f97a91aa9a99616d1ace6bc # pin@v2
517
- if : ${{ matrix.platform == 'Android' && github.ref_name != 'main' }}
484
+ if : ${{ matrix.platform == 'Android' }}
518
485
519
486
- name : Setup NDK
520
487
uses : nttld/setup-ndk@8c3b609ff4d54576ea420551943fd34b4d03b0dc # pin@v1
521
- if : ${{ matrix.platform == 'Android' && github.ref_name != 'main' }}
488
+ if : ${{ matrix.platform == 'Android' }}
522
489
id : setup-ndk
523
490
with :
524
491
ndk-version : ${{ matrix.ndk }}
@@ -527,22 +494,22 @@ jobs:
527
494
# We modify the exported gradle project to deal with the different build-environment
528
495
# I.e. we're fixing the paths for SDK & NDK that have been hardcoded to point at the Unity installation
529
496
- name : Modify gradle project
530
- if : ${{ matrix.platform == 'Android' && github.ref_name != 'main' }}
497
+ if : ${{ matrix.platform == 'Android' }}
531
498
run : |
532
499
./test/Scripts.Integration.Test/modify-gradle-project.ps1 `
533
500
-AndroidSdkRoot $env:ANDROID_SDK_ROOT `
534
501
-NdkPath ${{ steps.setup-ndk.outputs.ndk-path }} `
535
502
-UnityVersion ${{ matrix.unity-version }}
536
503
537
504
- name : Setup JDK 17 for Unity 6
538
- if : ${{ matrix.platform == 'Android' && github.ref_name != 'main' && matrix.unity-version == '6000' }}
505
+ if : ${{ matrix.platform == 'Android' && matrix.unity-version == '6000' }}
539
506
uses : actions/setup-java@v3
540
507
with :
541
508
java-version : ' 17'
542
509
distribution : ' temurin'
543
510
544
511
- name : Android smoke test
545
- if : ${{ matrix.platform == 'Android' && github.ref_name != 'main' }}
512
+ if : ${{ matrix.platform == 'Android' }}
546
513
run : ./scripts/smoke-test-android.ps1 Build -IsIntegrationTest -UnityVersion "${{ matrix.unity-version }}"
547
514
env :
548
515
JAVA_HOME : ${{ env.JAVA_HOME }}
0 commit comments