55 workflow_dispatch :
66 inputs :
77 packaged_sdk_run_id :
8- description : ' run # of "Firebase Unity SDK build" workflow'
9- default : ' 0'
10- required : true
8+ description : ' run # of "Firebase Unity SDK build" workflow. (If Leave it empty, the latest released Unity SDK will be used.)'
119 unity_versions :
1210 description : ' Unity version'
1311 default : ' 2019'
@@ -194,15 +192,16 @@ jobs:
194192 U3D_SKIP_UPDATE_CHECK : 1
195193 steps :
196194 - uses : actions/checkout@v2
195+ - uses : ruby/setup-ruby@v1
196+ with :
197+ ruby-version : 3.0.2
197198 - name : Install Unity installer (U3D)
198199 uses : nick-invision/retry@v2
199200 with :
200201 timeout_minutes : 10
201202 max_attempts : 3
202203 shell : bash
203- command : |
204- gem install u3d -v 1.2.3
205- u3d available
204+ command : gem install u3d -v 1.2.3
206205 - name : Setup python
207206 uses : actions/setup-python@v2
208207 with :
@@ -218,7 +217,7 @@ jobs:
218217 timeout_minutes : 30
219218 max_attempts : 3
220219 shell : bash
221- command : |
220+ command : |
222221 python scripts/gha/unity_installer.py --install \
223222 --platforms ${{ matrix.platform }} \
224223 --version ${{ matrix.unity_version }}
@@ -238,6 +237,7 @@ jobs:
238237 run : |
239238 python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
240239 - name : Fetch prebuilt packaged SDK from previous run
240+ if : ${{ github.event.inputs.packaged_sdk_run_id != '' }}
241241 uses : dawidd6/action-download-artifact@v2
242242 with :
243243 name : ' firebase_unity_sdk.zip'
@@ -247,7 +247,12 @@ jobs:
247247 timeout-minutes : 240
248248 shell : bash
249249 run : |
250- unzip -q firebase_unity_sdk.zip -d ~/Downloads/
250+ if [[ -n "${{ github.event.inputs.packaged_sdk_run_id }}" ]]; then
251+ unzip -q firebase_unity_sdk.zip -d ~/Downloads/
252+ else
253+ curl -L "https://firebase.google.com/download/unity" -o ~/Downloads/firebase_unity_sdk.zip
254+ unzip -q ~/Downloads/firebase_unity_sdk.zip -d ~/Downloads/
255+ fi
251256 python scripts/gha/build_testapps.py \
252257 --t ${{ needs.check_and_prepare.outputs.apis }} \
253258 --u $( python scripts/gha/print_matrix_configuration.py -k version -u ${{matrix.unity_version}}) \
@@ -382,17 +387,20 @@ jobs:
382387 LC_ALL : en_US.UTF-8
383388 LANG : en_US.UTF-8
384389 U3D_PASSWORD : " "
390+ # Disable checking for U3D updates, since it is buggy
391+ U3D_SKIP_UPDATE_CHECK : 1
385392 steps :
386393 - uses : actions/checkout@v2
394+ - uses : ruby/setup-ruby@v1
395+ with :
396+ ruby-version : 3.0.2
387397 - name : Install Unity installer (U3D)
388398 uses : nick-invision/retry@v2
389399 with :
390400 timeout_minutes : 10
391401 max_attempts : 3
392402 shell : bash
393- command : |
394- gem install u3d
395- u3d available
403+ command : gem install u3d -v 1.2.3
396404 - name : Setup python
397405 uses : actions/setup-python@v2
398406 with :
@@ -405,10 +413,10 @@ jobs:
405413 - name : Install Unity
406414 uses : nick-invision/retry@v2
407415 with :
408- timeout_minutes : 15
416+ timeout_minutes : 20
409417 max_attempts : 3
410418 shell : bash
411- command : |
419+ command : |
412420 python scripts/gha/unity_installer.py --install \
413421 --version ${{ matrix.unity_version }}
414422 - name : Activate Unity license
@@ -427,15 +435,21 @@ jobs:
427435 run : |
428436 python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
429437 - name : Fetch prebuilt packaged SDK from previous run
438+ if : ${{ github.event.inputs.packaged_sdk_run_id != '' }}
430439 uses : dawidd6/action-download-artifact@v2
431440 with :
432441 name : ' firebase_unity_sdk.zip'
433442 workflow : ' build_starter.yml'
434- run_id : ${{ github.event.inputs.packaged_sdk_run_id }}
443+ run_id : ${{ github.event.inputs.packaged_sdk_run_id }}
435444 - name : Run Playmode (in editor mode) integration tests
436445 shell : bash
437446 run : |
438- unzip -q firebase_unity_sdk.zip -d ~/Downloads/
447+ if [[ -n "${{ github.event.inputs.packaged_sdk_run_id }}" ]]; then
448+ unzip -q firebase_unity_sdk.zip -d ~/Downloads/
449+ else
450+ curl -L "https://firebase.google.com/download/unity" -o ~/Downloads/firebase_unity_sdk.zip
451+ unzip -q ~/Downloads/firebase_unity_sdk.zip -d ~/Downloads/
452+ fi
439453 python scripts/gha/build_testapps.py \
440454 --t ${{ needs.check_and_prepare.outputs.apis }} \
441455 --u $( python scripts/gha/print_matrix_configuration.py -k version -u ${{matrix.unity_version}}) \
0 commit comments