62
62
apis : ${{ steps.matrix_config.outputs.apis }}
63
63
mobile_test_on : ${{ steps.matrix_config.outputs.mobile_test_on }}
64
64
android_device : ${{ steps.matrix_config.outputs.android_device }}
65
+ xcode_version : ${{ steps.matrix_config.outputs.xcode_version }}
65
66
ios_device : ${{ steps.matrix_config.outputs.ios_device }}
66
67
tvos_device : ${{ steps.matrix_config.outputs.tvos_device }}
67
68
steps :
@@ -144,7 +145,12 @@ jobs:
144
145
with :
145
146
python-version : ${{ env.pythonVersion }}
146
147
- name : Install python deps
147
- run : pip install -r scripts/gha/requirements.txt
148
+ uses : nick-invision/retry@v2
149
+ with :
150
+ timeout_minutes : 1
151
+ max_attempts : 3
152
+ shell : bash
153
+ command : pip install -r scripts/gha/requirements.txt
148
154
- id : matrix_config
149
155
run : |
150
156
if [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "expanded" ]]; then
@@ -182,6 +188,7 @@ jobs:
182
188
mobile_test_on=$( python scripts/gha/print_matrix_configuration.py -c -w integration_tests -k mobile_test_on -o "${{github.event.inputs.mobile_test_on}}")
183
189
echo "::set-output name=mobile_test_on::${mobile_test_on}"
184
190
echo "::set-output name=android_device::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k android_device -t ${mobile_test_on} )"
191
+ echo "::set-output name=xcode_version::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k xcode_version)"
185
192
echo "::set-output name=ios_device::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k ios_device -t ${mobile_test_on} )"
186
193
echo "::set-output name=tvos_device::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k tvos_device -t ${mobile_test_on} )"
187
194
- name : Update PR label and comment
@@ -208,6 +215,9 @@ jobs:
208
215
os : ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }}
209
216
ssl_variant : ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }}
210
217
steps :
218
+ - name : setup Xcode version (macos)
219
+ if : runner.os == 'macOS'
220
+ run : sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer
211
221
- uses : actions/checkout@v2
212
222
with :
213
223
ref : ${{needs.check_and_prepare.outputs.github_ref}}
@@ -255,30 +265,40 @@ jobs:
255
265
# homebrew. This prevents errors arising from the shut down of
256
266
# binutils, used by older version of homebrew for hosting packages.
257
267
brew update
258
- - name : Install SDK Desktop prerequisites
259
- run : |
260
- python scripts/gha/install_prereqs_desktop.py
261
- - name : Prepare for integration tests
262
- run : |
263
- pip install -r scripts/gha/requirements.txt
264
- python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
268
+ - name : Install Desktop SDK & integration tests prerequisites
269
+ uses : nick-invision/retry@v2
270
+ with :
271
+ timeout_minutes : 2
272
+ max_attempts : 3
273
+ command : |
274
+ python scripts/gha/install_prereqs_desktop.py
275
+ pip install -r scripts/gha/requirements.txt
276
+ python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
265
277
- name : Install OpenSSL (Windows)
266
- if : matrix.ssl_variant == 'openssl' &&
267
- startsWith(matrix.os, 'windows')
268
- run : |
269
- choco install openssl -r
278
+ if : matrix.ssl_variant == 'openssl' && startsWith(matrix.os, 'windows')
279
+ uses : nick-invision/retry@v2
280
+ with :
281
+ timeout_minutes : 4
282
+ max_attempts : 3
283
+ shell : bash
284
+ command : choco install openssl -r
270
285
- name : Install OpenSSL (macOS)
271
- if : matrix.ssl_variant == 'openssl' &&
272
- startsWith(matrix.os, 'macos')
273
- run : |
274
- brew install openssl
275
- # brew won't overwrite MacOS system default OpenSSL, so force it here.
276
- echo "OPENSSL_ROOT_DIR=/usr/local/opt/[email protected] " >> $GITHUB_ENV
286
+ if : matrix.ssl_variant == 'openssl' && startsWith(matrix.os, 'macos')
287
+ uses : nick-invision/retry@v2
288
+ with :
289
+ timeout_minutes : 2
290
+ max_attempts : 3
291
+ command : |
292
+ brew install openssl
293
+ # brew won't overwrite MacOS system default OpenSSL, so force it here.
294
+ echo "OPENSSL_ROOT_DIR=/usr/local/opt/[email protected] " >> $GITHUB_ENV
277
295
- name : Install OpenSSL (Linux)
278
- if : matrix.ssl_variant == 'openssl' &&
279
- startsWith(matrix.os, 'ubuntu')
280
- run : |
281
- sudo apt install openssl
296
+ if : matrix.ssl_variant == 'openssl' && startsWith(matrix.os, 'ubuntu')
297
+ uses : nick-invision/retry@v2
298
+ with :
299
+ timeout_minutes : 2
300
+ max_attempts : 3
301
+ command : sudo apt install openssl
282
302
- name : Fetch prebuilt packaged SDK from previous run
283
303
uses : dawidd6/action-download-artifact@v2
284
304
if : ${{ github.event.inputs.test_packaged_sdk != '' }}
@@ -387,6 +407,9 @@ jobs:
387
407
matrix :
388
408
os : ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }}
389
409
steps :
410
+ - name : setup Xcode version (macos)
411
+ if : runner.os == 'macOS'
412
+ run : sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer
390
413
- uses : actions/checkout@v2
391
414
with :
392
415
ref : ${{needs.check_and_prepare.outputs.github_ref}}
@@ -421,14 +444,16 @@ jobs:
421
444
# homebrew. This prevents errors arising from the shut down of
422
445
# binutils, used by older version of homebrew for hosting packages.
423
446
brew update
424
- - name : Install SDK Android prerequisites
425
- shell : bash
426
- run : |
427
- build_scripts/android/install_prereqs.sh
428
- - name : Prepare for integration tests
429
- run : |
430
- pip install -r scripts/gha/requirements.txt
431
- python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
447
+ - name : Install Android SDK & integration tests prerequisites
448
+ uses : nick-invision/retry@v2
449
+ with :
450
+ timeout_minutes : 10
451
+ max_attempts : 3
452
+ shell : bash
453
+ command : |
454
+ build_scripts/android/install_prereqs.sh
455
+ pip install -r scripts/gha/requirements.txt
456
+ python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
432
457
- name : Fetch prebuilt packaged SDK from previous run
433
458
uses : dawidd6/action-download-artifact@v2
434
459
if : ${{ github.event.inputs.test_packaged_sdk != '' }}
@@ -508,6 +533,9 @@ jobs:
508
533
strategy :
509
534
fail-fast : false
510
535
steps :
536
+ - name : setup Xcode version (macos)
537
+ if : runner.os == 'macOS'
538
+ run : sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer
511
539
- uses : actions/checkout@v2
512
540
with :
513
541
ref : ${{needs.check_and_prepare.outputs.github_ref}}
@@ -533,12 +561,15 @@ jobs:
533
561
# homebrew. This prevents errors arising from the shut down of
534
562
# binutils, used by older version of homebrew for hosting packages.
535
563
brew update
536
- - name : Install SDK iOS prerequisites
537
- run : build_scripts/ios/install_prereqs.sh
538
- - name : Prepare for integration tests
539
- run : |
540
- pip install -r scripts/gha/requirements.txt
541
- python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
564
+ - name : Install iOS SDK & integration tests prerequisites
565
+ uses : nick-invision/retry@v2
566
+ with :
567
+ timeout_minutes : 2
568
+ max_attempts : 3
569
+ command : |
570
+ build_scripts/ios/install_prereqs.sh
571
+ pip install -r scripts/gha/requirements.txt
572
+ python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
542
573
- name : Fetch prebuilt packaged SDK from previous run
543
574
uses : dawidd6/action-download-artifact@v2
544
575
if : ${{ github.event.inputs.test_packaged_sdk != '' }}
@@ -619,6 +650,9 @@ jobs:
619
650
strategy :
620
651
fail-fast : false
621
652
steps :
653
+ - name : setup Xcode version (macos)
654
+ if : runner.os == 'macOS'
655
+ run : sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer
622
656
- uses : actions/checkout@v2
623
657
with :
624
658
ref : ${{needs.check_and_prepare.outputs.github_ref}}
@@ -638,12 +672,15 @@ jobs:
638
672
# homebrew. This prevents errors arising from the shut down of
639
673
# binutils, used by older version of homebrew for hosting packages.
640
674
brew update
641
- - name : Install SDK tvOS prerequisites
642
- run : build_scripts/tvos/install_prereqs.sh
643
- - name : Prepare for integration tests
644
- run : |
645
- pip install -r scripts/gha/requirements.txt
646
- python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
675
+ - name : Install tvOS SDK & integration tests prerequisites
676
+ uses : nick-invision/retry@v2
677
+ with :
678
+ timeout_minutes : 2
679
+ max_attempts : 3
680
+ command : |
681
+ build_scripts/tvos/install_prereqs.sh
682
+ pip install -r scripts/gha/requirements.txt
683
+ python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
647
684
- name : Fetch prebuilt packaged SDK from previous run
648
685
uses : dawidd6/action-download-artifact@v2
649
686
if : ${{ github.event.inputs.test_packaged_sdk != '' }}
@@ -726,6 +763,9 @@ jobs:
726
763
os : ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }}
727
764
ssl_variant : ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }}
728
765
steps :
766
+ - name : setup Xcode version (macos)
767
+ if : runner.os == 'macOS'
768
+ run : sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer
729
769
- uses : actions/checkout@v2
730
770
with :
731
771
ref : ${{needs.check_and_prepare.outputs.github_ref}}
@@ -746,9 +786,14 @@ jobs:
746
786
run : |
747
787
npm install -g firebase-tools
748
788
- name : Setup integration test deps
749
- run : |
750
- pip install -r scripts/gha/requirements.txt
751
- python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps
789
+ uses : nick-invision/retry@v2
790
+ with :
791
+ timeout_minutes : 2
792
+ max_attempts : 3
793
+ shell : bash
794
+ command : |
795
+ pip install -r scripts/gha/requirements.txt
796
+ python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps
752
797
- name : Run Desktop integration tests
753
798
run : firebase emulators:exec --only firestore --project demo-example 'python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}"'
754
799
env :
@@ -802,6 +847,9 @@ jobs:
802
847
build_os : ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }}
803
848
android_device : ${{ fromJson(needs.check_and_prepare.outputs.android_device) }}
804
849
steps :
850
+ - name : setup Xcode version (macos)
851
+ if : runner.os == 'macOS'
852
+ run : sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer
805
853
- uses : actions/checkout@v2
806
854
with :
807
855
ref : ${{needs.check_and_prepare.outputs.github_ref}}
@@ -815,7 +863,12 @@ jobs:
815
863
with :
816
864
python-version : ${{ env.pythonVersion }}
817
865
- name : Install python deps
818
- run : pip install -r scripts/gha/requirements.txt
866
+ uses : nick-invision/retry@v2
867
+ with :
868
+ timeout_minutes : 1
869
+ max_attempts : 3
870
+ shell : bash
871
+ command : pip install -r scripts/gha/requirements.txt
819
872
- id : get-device-type
820
873
run : |
821
874
echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -d -k ${{ matrix.android_device }} )"
@@ -840,6 +893,7 @@ jobs:
840
893
if : steps.get-device-type.outputs.device_type == 'real'
841
894
uses : google-github-actions/setup-gcloud@master
842
895
- name : Run Android integration tests on Real Device via FTL
896
+ timeout-minutes : 60
843
897
if : steps.get-device-type.outputs.device_type == 'real'
844
898
run : |
845
899
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
@@ -896,6 +950,9 @@ jobs:
896
950
matrix :
897
951
ios_device : ${{ fromJson(needs.check_and_prepare.outputs.ios_device) }}
898
952
steps :
953
+ - name : setup Xcode version (macos)
954
+ if : runner.os == 'macOS'
955
+ run : sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer
899
956
- uses : actions/checkout@v2
900
957
with :
901
958
ref : ${{needs.check_and_prepare.outputs.github_ref}}
@@ -909,7 +966,11 @@ jobs:
909
966
with :
910
967
python-version : ${{ env.pythonVersion }}
911
968
- name : Install python deps
912
- run : pip install -r scripts/gha/requirements.txt
969
+ uses : nick-invision/retry@v2
970
+ with :
971
+ timeout_minutes : 1
972
+ max_attempts : 3
973
+ command : pip install -r scripts/gha/requirements.txt
913
974
- id : get-device-type
914
975
run : |
915
976
echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -d -k ${{ matrix.ios_device }} )"
@@ -934,6 +995,8 @@ jobs:
934
995
if : steps.get-device-type.outputs.device_type == 'real'
935
996
uses : google-github-actions/setup-gcloud@master
936
997
- name : Run iOS integration tests on Real Device via FTL
998
+ # max 3 retry and 10m timeout for each testapp, plus other steps
999
+ timeout-minutes : 60
937
1000
if : steps.get-device-type.outputs.device_type == 'real'
938
1001
run : |
939
1002
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
@@ -990,6 +1053,9 @@ jobs:
990
1053
matrix :
991
1054
tvos_device : ${{ fromJson(needs.check_and_prepare.outputs.tvos_device) }}
992
1055
steps :
1056
+ - name : setup Xcode version (macos)
1057
+ if : runner.os == 'macOS'
1058
+ run : sudo xcode-select -s /Applications/Xcode_${{ fromJson(needs.check_and_prepare.outputs.xcode_version)[0] }}.app/Contents/Developer
993
1059
- uses : actions/checkout@v2
994
1060
with :
995
1061
ref : ${{needs.check_and_prepare.outputs.github_ref}}
@@ -1003,7 +1069,11 @@ jobs:
1003
1069
with :
1004
1070
python-version : ${{ env.pythonVersion }}
1005
1071
- name : Install python deps
1006
- run : pip install -r scripts/gha/requirements.txt
1072
+ uses : nick-invision/retry@v2
1073
+ with :
1074
+ timeout_minutes : 1
1075
+ max_attempts : 3
1076
+ command : pip install -r scripts/gha/requirements.txt
1007
1077
- name : Setup Firebase Emulators
1008
1078
run : |
1009
1079
npm install -g firebase-tools
0 commit comments