55 push :
66 paths :
77 - " **/Dockerfile"
8+ - " **/scripts/**"
89 - " .github/workflows/test.yml"
910 - " reference-project-test/**"
1011 pull_request :
1112 paths :
1213 - " **/Dockerfile"
14+ - " **/scripts/**"
1315 - " .github/workflows/test.yml"
1416 - " reference-project-test/**"
1517
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
1821
1922jobs :
2023 # #########################
@@ -105,27 +108,24 @@ jobs:
105108 id : setup
106109 run : |
107110 # 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`
109112 echo "Versions: $VERSIONS"
110113 echo "versions=$VERSIONS" >> $GITHUB_OUTPUT
111114
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\"} ]'`"
114117
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 \"} ]'`"
117120
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 \"} ]'`"
120123
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 \"} ]'`"
123126
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\"} ]'`"
129129
130130 LINUX_EXCLUDES=`echo "$LINUX_EXCLUDES" | jq -s -c 'flatten'`
131131 WINDOWS_EXCLUDES=`echo "$WINDOWS_EXCLUDES" | jq -s -c 'flatten'`
@@ -369,6 +369,12 @@ jobs:
369369 - name : Build project
370370 uses : game-ci/unity-builder@main
371371 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 }}
372378 with :
373379 unityVersion : ${{ matrix.version }}
374380 customImage : editor:ubuntu-dev
@@ -385,9 +391,13 @@ jobs:
385391 # Set WebGL compression format to gzip
386392 sed -i -e 's/webGLCompressionFormat: .*$/webGLCompressionFormat: 1/' reference-project-test/ProjectSettings/ProjectSettings.asset
387393 - name : Build project (GZip)
388- if : env.MODULE == 'webgl'
394+ if : env.MODULE == 'webgl' && github.base_ref == ''
389395 uses : game-ci/unity-builder@main
390396 timeout-minutes : 15
397+ env :
398+ UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
399+ UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
400+ UNITY_SERIAL : ${{ secrets.UNITY_SERIAL }}
391401 with :
392402 unityVersion : ${{ matrix.version }}
393403 customImage : editor:ubuntu-dev
@@ -404,9 +414,13 @@ jobs:
404414 # Set WebGL compression format to brotli
405415 sed -i -e 's/webGLCompressionFormat: .*$/webGLCompressionFormat: 0/' reference-project-test/ProjectSettings/ProjectSettings.asset
406416 - name : Build project (Brotli)
407- if : env.MODULE == 'webgl'
417+ if : env.MODULE == 'webgl' && github.base_ref == ''
408418 uses : game-ci/unity-builder@main
409419 timeout-minutes : 15
420+ env :
421+ UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
422+ UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
423+ UNITY_SERIAL : ${{ secrets.UNITY_SERIAL }}
410424 with :
411425 unityVersion : ${{ matrix.version }}
412426 customImage : editor:ubuntu-dev
@@ -420,6 +434,12 @@ jobs:
420434 - name : Test project
421435 timeout-minutes : 10
422436 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 }}
423443 with :
424444 unityVersion : ${{ matrix.version }}
425445 customImage : editor:ubuntu-dev
0 commit comments