@@ -532,12 +532,14 @@ jobs:
532
532
fi
533
533
534
534
build_ios :
535
- name : build-ios-macos-latest
535
+ name : build-ios-${{ matrix.os }}
536
536
needs : [check_and_prepare]
537
- runs-on : macos-12
537
+ runs-on : ${{ matrix.os }}
538
538
if : contains(needs.check_and_prepare.outputs.matrix_platform, 'iOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled() && !failure()
539
539
strategy :
540
540
fail-fast : false
541
+ matrix :
542
+ os : macos-12
541
543
steps :
542
544
- name : setup Xcode version (macos)
543
545
if : runner.os == 'macOS'
@@ -599,30 +601,30 @@ jobs:
599
601
--t ${{ needs.check_and_prepare.outputs.apis }} \
600
602
--output_directory "${{ github.workspace }}" \
601
603
--ios_sdk ${{ needs.check_and_prepare.outputs.mobile_test_on }} \
602
- --artifact_name "ios-macos-12 " \
604
+ --artifact_name "ios-${{ matrix.os }} " \
603
605
--noadd_timestamp \
604
606
--short_output_paths \
605
607
${additional_flags[*]}
606
608
- name : Prepare results summary artifact
607
609
if : ${{ !cancelled() }}
608
610
shell : bash
609
611
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
612
614
fi
613
615
- name : Upload iOS integration tests artifact
614
616
uses : actions/upload-artifact@v3
615
617
if : ${{ !cancelled() }}
616
618
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 }}
619
621
retention-days : ${{ env.artifactRetentionDays }}
620
622
- name : Upload iOS build results artifact
621
623
uses : actions/upload-artifact@v3
622
624
if : ${{ !cancelled() }}
623
625
with :
624
626
name : log-artifact
625
- path : build-results-ios-macos-12 *
627
+ path : build-results-ios-${{ matrix.os }} *
626
628
retention-days : ${{ env.artifactRetentionDays }}
627
629
- name : Download log artifacts
628
630
if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -643,18 +645,20 @@ jobs:
643
645
if : ${{ !cancelled() }}
644
646
shell : bash
645
647
run : |
646
- cat build-results-ios-macos-12 .log
648
+ cat build-results-ios-${{ matrix.os }} .log
647
649
if [[ "${{ job.status }}" != "success" ]]; then
648
650
exit 1
649
651
fi
650
652
651
653
build_tvos :
652
- name : build-tvos-macos-latest
654
+ name : build-tvos-${{ matrix.os }}
653
655
needs : [check_and_prepare]
654
- runs-on : macos-12
656
+ runs-on : ${{ matrix.os }}
655
657
if : contains(needs.check_and_prepare.outputs.matrix_platform, 'tvOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled() && !failure()
656
658
strategy :
657
659
fail-fast : false
660
+ matrix :
661
+ os : macos-12
658
662
steps :
659
663
- name : setup Xcode version (macos)
660
664
if : runner.os == 'macOS'
@@ -715,30 +719,30 @@ jobs:
715
719
python scripts/gha/build_testapps.py --p tvOS \
716
720
--t ${{ needs.check_and_prepare.outputs.apis }} \
717
721
--output_directory "${{ github.workspace }}" \
718
- --artifact_name "tvos-macos-12 " \
722
+ --artifact_name "tvos-${{ matrix.os }} " \
719
723
--noadd_timestamp \
720
724
--short_output_paths \
721
725
${additional_flags[*]}
722
726
- name : Prepare results summary artifact
723
727
if : ${{ !cancelled() }}
724
728
shell : bash
725
729
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
728
732
fi
729
733
- name : Upload tvOS integration tests artifact
730
734
uses : actions/upload-artifact@v3
731
735
if : ${{ !cancelled() }}
732
736
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 }}
735
739
retention-days : ${{ env.artifactRetentionDays }}
736
740
- name : Upload tvOS build results artifact
737
741
uses : actions/upload-artifact@v3
738
742
if : ${{ !cancelled() }}
739
743
with :
740
744
name : log-artifact
741
- path : build-results-tvos-macos-12 *
745
+ path : build-results-tvos-${{ matrix.os }} *
742
746
retention-days : ${{ env.artifactRetentionDays }}
743
747
- name : Download log artifacts
744
748
if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -759,7 +763,7 @@ jobs:
759
763
if : ${{ !cancelled() }}
760
764
shell : bash
761
765
run : |
762
- cat build-results-tvos-macos-12 .log
766
+ cat build-results-tvos-${{ matrix.os }} .log
763
767
if [[ "${{ job.status }}" != "success" ]]; then
764
768
exit 1
765
769
fi
@@ -961,14 +965,15 @@ jobs:
961
965
fi
962
966
963
967
test_ios :
964
- name : test-ios-macos-latest -${{ matrix.ios_device }}
968
+ name : test-ios-${{ matrix.build_os }} -${{ matrix.ios_device }}
965
969
needs : [check_and_prepare, build_ios]
966
970
runs-on : macos-12
967
971
if : contains(needs.check_and_prepare.outputs.matrix_platform, 'iOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled()
968
972
strategy :
969
973
fail-fast : false
970
974
matrix :
971
975
ios_device : ${{ fromJson(needs.check_and_prepare.outputs.ios_device) }}
976
+ build_os : [macos-12]
972
977
steps :
973
978
- name : setup Xcode version (macos)
974
979
if : runner.os == 'macOS'
@@ -980,7 +985,7 @@ jobs:
980
985
uses : actions/download-artifact@v3
981
986
with :
982
987
path : testapps
983
- name : testapps-ios-macos-12
988
+ name : testapps-ios-${{ matrix.build_os }}
984
989
- name : Setup python
985
990
uses : actions/setup-python@v2
986
991
with :
@@ -1009,7 +1014,7 @@ jobs:
1009
1014
run : |
1010
1015
python scripts/gha/test_simulator.py --testapp_dir testapps \
1011
1016
--ios_device "${{ matrix.ios_device }}" \
1012
- --logfile_name "ios-macos-12 -${{ matrix.ios_device }}" \
1017
+ --logfile_name "ios-${{ matrix.build_os }} -${{ matrix.ios_device }}" \
1013
1018
--ci
1014
1019
- name : Install Cloud SDK
1015
1020
if : steps.get-device-type.outputs.device_type == 'real'
@@ -1022,23 +1027,23 @@ jobs:
1022
1027
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
1023
1028
python scripts/gha/test_lab.py --testapp_dir testapps \
1024
1029
--ios_device "${{ matrix.ios_device }}" \
1025
- --logfile_name "ios-macos-12 -${{ matrix.ios_device }}" \
1030
+ --logfile_name "ios-${{ matrix.build_os }} -${{ matrix.ios_device }}" \
1026
1031
--code_platform cpp \
1027
1032
--key_file scripts/gha-encrypted/gcs_key_file.json
1028
1033
- name : Prepare results summary artifact
1029
1034
if : ${{ !cancelled() }}
1030
1035
shell : bash
1031
1036
run : |
1032
1037
# 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"
1035
1040
fi
1036
1041
- name : Upload iOS test results artifact
1037
1042
if : ${{ !cancelled() }}
1038
1043
uses : actions/upload-artifact@v3
1039
1044
with :
1040
1045
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 }}*
1042
1047
retention-days : ${{ env.artifactRetentionDays }}
1043
1048
- name : Download log artifacts
1044
1049
if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -1059,20 +1064,21 @@ jobs:
1059
1064
if : ${{ !cancelled() }}
1060
1065
shell : bash
1061
1066
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"
1063
1068
if [[ "${{ job.status }}" != "success" ]]; then
1064
1069
exit 1
1065
1070
fi
1066
1071
1067
1072
test_tvos :
1068
- name : test-tvos-macos-latest -${{ matrix.tvos_device }}
1073
+ name : test-tvos-${{ matrix.build_os }} -${{ matrix.tvos_device }}
1069
1074
needs : [check_and_prepare, build_tvos]
1070
1075
runs-on : macos-12
1071
1076
if : contains(needs.check_and_prepare.outputs.matrix_platform, 'tvOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled()
1072
1077
strategy :
1073
1078
fail-fast : false
1074
1079
matrix :
1075
1080
tvos_device : ${{ fromJson(needs.check_and_prepare.outputs.tvos_device) }}
1081
+ build_os : [macos-12]
1076
1082
steps :
1077
1083
- name : setup Xcode version (macos)
1078
1084
if : runner.os == 'macOS'
@@ -1084,7 +1090,7 @@ jobs:
1084
1090
uses : actions/download-artifact@v3
1085
1091
with :
1086
1092
path : testapps
1087
- name : testapps-tvos-macos-12
1093
+ name : testapps-tvos-${{ matrix.build_os }}
1088
1094
- name : Setup python
1089
1095
uses : actions/setup-python@v2
1090
1096
with :
@@ -1105,22 +1111,22 @@ jobs:
1105
1111
run : |
1106
1112
python scripts/gha/test_simulator.py --testapp_dir testapps \
1107
1113
--tvos_device "${{ matrix.tvos_device }}" \
1108
- --logfile_name "tvos-macos-12 -${{ matrix.tvos_device }}" \
1114
+ --logfile_name "tvos-${{ matrix.build_os }} -${{ matrix.tvos_device }}" \
1109
1115
--ci
1110
1116
- name : Prepare results summary artifact
1111
1117
if : ${{ !cancelled() }}
1112
1118
shell : bash
1113
1119
run : |
1114
1120
# 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"
1117
1123
fi
1118
1124
- name : Upload tvOS test results artifact
1119
1125
if : ${{ !cancelled() }}
1120
1126
uses : actions/upload-artifact@v3
1121
1127
with :
1122
1128
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 }}*
1124
1130
retention-days : ${{ env.artifactRetentionDays }}
1125
1131
- name : Download log artifacts
1126
1132
if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -1141,7 +1147,7 @@ jobs:
1141
1147
if : ${{ !cancelled() }}
1142
1148
shell : bash
1143
1149
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"
1145
1151
if [[ "${{ job.status }}" != "success" ]]; then
1146
1152
exit 1
1147
1153
fi
0 commit comments