5
5
push :
6
6
paths :
7
7
- " **/Dockerfile"
8
+ - " **/scripts/**"
8
9
- " .github/workflows/test.yml"
9
10
- " reference-project-test/**"
10
11
pull_request :
11
12
paths :
12
13
- " **/Dockerfile"
14
+ - " **/scripts/**"
13
15
- " .github/workflows/test.yml"
14
16
- " reference-project-test/**"
15
17
16
- env :
17
- UNITY_LICENSE: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>\n <License id=\"Terms\">\n <MachineBindings>\n <Binding Key=\"1\" Value=\"576562626572264761624c65526f7578\"/>\n <Binding Key=\"2\" Value=\"576562626572264761624c65526f7578\"/>\n </MachineBindings>\n <MachineID Value=\"D7nTUnjNAmtsUMcnoyrqkgIbYdM=\"/>\n <SerialHash Value=\"2033b8ac3e6faa3742ca9f0bfae44d18f2a96b80\"/>\n <Features>\n <Feature Value=\"33\"/>\n <Feature Value=\"1\"/>\n <Feature Value=\"12\"/>\n <Feature Value=\"2\"/>\n <Feature Value=\"24\"/>\n <Feature Value=\"3\"/>\n <Feature Value=\"36\"/>\n <Feature Value=\"17\"/>\n <Feature Value=\"19\"/>\n <Feature Value=\"62\"/>\n </Features>\n <DeveloperData Value=\"AQAAAEY0LUJHUlgtWEQ0RS1aQ1dWLUM1SlctR0RIQg==\"/>\n <SerialMasked Value=\"F4-BGRX-XD4E-ZCWV-C5JW-XXXX\"/>\n <StartDate Value=\"2021-02-08T00:00:00\"/>\n <UpdateDate Value=\"2021-02-09T00:34:57\"/>\n <InitialActivationDate Value=\"2021-02-08T00:34:56\"/>\n <LicenseVersion Value=\"6.x\"/>\n <ClientProvidedVersion Value=\"2018.4.30f1\"/>\n <AlwaysOnline Value=\"false\"/>\n <Entitlements>\n <Entitlement Ns=\"unity_editor\" Tag=\"UnityPersonal\" Type=\"EDITOR\" ValidTo=\"9999-12-31T00:00:00\"/>\n <Entitlement Ns=\"unity_editor\" Tag=\"DarkSkin\" Type=\"EDITOR_FEATURE\" ValidTo=\"9999-12-31T00:00:00\"/>\n </Entitlements>\n </License>\n<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"/><SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/><Reference URI=\"#Terms\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><DigestValue>m0Db8UK+ktnOLJBtHybkfetpcKo=</DigestValue></Reference></SignedInfo><SignatureValue>o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==</SignatureValue></Signature></root>"
18
+ concurrency :
19
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20
+ cancel-in-progress : true
18
21
19
22
jobs :
20
23
# #########################
@@ -105,27 +108,24 @@ jobs:
105
108
id : setup
106
109
run : |
107
110
# Get the Unity versions for test. (The latest patch versions for each minor version.)
108
- VERSIONS=`npx unity-changeset list --versions --latest-patch --json --min 2018 .3`
111
+ VERSIONS=`npx unity-changeset list --versions --latest-patch --json --min 2019 .3`
109
112
echo "Versions: $VERSIONS"
110
113
echo "versions=$VERSIONS" >> $GITHUB_OUTPUT
111
114
112
- # Exclude il2cpp for Unity 2019 .2 or earlier
113
- LINUX_EXCLUDES ="$LINUX_EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2018|2019 .1|2019 .2\")) | { version: ., module: \"linux -il2cpp\"} ]'`"
115
+ # Unity 2021.1 and 2021 .2 do not build il2cpp properly and will be skipped
116
+ WINDOWS_EXCLUDES ="$WINDOWS_EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2021 .1|2021 .2\")) | { version: ., module: \"windows -il2cpp\"} ]'`"
114
117
115
- # Exclude il2cpp for Unity 2019.2 or earlier. Unity 2021.1 and 2021.2 also do not build properly and will be skipped
116
- WINDOWS_EXCLUDES="$WINDOWS_EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2018|2019.1|2019.2| 2021.1|2021.2\")) | { version: ., module: \"windows-il2cpp \"} ]'`"
118
+ # Issues with 2021.1 and 2021.2 on Universal Windows Platform so they are skipped
119
+ WINDOWS_EXCLUDES="$WINDOWS_EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2021.1|2021.2\")) | { version: ., module: \"universal- windows-platform \"} ]'`"
117
120
118
- # Universal Windows Platform is added in 2019. Issues with 2021.1 and 2021.2 so they are skipped too
119
- WINDOWS_EXCLUDES="$WINDOWS_EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2018|2019.1| 2021.1|2021.2\")) | { version: ., module: \"universal-windows-platform \"} ]'`"
121
+ # Issues with 2021.1 and 2021.2 on AppleTV so they are skipped
122
+ WINDOWS_EXCLUDES="$WINDOWS_EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2021.1|2021.2\")) | { version: ., module: \"appletv \"} ]'`"
120
123
121
- # AppleTV isn't stable until 2019.2. Issues with 2021.1 and 2021.2 so they are skipped too
122
- WINDOWS_EXCLUDES="$WINDOWS_EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2018|2019.1| 2021.1|2021.2\")) | { version: ., module: \"appletv \"} ]'`"
124
+ # Issues with 2021.1 and 2021.2 on Android so they are skipped
125
+ WINDOWS_EXCLUDES="$WINDOWS_EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2021.1|2021.2\")) | { version: ., module: \"android \"} ]'`"
123
126
124
- # No Windows 2018 Android Builds. Issues with 2021.1 and 2021.2 so they are skipped too
125
- WINDOWS_EXCLUDES="$WINDOWS_EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2018|2021.1|2021.2\")) | { version: ., module: \"android\"} ]'`"
126
-
127
- # No Windows mono Builds for Unity 2019.2 or earlier. Issues with 2021.1 and 2021.2 so they are skipped too
128
- WINDOWS_EXCLUDES="$WINDOWS_EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2018|2019.1|2019.2|2021.1|2021.2\")) | { version: ., module: \"base\"} ]'`"
127
+ # Issues with 2021.1 and 2021.2 on Mono so they are skipped
128
+ WINDOWS_EXCLUDES="$WINDOWS_EXCLUDES `echo \"$VERSIONS\" | jq -c '[ .[] | select(test(\"2021.1|2021.2\")) | { version: ., module: \"base\"} ]'`"
129
129
130
130
LINUX_EXCLUDES=`echo "$LINUX_EXCLUDES" | jq -s -c 'flatten'`
131
131
WINDOWS_EXCLUDES=`echo "$WINDOWS_EXCLUDES" | jq -s -c 'flatten'`
@@ -369,6 +369,12 @@ jobs:
369
369
- name : Build project
370
370
uses : game-ci/unity-builder@main
371
371
timeout-minutes : 35
372
+ # Only run if not a PR as we need access to secrets
373
+ if : github.base_ref == ''
374
+ env :
375
+ UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
376
+ UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
377
+ UNITY_SERIAL : ${{ secrets.UNITY_SERIAL }}
372
378
with :
373
379
unityVersion : ${{ matrix.version }}
374
380
customImage : editor:ubuntu-dev
@@ -385,9 +391,13 @@ jobs:
385
391
# Set WebGL compression format to gzip
386
392
sed -i -e 's/webGLCompressionFormat: .*$/webGLCompressionFormat: 1/' reference-project-test/ProjectSettings/ProjectSettings.asset
387
393
- name : Build project (GZip)
388
- if : env.MODULE == 'webgl'
394
+ if : env.MODULE == 'webgl' && github.base_ref == ''
389
395
uses : game-ci/unity-builder@main
390
396
timeout-minutes : 15
397
+ env :
398
+ UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
399
+ UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
400
+ UNITY_SERIAL : ${{ secrets.UNITY_SERIAL }}
391
401
with :
392
402
unityVersion : ${{ matrix.version }}
393
403
customImage : editor:ubuntu-dev
@@ -404,9 +414,13 @@ jobs:
404
414
# Set WebGL compression format to brotli
405
415
sed -i -e 's/webGLCompressionFormat: .*$/webGLCompressionFormat: 0/' reference-project-test/ProjectSettings/ProjectSettings.asset
406
416
- name : Build project (Brotli)
407
- if : env.MODULE == 'webgl'
417
+ if : env.MODULE == 'webgl' && github.base_ref == ''
408
418
uses : game-ci/unity-builder@main
409
419
timeout-minutes : 15
420
+ env :
421
+ UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
422
+ UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
423
+ UNITY_SERIAL : ${{ secrets.UNITY_SERIAL }}
410
424
with :
411
425
unityVersion : ${{ matrix.version }}
412
426
customImage : editor:ubuntu-dev
@@ -420,6 +434,12 @@ jobs:
420
434
- name : Test project
421
435
timeout-minutes : 10
422
436
uses : game-ci/unity-test-runner@main
437
+ # Only run if not a PR as we need access to secrets
438
+ if : github.base_ref == ''
439
+ env :
440
+ UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
441
+ UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
442
+ UNITY_SERIAL : ${{ secrets.UNITY_SERIAL }}
423
443
with :
424
444
unityVersion : ${{ matrix.version }}
425
445
customImage : editor:ubuntu-dev
0 commit comments