99
1010 workflow_dispatch :
1111 inputs :
12+ packaged_sdk_run_id :
13+ description : ' run # of "Firebase Unity SDK build" workflow'
14+ default : ' 0'
15+ required : true
1216 unity_versions :
1317 description : ' Unity version'
1418 default : ' 2019'
2933 description : ' Run mobile tests on real and/or virtual devices? (separated by commas)'
3034 default : ' real,virtual'
3135 required : true
32- sdk_url :
33- description : ' Download unity sdk from this URL'
34- default : ' https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_8.7.0.zip'
35- required : true
3636 use_expanded_matrix :
3737 description : ' Use an expanded matrix? Note: above config will be ignored.'
3838 default : ' 0'
3939 required : true
40- test_packaged_sdk :
41- description : ' Optional: Packaging run # to build against? (sdk_url will be ignored.)'
4240 test_pull_request :
4341 description : ' Optional: Pull request # to build and test? (With optional commit hash, separated by a colon. Specify the FULL hash.)'
4442
@@ -215,12 +213,14 @@ jobs:
215213 steps :
216214 - uses : actions/checkout@v2
217215 - name : Install Unity installer (U3D)
218- timeout-minutes : 10
219- shell : bash
220- run : |
221- gem install u3d -v 1.2.3
222- u3d available
223- # u3d available -u ${{ matrix.unity_version }} -p
216+ uses : nick-invision/retry@v2
217+ with :
218+ timeout_minutes : 10
219+ max_attempts : 3
220+ shell : bash
221+ command : |
222+ gem install u3d -v 1.2.3
223+ u3d available
224224 - name : Setup python
225225 uses : actions/setup-python@v2
226226 with :
@@ -231,12 +231,15 @@ jobs:
231231 run : |
232232 pip install -r scripts/gha/requirements.txt
233233 - name : Install Unity
234- timeout-minutes : 30
235- shell : bash
236- run : |
237- python scripts/gha/unity_installer.py --install \
238- --platforms ${{ matrix.platform }} \
239- --version ${{ matrix.unity_version }}
234+ uses : nick-invision/retry@v2
235+ with :
236+ timeout_minutes : 30
237+ max_attempts : 3
238+ shell : bash
239+ command : |
240+ python scripts/gha/unity_installer.py --install \
241+ --platforms ${{ matrix.platform }} \
242+ --version ${{ matrix.unity_version }}
240243 - name : Activate Unity license
241244 timeout-minutes : 10
242245 shell : bash
@@ -254,26 +257,15 @@ jobs:
254257 python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
255258 - name : Fetch prebuilt packaged SDK from previous run
256259 uses : dawidd6/action-download-artifact@v2
257- if : ${{ github.event.inputs.test_packaged_sdk != '' }}
258260 with :
259261 name : ' firebase_unity_sdk.zip'
260- workflow : ' packaging.yml'
261- run_id : ${{ github.event.inputs.test_packaged_sdk }}
262-
262+ workflow : ' build_starter.yml'
263+ run_id : ${{ github.event.inputs.packaged_sdk_run_id }}
263264 - name : Build integration tests
265+ timeout-minutes : 180
264266 shell : bash
265267 run : |
266- if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then
267- unzip -q firebase_unity_sdk.zip -d ~/Downloads/
268- else
269- if [[ -z "${{ github.event.inputs.sdk_url }}" ]];then
270- sdk_url="https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_8.7.0.zip"
271- else
272- sdk_url=${{ github.event.inputs.sdk_url }}
273- fi
274- curl ${sdk_url} -o ~/Downloads/firebase_unity_sdk.zip
275- unzip -q ~/Downloads/firebase_unity_sdk.zip -d ~/Downloads/
276- fi
268+ unzip -q firebase_unity_sdk.zip -d ~/Downloads/
277269 python scripts/gha/build_testapps.py \
278270 --t ${{ needs.check_and_prepare.outputs.apis }} \
279271 --u $( python scripts/gha/print_matrix_configuration.py -k version -u ${{matrix.unity_version}}) \
@@ -411,12 +403,14 @@ jobs:
411403 steps :
412404 - uses : actions/checkout@v2
413405 - name : Install Unity installer (U3D)
414- timeout-minutes : 10
415- shell : bash
416- run : |
417- gem install u3d
418- u3d available
419- # u3d available -u ${{ matrix.unity_version }} -p
406+ uses : nick-invision/retry@v2
407+ with :
408+ timeout_minutes : 10
409+ max_attempts : 3
410+ shell : bash
411+ command : |
412+ gem install u3d
413+ u3d available
420414 - name : Setup python
421415 uses : actions/setup-python@v2
422416 with :
@@ -427,11 +421,14 @@ jobs:
427421 run : |
428422 pip install -r scripts/gha/requirements.txt
429423 - name : Install Unity
430- timeout-minutes : 30
431- shell : bash
432- run : |
433- python scripts/gha/unity_installer.py --install \
434- --version ${{ matrix.unity_version }}
424+ uses : nick-invision/retry@v2
425+ with :
426+ timeout_minutes : 15
427+ max_attempts : 3
428+ shell : bash
429+ command : |
430+ python scripts/gha/unity_installer.py --install \
431+ --version ${{ matrix.unity_version }}
435432 - name : Activate Unity license
436433 timeout-minutes : 10
437434 shell : bash
@@ -449,26 +446,14 @@ jobs:
449446 python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
450447 - name : Fetch prebuilt packaged SDK from previous run
451448 uses : dawidd6/action-download-artifact@v2
452- if : ${{ github.event.inputs.test_packaged_sdk != '' }}
453449 with :
454450 name : ' firebase_unity_sdk.zip'
455- workflow : ' packaging.yml'
456- run_id : ${{ github.event.inputs.test_packaged_sdk }}
457-
451+ workflow : ' build_starter.yml'
452+ run_id : ${{ github.event.inputs.packaged_sdk_run_id }}
458453 - name : Run Playmode (in editor mode) integration tests
459454 shell : bash
460455 run : |
461- if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then
462- unzip -q firebase_unity_sdk.zip -d ~/Downloads/
463- else
464- if [[ -z "${{ github.event.inputs.sdk_url }}" ]];then
465- sdk_url="https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_8.7.0.zip"
466- else
467- sdk_url=${{ github.event.inputs.sdk_url }}
468- fi
469- curl ${sdk_url} -o ~/Downloads/firebase_unity_sdk.zip
470- unzip -q ~/Downloads/firebase_unity_sdk.zip -d ~/Downloads/
471- fi
456+ unzip -q firebase_unity_sdk.zip -d ~/Downloads/
472457 python scripts/gha/build_testapps.py \
473458 --t ${{ needs.check_and_prepare.outputs.apis }} \
474459 --u $( python scripts/gha/print_matrix_configuration.py -k version -u ${{matrix.unity_version}}) \
0 commit comments