@@ -20,12 +20,13 @@ jobs:
20
20
env :
21
21
DOTNET_CLI_TELEMETRY_OPTOUT : 1
22
22
DOTNET_NOLOGO : 1
23
+ LOWEST_SUPPORTED_UNITY_VERSION : 2019.4.34f1
23
24
strategy :
24
25
fail-fast : false
25
26
matrix :
26
27
os : [macos-latest, windows-latest]
27
28
# 2022.1.0a12 removed until S.T.J issues fixed
28
- unity-version : [2019.4.33f1 , 2020.3.21f1 , 2021.1.26f1 ]
29
+ unity-version : [2019.4.34f1 , 2020.3.27f1 , 2021.2.10f1 ]
29
30
include :
30
31
- os : windows-latest
31
32
unity-installation-path : C:/Program Files/Unity/
@@ -37,12 +38,12 @@ jobs:
37
38
unity-root : /Applications/Unity/Hub/Editor/
38
39
unity-path : Unity.app/Contents/MacOS
39
40
unity-config-path : /Library/Application Support/Unity/config/
40
- - unity-version : 2019.4.33f1
41
- unity-version-changeset : c9b2b02eeeef
42
- - unity-version : 2020.3.21f1
43
- unity-version-changeset : a38c86f6690f
44
- - unity-version : 2021.1.26f1
45
- unity-version-changeset : 6f076387c01d
41
+ - unity-version : 2019.4.34f1
42
+ unity-version-changeset : 6a9faed444f2
43
+ - unity-version : 2020.3.27f1
44
+ unity-version-changeset : e759542391ea
45
+ - unity-version : 2021.2.10f1
46
+ unity-version-changeset : ee872746220e
46
47
# - unity-version: 2022.1.0a12
47
48
# unity-version-changeset: 816252c3efbb
48
49
@@ -194,9 +195,9 @@ jobs:
194
195
assemblyalias --target-directory "package-dev/Runtime" --internalize --prefix "Sentry." --assemblies-to-alias "Microsoft*;System*"
195
196
196
197
- name : Run Unity tests (playmode)
197
- # TODO: Run Play mode tests on 2022 once S.T.J loading issue resolved.
198
+ # TODO: Run Play mode tests on 2021.2 or newer once S.T.J loading issue resolved.
198
199
# System.MissingMethodException : Method not found: System.Text.Json.JsonDocument System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1<byte>,System.Text.Json.JsonDocumentOptions)
199
- if : ${{ matrix.unity-version != '2022.1.0a12' }}
200
+ if : ${{ !(startsWith( matrix.unity-version, '2021.2')) && !(startsWith(matrix.unity-version, '2022')) }}
200
201
env :
201
202
UNITY_VERSION : ${{ matrix.unity-version }}
202
203
run : dotnet msbuild /t:UnityPlayModeTest /p:Configuration=Release /p:OutDir=other test/Sentry.Unity.Tests
@@ -209,9 +210,9 @@ jobs:
209
210
path : artifacts/test/playmode
210
211
211
212
- name : Run Unity tests (editmode)
212
- # TODO: Run Edit mode tests on 2022 once S.T.J loading issue resolved.
213
+ # TODO: Run Play mode tests on 2021.2 or newer once S.T.J loading issue resolved.
213
214
# https://forum.unity.com/threads/unity-future-net-development-status.1092205/page-8#post-7602256
214
- if : ${{ matrix.unity-version != '2022.1.0a12' }}
215
+ if : ${{ !(startsWith( matrix.unity-version, '2021.2')) && !(startsWith(matrix.unity-version, '2022')) }}
215
216
env :
216
217
UNITY_VERSION : ${{ matrix.unity-version }}
217
218
run : dotnet msbuild /t:UnityEditModeTest /p:Configuration=Release /p:OutDir=other test/Sentry.Unity.Editor.Tests
@@ -290,7 +291,7 @@ jobs:
290
291
- name : Upload release artifacts
291
292
uses : actions/upload-artifact@v2
292
293
# Only on macOS which contain all native plugin needed
293
- if : matrix.os == 'macos-latest'
294
+ if : matrix.os == 'macos-latest' && matrix.unity-version == ${{ env.LOWEST_SUPPORTED_UNITY_VERSION }}
294
295
with :
295
296
name : ${{ github.sha }}
296
297
if-no-files-found : error
@@ -337,9 +338,9 @@ jobs:
337
338
max-parallel : 5
338
339
fail-fast : false
339
340
matrix :
340
- api-level : [21, 27, 29]
341
- avd-target : [default]
342
- unity-version : [2019.4.33f1 , 2020.3.21f1 , 2021.1.26f1 ]
341
+ api-level : [21, 27, 29]
342
+ avd-target : [default]
343
+ unity-version : [2019.4.34f1 , 2020.3.27f1 , 2021.2.10f1 ]
343
344
steps :
344
345
- name : Checkout
345
346
@@ -354,6 +355,8 @@ jobs:
354
355
id : smoke-test
355
356
continue-on-error : true
356
357
timeout-minutes : 10
358
+ # API 21 is no longer supported on Unity 2022
359
+ if : ${{ (matrix.unity-version == '2021.2.10f1') && matrix.api-level != '21' }}
357
360
uses : reactivecircus/android-emulator-runner@2b2ebf2e518e38a17180117fc2b677006db27330
358
361
with :
359
362
api-level : ${{ matrix.api-level }}
@@ -377,8 +380,8 @@ jobs:
377
380
id : smoke-test-retry
378
381
continue-on-error : true
379
382
timeout-minutes : 10
380
- # We only want to retry the tests if the previous fail happened on the emulator startup.
381
- if : ${{ steps.smoke-test.outputs.smoke-status != 'Completed' }}
383
+ # API 21 is no longer supported on Unity 2022 and we only want to retry the tests if the previous fail happened on the emulator startup.
384
+ if : ${{ (matrix.unity-version == '2021.2.10f1') && matrix.api-level != '21' && steps.smoke-test.outputs.smoke-status != 'Completed' }}
382
385
uses : reactivecircus/android-emulator-runner@2b2ebf2e518e38a17180117fc2b677006db27330
383
386
with :
384
387
api-level : ${{ matrix.api-level }}
@@ -412,10 +415,10 @@ jobs:
412
415
max-parallel : 2
413
416
fail-fast : false
414
417
matrix :
415
- api-level : [30]
416
- avd-target : [google_apis]
417
- # api-level 30 image is only available with google services.
418
- unity-version : [2019.4.33f1 , 2020.3.21f1 , 2021.1.26f1 ]
418
+ api-level : [30]
419
+ avd-target : [google_apis]
420
+ # api-level 30 image is only available with google services.
421
+ unity-version : [2019.4.34f1 , 2020.3.27f1 , 2021.2.10f1 ]
419
422
steps :
420
423
- name : Checkout
421
424
0 commit comments