@@ -339,17 +339,45 @@ jobs:
339
339
run : |
340
340
# Note: remove local.properties file that contains Android SDK & NDK paths in the Unity installation.
341
341
rm -rf samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame
342
- tar -cvzf test-app.tar.gz samples/IntegrationTest/Build
342
+ tar -cvzf test-app-runtime .tar.gz samples/IntegrationTest/Build
343
343
344
+ # Upload runtime initialization build
344
345
- name : Upload test app
345
346
uses : actions/upload-artifact@v4
346
347
with :
347
- name : testapp-${{ matrix.platform }}-${{ matrix.unity-version }}
348
+ name : testapp-${{ matrix.platform }}-${{ matrix.unity-version }}-runtime
348
349
if-no-files-found : error
349
- path : test-app.tar.gz
350
- # Lower retention period - we only need this to retry CI.
350
+ path : test-app-runtime.tar.gz
351
351
retention-days : 14
352
352
353
+ - name : Configure Sentry for mobile platforms (build-time initialization)
354
+ if : ${{ matrix.platform == 'iOS' || matrix.platform == 'Android' }}
355
+ run : |
356
+ $optionsPath = "samples/IntegrationTest/Assets/Scripts/OptionsConfiguration.cs"
357
+ $content = Get-Content $optionsPath -Raw
358
+ $content = $content -replace 'AndroidNativeInitializationType = NativeInitializationType.Runtime', 'AndroidNativeInitializationType = NativeInitializationType.BuildTime'
359
+ $content = $content -replace 'IosNativeInitializationType = NativeInitializationType.Runtime', 'IosNativeInitializationType = NativeInitializationType.BuildTime'
360
+ Set-Content $optionsPath $content
361
+
362
+ - name : Build Project for mobile platforms (build-time initialization)
363
+ if : ${{ matrix.platform == 'iOS' || matrix.platform == 'Android' }}
364
+ run : ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform ${{ matrix.build_platform }} -CheckSymbols:$${{ matrix.check_symbols }} -UnityVersion "${{ matrix.unity-version }}"
365
+
366
+ - name : Create archive (build-time initialization)
367
+ shell : bash
368
+ run : |
369
+ rm -rf samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame
370
+ tar -cvzf test-app-buildtime.tar.gz samples/IntegrationTest/Build
371
+
372
+ # Upload build-time initialization build
373
+ - name : Upload test app (build-time initialization)
374
+ uses : actions/upload-artifact@v4
375
+ with :
376
+ name : testapp-${{ matrix.platform }}-${{ matrix.unity-version }}-buildtime
377
+ if-no-files-found : error
378
+ path : test-app-buildtime.tar.gz
379
+ retention-days : 14
380
+
353
381
- name : Upload IntegrationTest project on failure
354
382
if : ${{ failure() }}
355
383
uses : actions/upload-artifact@v4
@@ -437,27 +465,30 @@ jobs:
437
465
android-smoke-test-run :
438
466
if : ${{ !startsWith(github.ref, 'refs/heads/release/') }}
439
467
needs : [mobile-smoke-test-compile]
440
- name : ${{ matrix.unity-version }} Android ${{ matrix.api-level }} Run Smoke Test
468
+ name : ${{ matrix.unity-version }} Android ${{ matrix.api-level }} ${{ matrix.init-type }} Run Smoke Test
441
469
uses : ./.github/workflows/android-smoke-test.yml
442
470
with :
443
471
unity-version : ${{ matrix.unity-version }}
444
472
api-level : ${{ matrix.api-level }}
473
+ init-type : ${{ matrix.init-type }}
445
474
strategy :
446
475
fail-fast : false
447
476
matrix :
448
477
api-level : [30, 31, 34] # last updated January 2025
478
+ init-type : ["runtime", "buildtime"]
449
479
unity-version : ["2019", "6000"]
450
480
451
481
mobile-smoke-test-compile :
452
482
if : ${{ !startsWith(github.ref, 'refs/heads/release/') }}
453
483
needs : [smoke-test-build]
454
- name : ${{ matrix.unity-version }} ${{ matrix.platform }} Compile Smoke Test
484
+ name : ${{ matrix.unity-version }} ${{ matrix.platform }} ${{ matrix.init-type }} Compile Smoke Test
455
485
runs-on : ${{ matrix.platform == 'iOS' && 'macos-latest' || 'ubuntu-latest-4-cores' }}
456
486
strategy :
457
487
fail-fast : false
458
488
matrix :
459
489
unity-version : ["2019", "2022", "6000"]
460
490
platform : ["Android", "iOS"]
491
+ init-type : ["runtime", "buildtime"]
461
492
include :
462
493
# See supported version in https://docs.unity3d.com/6000.0/Documentation/Manual/android-sdksetup.html
463
494
- unity-version : " 2019"
@@ -474,10 +505,10 @@ jobs:
474
505
- name : Download app project
475
506
uses : actions/download-artifact@v4
476
507
with :
477
- name : testapp-${{ matrix.platform }}-${{ matrix.unity-version }}
508
+ name : testapp-${{ matrix.platform }}-${{ matrix.unity-version }}-${{ matrix.init-type }}
478
509
479
510
- name : Extract app project
480
- run : tar -xvzf test-app.tar.gz
511
+ run : tar -xvzf test-app-${{ matrix.init-type }} .tar.gz
481
512
482
513
- name : Setup Android
483
514
uses : android-actions/setup-android@7c5672355aaa8fde5f97a91aa9a99616d1ace6bc # pin@v2
@@ -526,7 +557,7 @@ jobs:
526
557
if : ${{ failure() }}
527
558
uses : actions/upload-artifact@v4
528
559
with :
529
- name : failed-project-${{ matrix.platform }}-${{ matrix.unity-version }}-but-compiled
560
+ name : failed-project-${{ matrix.platform }}-${{ matrix.unity-version }}-${{ matrix.init-type }}- but-compiled
530
561
path : |
531
562
samples/IntegrationTest
532
563
!samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame
@@ -539,7 +570,7 @@ jobs:
539
570
if : |
540
571
!(matrix.platform == 'Android' && matrix.unity-version == '2022') || matrix.platform == 'iOS'
541
572
with :
542
- name : testapp-${{ matrix.platform }}-compiled-${{ matrix.unity-version }}
573
+ name : testapp-${{ matrix.platform }}-compiled-${{ matrix.unity-version }}-${{ matrix.init-type }}
543
574
# Collect app but ignore the files that are not required for the test.
544
575
path : |
545
576
samples/IntegrationTest/Build/*.apk
@@ -552,7 +583,7 @@ jobs:
552
583
ios-smoke-test-run :
553
584
if : ${{ !startsWith(github.ref, 'refs/heads/release/') }}
554
585
needs : [mobile-smoke-test-compile]
555
- name : ${{ matrix.unity-version }} iOS ${{ matrix.ios }} Run Smoke Test
586
+ name : ${{ matrix.unity-version }} iOS ${{ matrix.ios }} ${{ matrix.init-type }} Run Smoke Test
556
587
runs-on : macos-13 # Pinning to get the oldest, supported version of iOS simulator
557
588
strategy :
558
589
fail-fast : false
@@ -568,6 +599,7 @@ jobs:
568
599
# Also make sure to match the versions available here:
569
600
# - https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
570
601
ios : ["16.1", latest] # last updated October 2024
602
+ init-type : ["runtime", "buildtime"]
571
603
572
604
steps :
573
605
- name : Checkout
@@ -576,7 +608,7 @@ jobs:
576
608
- name : Download app artifact
577
609
uses : actions/download-artifact@v4
578
610
with :
579
- name : testapp-iOS-compiled-${{ matrix.unity-version }}
611
+ name : testapp-iOS-compiled-${{ matrix.unity-version }}-${{ matrix.init-type }}
580
612
path : samples/IntegrationTest/Build
581
613
582
614
- name : Set Xcode for iOS version ${{matrix.ios}}
@@ -614,10 +646,10 @@ jobs:
614
646
uses : actions/download-artifact@v4
615
647
id : download
616
648
with :
617
- name : testapp-${{ matrix.platform }}-${{ matrix.unity-version }}
649
+ name : testapp-${{ matrix.platform }}-${{ matrix.unity-version }}-runtime
618
650
619
651
- name : Extract test app
620
- run : tar -xvzf test-app.tar.gz
652
+ run : tar -xvzf test-app-runtime .tar.gz
621
653
622
654
- name : Run (WebGL)
623
655
if : ${{ matrix.platform == 'WebGL' }}
0 commit comments