@@ -12,30 +12,14 @@ defaults:
12
12
jobs :
13
13
build :
14
14
name : ${{ inputs.unity-version }}
15
- runs-on : ubuntu-latest
16
- strategy :
17
- matrix :
18
- include :
19
- - platform : Android
20
- check_symbols : false
21
- build_platform : Android-Export
15
+ runs-on : ubuntu-latest-4-cores
22
16
env :
23
17
UNITY_PATH : docker exec unity unity-editor
24
18
25
19
steps :
26
20
- name : Checkout
27
21
uses : actions/checkout@v3
28
-
29
- - name : Free Disk Space (Ubuntu)
30
- uses : jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8
31
- with :
32
- android : true
33
- dotnet : false
34
- haskell : true
35
- large-packages : false
36
- docker-images : false
37
- swap-storage : true
38
-
22
+
39
23
- run : echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}"
40
24
41
25
- name : Docker Login
@@ -78,53 +62,34 @@ jobs:
78
62
run : ./test/Scripts.Integration.Test/add-sentry.ps1 -UnityPath "${{ env.UNITY_PATH }}"
79
63
80
64
- name : Configure Sentry
81
- run : ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform ${{ matrix.build_platform }} -CheckSymbols
65
+ run : ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform "Android" -CheckSymbols
82
66
83
- - name : Build Project
84
- run : ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform ${{ matrix.build_platform }} -CheckSymbols:$false -UnityVersion "${{ inputs.unity-version }}"
67
+ - name : Export APK - Runtime Initialization
68
+ run : ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform "Android" -CheckSymbols:$true -UnityVersion "${{ inputs.unity-version }}"
85
69
86
- # We create tar explicitly because upload-artifact is slow for many files.
87
- # TODO verify this is still true with upload-artifact@v4 which improved performance a lot.
88
- - name : Create archive
89
- shell : bash
90
- run : |
91
- # Note: remove local.properties file that contains Android SDK & NDK paths in the Unity installation.
92
- rm -rf samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame
93
- tar -cvzf test-app-runtime.tar.gz samples/IntegrationTest/Build
94
-
95
- # Upload runtime initialization build
96
- - name : Upload test app
70
+ - name : Upload .apk
97
71
uses : actions/upload-artifact@v4
98
72
with :
99
- name : testapp-android-${{ inputs.unity-version }}-runtime
100
- if-no-files-found : error
101
- path : test-app-runtime.tar.gz
102
- retention-days : 14
73
+ name : testapp-android-compiled-${{ inputs.unity-version }}-runtime
74
+ path : samples/IntegrationTest/Build/*.apk # Collect app but ignore the files that are not required for the test.
75
+ retention-days : 14 # Lower retention period - we only need this to retry CI.
103
76
104
- - name : Configure Sentry for mobile platforms ( build-time initialization)
77
+ - name : Overwrite OptionsConfiguration for build-time initialization
105
78
run : |
106
79
$optionsPath = "samples/IntegrationTest/Assets/Scripts/OptionsConfiguration.cs"
107
80
$content = Get-Content $optionsPath -Raw
108
81
$content = $content -replace 'AndroidNativeInitializationType = NativeInitializationType.Runtime', 'AndroidNativeInitializationType = NativeInitializationType.BuildTime'
109
82
Set-Content $optionsPath $content
110
83
111
- - name : Build Project for mobile platforms (build-time initialization)
112
- run : ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform ${{ matrix.build_platform }} -CheckSymbols:$false -UnityVersion "${{ inputs.unity-version }}"
113
-
114
- - name : Create archive (build-time initialization)
115
- shell : bash
116
- run : |
117
- rm -rf samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame
118
- tar -cvzf test-app-buildtime.tar.gz samples/IntegrationTest/Build
84
+ - name : Export APK - Build-Time Initialization
85
+ run : ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform "Android" -CheckSymbols:$true -UnityVersion "${{ inputs.unity-version }}"
119
86
120
- # Upload build-time initialization build
121
- - name : Upload test app (build-time initialization)
87
+ - name : Upload .apk
122
88
uses : actions/upload-artifact@v4
123
89
with :
124
- name : testapp-android-${{ inputs.unity-version }}-buildtime
125
- if-no-files-found : error
126
- path : test-app-buildtime.tar.gz
127
- retention-days : 14
90
+ name : testapp-android-compiled-${{ inputs.unity-version }}-buildtime
91
+ path : samples/IntegrationTest/Build/*.apk # Collect app but ignore the files that are not required for the test.
92
+ retention-days : 14 # Lower retention period - we only need this to retry CI.
128
93
129
94
- name : Upload IntegrationTest project on failure
130
95
if : ${{ failure() }}
134
99
path : |
135
100
samples/IntegrationTest
136
101
!samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame
137
- # Lower retention period - we only need this to retry CI.
138
- retention-days : 14
102
+ retention-days : 14 # Lower retention period - we only need this to retry CI.
0 commit comments