@@ -864,158 +864,6 @@ jobs:
864
864
exit 1
865
865
fi
866
866
867
- # Run tests that depend on custom (self-hosted) runners.
868
- # For now, this is only used for ARM Mac builds.
869
- test_desktop_custom_runners :
870
- name : test-desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}-custom-runner
871
- needs : [check_and_prepare, build_desktop]
872
- runs-on : [self-hosted, firebase-cpp, '${{ matrix.runner_label }}']
873
- if : contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && contains(needs.check_and_prepare.outputs.matrix_arch_combined, 'arm64') && contains(needs.check_and_prepare.outputs.matrix_os, 'macos-13') && needs.check_and_prepare.outputs.apis != '' && !cancelled()
874
- strategy :
875
- fail-fast : false
876
- matrix :
877
- ssl_variant : ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }}
878
- os : ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }}
879
- arch : ${{ fromJson(needs.check_and_prepare.outputs.matrix_arch_combined) }}
880
- runner_label : ['${{ needs.check_and_prepare.outputs.runner_label_macos_arm64 }}']
881
- exclude :
882
- # Don't run Linux or Windows tests on the Mac arm64 runner.
883
- - os : ubuntu-20.04
884
- runner_label : ${{ needs.check_and_prepare.outputs.runner_label_macos_arm64 }}
885
- - os : windows-latest
886
- runner_label : ${{ needs.check_and_prepare.outputs.runner_label_macos_arm64 }}
887
- # Don't run x86 tests on any Mac runner.
888
- - os : macos-13
889
- arch : x86
890
- # Don't run x64 tests on the Mac arm64 runner.
891
- - os : macos-13
892
- arch : x64
893
- runner_label : ${{ needs.check_and_prepare.outputs.runner_label_macos_arm64 }}
894
- # Until we support building openssl from source, we can't link to system
895
- # openssl when cross-compiling, so exclude openssl from mac arm64 testing.
896
- - os : macos-13
897
- arch : arm64
898
- ssl_variant : openssl
899
- steps :
900
- - name : Clean up previous run
901
- shell : bash
902
- run : |
903
- echo "Cleaning up previous run"
904
- rm -rf "${{ github.workspace }}"/*
905
- - uses : actions/checkout@v3
906
- with :
907
- ref : ${{needs.check_and_prepare.outputs.github_ref}}
908
- - name : Download Desktop integration tests artifact
909
- uses : actions/download-artifact@v3
910
- with :
911
- path : testapps
912
- name : testapps-desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}
913
- # Omit all of the prerequisites steps; we ensure that our self-hosted runners
914
- # are configured with all prereqs already installed.
915
- - name : Create keychain (macOS)
916
- if : ${{ runner.os == 'macOS' }}
917
- shell : bash
918
- run : |
919
- echo "Creating temporary keychain"
920
- # Create a local keychain on Mac:
921
- # Clean up previous temp keychain, if any.
922
- security delete-keychain tmp-keychain 2> /dev/null || true
923
- # Create temp keychain file and unlock it.
924
- # (Avoid passing in -p on command line by using interactive mode.)
925
- # Also set it to default settings so there is no unlock timeout.
926
- security -i <<EOF
927
- create-keychain -p ${{ secrets.TEST_SECRET }} tmp-keychain
928
- set-keychain-settings tmp-keychain
929
- unlock-keychain -p ${{ secrets.TEST_SECRET }} tmp-keychain
930
- EOF
931
- # Change the keychain list and default keychain to the temp keychain.
932
- security list-keychains -d user -s tmp-keychain
933
- security default-keychain -s tmp-keychain
934
- - name : Restore google-services files
935
- shell : bash
936
- run : |
937
- python scripts/gha/restore_secrets.py --passphrase_file=- --artifact testapps <<EOF
938
- ${{ secrets.TEST_SECRET }}
939
- EOF
940
- - name : Run Desktop integration tests on M1 Mac
941
- if : ${{ matrix.os == 'macos-13' && matrix.arch == 'arm64' && matrix.runner_label == needs.check_and_prepare.outputs.runner_label_macos_arm64 }}
942
- shell : bash
943
- run : |
944
- # This is an M1 Mac GitHub self-hosted runner.
945
- # Use arch command to ensure that the app is running in the correct processor mode (arm64).
946
- cmd_prefix='arch -arm64'
947
-
948
- # If Firestore is included, use the emulator; otherwise just run the tests standalone.
949
- if [[ "${{ needs.check_and_prepare.outputs.apis }}" == *"firestore"* ]]; then
950
- # ARM Mac requires a firestore.json to specify the host as 127.0.0.1 rather than localhost.
951
- # Otherwise the Firestore emulator cannot connect, probably because localhost is ipv6.
952
- echo '{"emulators":{"firestore":{"port":"8080","host":"127.0.0.1"}}}' > firebase.json
953
- echo "::warning ::Firestore emulator version: $(firebase --version)"
954
- set -x
955
- firebase emulators:exec --only firestore --project demo-example \
956
- 'python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}" --cmd_prefix='"\"${cmd_prefix}\""
957
- else
958
- set -x
959
- python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}" --cmd_prefix="${cmd_prefix}"
960
- fi
961
- env :
962
- USE_FIRESTORE_EMULATOR : true
963
- - name : Delete keychain (macOS)
964
- if : ${{ always() && runner.os == 'macOS' }}
965
- shell : bash
966
- run : |
967
- # Remove the local keychain on Mac:
968
- # Set back to the default login keychain.
969
- security list-keychains -d user -s login.keychain
970
- # Delete the temp keychain, if it exists.
971
- security delete-keychain tmp-keychain || true
972
- - name : Prepare results summary artifact
973
- if : ${{ !cancelled() }}
974
- shell : bash
975
- run : |
976
- if [ ! -f testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.arch}}-${{ matrix.ssl_variant }}.log.json ]; then
977
- mkdir -p testapps && echo "__SUMMARY_MISSING__" > testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.arch}}-${{ matrix.ssl_variant }}.log.json
978
- fi
979
- - name : Upload Desktop test results artifact
980
- if : ${{ !cancelled() }}
981
- uses : actions/upload-artifact@v3
982
- with :
983
- name : log-artifact
984
- path : testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}*
985
- retention-days : ${{ env.artifactRetentionDays }}
986
- - name : Download log artifacts
987
- if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
988
- uses : actions/download-artifact@v3
989
- with :
990
- path : test_results
991
- name : log-artifact
992
- - name : Update PR label and comment
993
- if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
994
- shell : bash
995
- run : |
996
- python scripts/gha/it_workflow.py --stage progress \
997
- --token ${{github.token}} \
998
- --issue_number ${{needs.check_and_prepare.outputs.pr_number}}\
999
- --actor ${{github.actor}} \
1000
- --commit ${{needs.check_and_prepare.outputs.github_ref}} \
1001
- --run_id ${{github.run_id}}
1002
- - name : Summarize test results
1003
- if : ${{ !cancelled() }}
1004
- shell : bash
1005
- run : |
1006
- cat testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}.log
1007
- if [[ "${{ job.status }}" != "success" ]]; then
1008
- exit 1
1009
- fi
1010
- - name : Clean up after this run
1011
- shell : bash
1012
- if : ${{ always() }}
1013
- run : |
1014
- echo "Cleaning up after this run"
1015
- rm -rf "${{ github.workspace }}"/*
1016
-
1017
-
1018
-
1019
867
test_android :
1020
868
name : test-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}
1021
869
needs : [check_and_prepare, build_android]
0 commit comments