Skip to content

Commit 768c874

Browse files
committed
Merge branch 'main' into chore/unity-2022.3.57f1
2 parents 77f9fcd + 1eb7db7 commit 768c874

File tree

4 files changed

+20
-158
lines changed

4 files changed

+20
-158
lines changed

.github/workflows/android-smoke-test-build.yml

+17-53
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,14 @@ defaults:
1212
jobs:
1313
build:
1414
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
2216
env:
2317
UNITY_PATH: docker exec unity unity-editor
2418

2519
steps:
2620
- name: Checkout
2721
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+
3923
- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}"
4024

4125
- name: Docker Login
@@ -78,53 +62,34 @@ jobs:
7862
run: ./test/Scripts.Integration.Test/add-sentry.ps1 -UnityPath "${{ env.UNITY_PATH }}"
7963

8064
- 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
8266

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 }}"
8569

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
9771
uses: actions/upload-artifact@v4
9872
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.
10376

104-
- name: Configure Sentry for mobile platforms (build-time initialization)
77+
- name: Overwrite OptionsConfiguration for build-time initialization
10578
run: |
10679
$optionsPath = "samples/IntegrationTest/Assets/Scripts/OptionsConfiguration.cs"
10780
$content = Get-Content $optionsPath -Raw
10881
$content = $content -replace 'AndroidNativeInitializationType = NativeInitializationType.Runtime', 'AndroidNativeInitializationType = NativeInitializationType.BuildTime'
10982
Set-Content $optionsPath $content
11083
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 }}"
11986

120-
# Upload build-time initialization build
121-
- name: Upload test app (build-time initialization)
87+
- name: Upload .apk
12288
uses: actions/upload-artifact@v4
12389
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.
12893

12994
- name: Upload IntegrationTest project on failure
13095
if: ${{ failure() }}
@@ -134,5 +99,4 @@ jobs:
13499
path: |
135100
samples/IntegrationTest
136101
!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.

.github/workflows/android-smoke-test-compile.yml

-87
This file was deleted.

.github/workflows/ci.yml

+2-17
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ jobs:
5353
with:
5454
unity-version: ${{ matrix.unity-version }}
5555

56-
5756
package-validation:
5857
name: UPM Package validation
5958
runs-on: ubuntu-latest
@@ -212,23 +211,9 @@ jobs:
212211
with:
213212
unity-version: ${{ matrix.unity-version }}
214213

215-
android-smoke-test-compile:
216-
needs: [android-smoke-test-build]
217-
secrets: inherit
218-
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
219-
strategy:
220-
fail-fast: false
221-
matrix:
222-
unity-version: ["2019", "6000"]
223-
init-type: ["runtime", "buildtime"]
224-
uses: ./.github/workflows/android-smoke-test-compile.yml
225-
with:
226-
unity-version: ${{ matrix.unity-version }}
227-
init-type: ${{ matrix.init-type }}
228-
229214
android-smoke-test-run:
230215
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
231-
needs: [android-smoke-test-compile]
216+
needs: [android-smoke-test-build]
232217
uses: ./.github/workflows/android-smoke-test-run.yml
233218
with:
234219
unity-version: ${{ matrix.unity-version }}
@@ -239,7 +224,7 @@ jobs:
239224
matrix:
240225
api-level: [30, 31, 34] # last updated January 2025
241226
init-type: ["runtime", "buildtime"]
242-
unity-version: ["2019", "6000"]
227+
unity-version: ["2019", "2022", "6000"]
243228

244229
ios-smoke-test-build:
245230
needs: [smoke-test-create]

.github/workflows/ios-smoke-test-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
path: test-app-runtime.tar.gz
9191
retention-days: 14
9292

93-
- name: Configure Sentry for mobile platforms (build-time initialization)
93+
- name: Overwrite OptionsConfiguration for build-time initialization
9494
run: |
9595
$optionsPath = "samples/IntegrationTest/Assets/Scripts/OptionsConfiguration.cs"
9696
$content = Get-Content $optionsPath -Raw

0 commit comments

Comments
 (0)