@@ -532,12 +532,14 @@ jobs:
532532 fi
533533
534534 build_ios :
535- name : build-ios-macos-latest
535+ name : build-ios-${{ matrix.os }}
536536 needs : [check_and_prepare]
537- runs-on : macos-12
537+ runs-on : ${{ matrix.os }}
538538 if : contains(needs.check_and_prepare.outputs.matrix_platform, 'iOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled() && !failure()
539539 strategy :
540540 fail-fast : false
541+ matrix :
542+ os : [macos-12]
541543 steps :
542544 - name : setup Xcode version (macos)
543545 if : runner.os == 'macOS'
@@ -599,30 +601,30 @@ jobs:
599601 --t ${{ needs.check_and_prepare.outputs.apis }} \
600602 --output_directory "${{ github.workspace }}" \
601603 --ios_sdk ${{ needs.check_and_prepare.outputs.mobile_test_on }} \
602- --artifact_name "ios-macos-12 " \
604+ --artifact_name "ios-${{ matrix.os }} " \
603605 --noadd_timestamp \
604606 --short_output_paths \
605607 ${additional_flags[*]}
606608 - name : Prepare results summary artifact
607609 if : ${{ !cancelled() }}
608610 shell : bash
609611 run : |
610- if [ ! -f build-results-ios-macos-12 .log.json ]; then
611- echo "__SUMMARY_MISSING__" > build-results-ios-macos-12 .log.json
612+ if [ ! -f build-results-ios-${{ matrix.os }} .log.json ]; then
613+ echo "__SUMMARY_MISSING__" > build-results-ios-${{ matrix.os }} .log.json
612614 fi
613615 - name : Upload iOS integration tests artifact
614616 uses : actions/upload-artifact@v3
615617 if : ${{ !cancelled() }}
616618 with :
617- name : testapps-ios-macos-12
618- path : testapps-ios-macos-12
619+ name : testapps-ios-${{ matrix.os }}
620+ path : testapps-ios-${{ matrix.os }}
619621 retention-days : ${{ env.artifactRetentionDays }}
620622 - name : Upload iOS build results artifact
621623 uses : actions/upload-artifact@v3
622624 if : ${{ !cancelled() }}
623625 with :
624626 name : log-artifact
625- path : build-results-ios-macos-12 *
627+ path : build-results-ios-${{ matrix.os }} *
626628 retention-days : ${{ env.artifactRetentionDays }}
627629 - name : Download log artifacts
628630 if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -643,18 +645,20 @@ jobs:
643645 if : ${{ !cancelled() }}
644646 shell : bash
645647 run : |
646- cat build-results-ios-macos-12 .log
648+ cat build-results-ios-${{ matrix.os }} .log
647649 if [[ "${{ job.status }}" != "success" ]]; then
648650 exit 1
649651 fi
650652
651653 build_tvos :
652- name : build-tvos-macos-latest
654+ name : build-tvos-${{ matrix.os }}
653655 needs : [check_and_prepare]
654- runs-on : macos-12
656+ runs-on : ${{ matrix.os }}
655657 if : contains(needs.check_and_prepare.outputs.matrix_platform, 'tvOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled() && !failure()
656658 strategy :
657659 fail-fast : false
660+ matrix :
661+ os : [macos-12]
658662 steps :
659663 - name : setup Xcode version (macos)
660664 if : runner.os == 'macOS'
@@ -715,30 +719,30 @@ jobs:
715719 python scripts/gha/build_testapps.py --p tvOS \
716720 --t ${{ needs.check_and_prepare.outputs.apis }} \
717721 --output_directory "${{ github.workspace }}" \
718- --artifact_name "tvos-macos-12 " \
722+ --artifact_name "tvos-${{ matrix.os }} " \
719723 --noadd_timestamp \
720724 --short_output_paths \
721725 ${additional_flags[*]}
722726 - name : Prepare results summary artifact
723727 if : ${{ !cancelled() }}
724728 shell : bash
725729 run : |
726- if [ ! -f build-results-tvos-macos-12 .log.json ]; then
727- echo "__SUMMARY_MISSING__" > build-results-tvos-macos-12 .log.json
730+ if [ ! -f build-results-tvos-${{ matrix.os }} .log.json ]; then
731+ echo "__SUMMARY_MISSING__" > build-results-tvos-${{ matrix.os }} .log.json
728732 fi
729733 - name : Upload tvOS integration tests artifact
730734 uses : actions/upload-artifact@v3
731735 if : ${{ !cancelled() }}
732736 with :
733- name : testapps-tvos-macos-12
734- path : testapps-tvos-macos-12
737+ name : testapps-tvos-${{ matrix.os }}
738+ path : testapps-tvos-${{ matrix.os }}
735739 retention-days : ${{ env.artifactRetentionDays }}
736740 - name : Upload tvOS build results artifact
737741 uses : actions/upload-artifact@v3
738742 if : ${{ !cancelled() }}
739743 with :
740744 name : log-artifact
741- path : build-results-tvos-macos-12 *
745+ path : build-results-tvos-${{ matrix.os }} *
742746 retention-days : ${{ env.artifactRetentionDays }}
743747 - name : Download log artifacts
744748 if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -759,7 +763,7 @@ jobs:
759763 if : ${{ !cancelled() }}
760764 shell : bash
761765 run : |
762- cat build-results-tvos-macos-12 .log
766+ cat build-results-tvos-${{ matrix.os }} .log
763767 if [[ "${{ job.status }}" != "success" ]]; then
764768 exit 1
765769 fi
@@ -784,7 +788,7 @@ jobs:
784788 - name : Download Desktop integration tests artifact
785789 uses : actions/download-artifact@v3
786790 with :
787- path : testapps
791+ path : testapps/testapps-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}
788792 name : testapps-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}
789793 - name : Setup python
790794 uses : actions/setup-python@v2
@@ -805,7 +809,7 @@ jobs:
805809 shell : bash
806810 command : |
807811 pip install -r scripts/gha/requirements.txt
808- python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps
812+ python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact " testapps/testapps-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}"
809813 - name : Run Desktop integration tests
810814 env :
811815 USE_FIRESTORE_EMULATOR : true
@@ -875,7 +879,7 @@ jobs:
875879 - name : Download Android integration tests artifact
876880 uses : actions/download-artifact@v3
877881 with :
878- path : testapps
882+ path : testapps/testapps-android-${{ matrix.build_os }}
879883 name : testapps-android-${{ matrix.build_os }}
880884 - name : Setup python
881885 uses : actions/setup-python@v2
@@ -961,14 +965,15 @@ jobs:
961965 fi
962966
963967 test_ios :
964- name : test-ios-macos-latest -${{ matrix.ios_device }}
968+ name : test-ios-${{ matrix.build_os }} -${{ matrix.ios_device }}
965969 needs : [check_and_prepare, build_ios]
966970 runs-on : macos-12
967971 if : contains(needs.check_and_prepare.outputs.matrix_platform, 'iOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled()
968972 strategy :
969973 fail-fast : false
970974 matrix :
971975 ios_device : ${{ fromJson(needs.check_and_prepare.outputs.ios_device) }}
976+ build_os : [macos-12]
972977 steps :
973978 - name : setup Xcode version (macos)
974979 if : runner.os == 'macOS'
@@ -979,8 +984,8 @@ jobs:
979984 - name : Download iOS integration tests artifact
980985 uses : actions/download-artifact@v3
981986 with :
982- path : testapps
983- name : testapps-ios-macos-12
987+ path : testapps/testapps-ios-${{ matrix.build_os }}
988+ name : testapps-ios-${{ matrix.build_os }}
984989 - name : Setup python
985990 uses : actions/setup-python@v2
986991 with :
@@ -1009,7 +1014,7 @@ jobs:
10091014 run : |
10101015 python scripts/gha/test_simulator.py --testapp_dir testapps \
10111016 --ios_device "${{ matrix.ios_device }}" \
1012- --logfile_name "ios-macos-12 -${{ matrix.ios_device }}" \
1017+ --logfile_name "ios-${{ matrix.build_os }} -${{ matrix.ios_device }}" \
10131018 --ci
10141019 - name : Install Cloud SDK
10151020 if : steps.get-device-type.outputs.device_type == 'real'
@@ -1022,23 +1027,23 @@ jobs:
10221027 python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
10231028 python scripts/gha/test_lab.py --testapp_dir testapps \
10241029 --ios_device "${{ matrix.ios_device }}" \
1025- --logfile_name "ios-macos-12 -${{ matrix.ios_device }}" \
1030+ --logfile_name "ios-${{ matrix.build_os }} -${{ matrix.ios_device }}" \
10261031 --code_platform cpp \
10271032 --key_file scripts/gha-encrypted/gcs_key_file.json
10281033 - name : Prepare results summary artifact
10291034 if : ${{ !cancelled() }}
10301035 shell : bash
10311036 run : |
10321037 # If testapps do not exist, then it's a build error not test error.
1033- if [ -d "testapps/testapps-ios-macos-12 " && ! -f "testapps/test-results-ios-macos-12 -${{ matrix.ios_device }}.log.json" ]; then
1034- mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-ios-macos-12 -${{ matrix.ios_device }}.log.json"
1038+ if [ -d "testapps/testapps-ios-${{ matrix.build_os }} " && ! -f "testapps/test-results-ios-${{ matrix.build_os }} -${{ matrix.ios_device }}.log.json" ]; then
1039+ mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-ios-${{ matrix.build_os }} -${{ matrix.ios_device }}.log.json"
10351040 fi
10361041 - name : Upload iOS test results artifact
10371042 if : ${{ !cancelled() }}
10381043 uses : actions/upload-artifact@v3
10391044 with :
10401045 name : log-artifact
1041- path : testapps/test-results-ios-macos-12 -${{ matrix.ios_device }}*
1046+ path : testapps/test-results-ios-${{ matrix.build_os }} -${{ matrix.ios_device }}*
10421047 retention-days : ${{ env.artifactRetentionDays }}
10431048 - name : Download log artifacts
10441049 if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -1059,20 +1064,21 @@ jobs:
10591064 if : ${{ !cancelled() }}
10601065 shell : bash
10611066 run : |
1062- cat "testapps/test-results-ios-macos-12 -${{ matrix.ios_device }}.log"
1067+ cat "testapps/test-results-ios-${{ matrix.build_os }} -${{ matrix.ios_device }}.log"
10631068 if [[ "${{ job.status }}" != "success" ]]; then
10641069 exit 1
10651070 fi
10661071
10671072 test_tvos :
1068- name : test-tvos-macos-latest -${{ matrix.tvos_device }}
1073+ name : test-tvos-${{ matrix.build_os }} -${{ matrix.tvos_device }}
10691074 needs : [check_and_prepare, build_tvos]
10701075 runs-on : macos-12
10711076 if : contains(needs.check_and_prepare.outputs.matrix_platform, 'tvOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled()
10721077 strategy :
10731078 fail-fast : false
10741079 matrix :
10751080 tvos_device : ${{ fromJson(needs.check_and_prepare.outputs.tvos_device) }}
1081+ build_os : [macos-12]
10761082 steps :
10771083 - name : setup Xcode version (macos)
10781084 if : runner.os == 'macOS'
@@ -1083,8 +1089,8 @@ jobs:
10831089 - name : Download tvOS integration tests artifact
10841090 uses : actions/download-artifact@v3
10851091 with :
1086- path : testapps
1087- name : testapps-tvos-macos-12
1092+ path : testapps/testapps-tvos-${{ matrix.build_os }}
1093+ name : testapps-tvos-${{ matrix.build_os }}
10881094 - name : Setup python
10891095 uses : actions/setup-python@v2
10901096 with :
@@ -1105,22 +1111,22 @@ jobs:
11051111 run : |
11061112 python scripts/gha/test_simulator.py --testapp_dir testapps \
11071113 --tvos_device "${{ matrix.tvos_device }}" \
1108- --logfile_name "tvos-macos-12 -${{ matrix.tvos_device }}" \
1114+ --logfile_name "tvos-${{ matrix.build_os }} -${{ matrix.tvos_device }}" \
11091115 --ci
11101116 - name : Prepare results summary artifact
11111117 if : ${{ !cancelled() }}
11121118 shell : bash
11131119 run : |
11141120 # If testapps do not exist, then it's a build error not test error.
1115- if [ -d "testapps/testapps-tvos-macos-12 " && ! -f "testapps/test-results-tvos-macos-12 -${{ matrix.tvos_device }}.log.json" ]; then
1116- mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-tvos-macos-12 -${{ matrix.tvos_device }}.log.json"
1121+ if [ -d "testapps/testapps-tvos-${{ matrix.build_os }} " && ! -f "testapps/test-results-tvos-${{ matrix.build_os }} -${{ matrix.tvos_device }}.log.json" ]; then
1122+ mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-tvos-${{ matrix.build_os }} -${{ matrix.tvos_device }}.log.json"
11171123 fi
11181124 - name : Upload tvOS test results artifact
11191125 if : ${{ !cancelled() }}
11201126 uses : actions/upload-artifact@v3
11211127 with :
11221128 name : log-artifact
1123- path : testapps/test-results-tvos-macos-12 -${{ matrix.tvos_device }}*
1129+ path : testapps/test-results-tvos-${{ matrix.build_os }} -${{ matrix.tvos_device }}*
11241130 retention-days : ${{ env.artifactRetentionDays }}
11251131 - name : Download log artifacts
11261132 if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -1141,7 +1147,7 @@ jobs:
11411147 if : ${{ !cancelled() }}
11421148 shell : bash
11431149 run : |
1144- cat "testapps/test-results-tvos-macos-12 -${{ matrix.tvos_device }}.log"
1150+ cat "testapps/test-results-tvos-${{ matrix.build_os }} -${{ matrix.tvos_device }}.log"
11451151 if [[ "${{ job.status }}" != "success" ]]; then
11461152 exit 1
11471153 fi
0 commit comments