From cd6bb04fae2d4e31fd80b91b667fdc1936c0e02a Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 20 Dec 2021 15:46:18 -0800 Subject: [PATCH 01/65] Add trigger for ARM Mac self hosted runner. --- .github/workflows/integration_tests.yml | 122 ++++++++++++++++++---- scripts/gha/print_matrix_configuration.py | 2 +- scripts/gha/summarize_test_results.py | 1 + 3 files changed, 106 insertions(+), 19 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 60ebc97529..b986286d6e 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -58,6 +58,7 @@ jobs: pr_number: ${{ steps.set_outputs.outputs.pr_number }} matrix_platform: ${{ steps.matrix_config.outputs.matrix_platform }} matrix_os: ${{ steps.matrix_config.outputs.matrix_os }} + matrix_arch_mac: ${{ steps.matrix_config.outputs.matrix_arch_mac }} matrix_ssl: ${{ steps.matrix_config.outputs.matrix_ssl }} apis: ${{ steps.matrix_config.outputs.apis }} mobile_test_on: ${{ steps.matrix_config.outputs.mobile_test_on }} @@ -75,7 +76,7 @@ jobs: ### trigger value: manual_trigger, scheduled_trigger, label_trigger, postsubmit_trigger - id: set_outputs run: | - if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then if [[ "${{ github.event.inputs.test_pull_request }}" != "nightly-packaging" ]]; then # Triggered manually echo "::set-output name=trigger::manual_trigger" @@ -126,12 +127,12 @@ jobs: if: ${{ !steps.set_outputs.outputs.trigger }} uses: andymckay/cancel-action@0.2 - name: Wait for workflow cancellation - if: ${{ !steps.set_outputs.outputs.trigger }} + if: ${{ !steps.set_outputs.outputs.trigger }} run: | sleep 300 exit 1 # fail out if the cancellation above somehow failed. - name: Cancel previous runs on the same PR - if: steps.set_outputs.outputs.trigger == 'label_trigger' + if: steps.set_outputs.outputs.trigger == 'label_trigger' uses: styfle/cancel-workflow-action@0.8.0 with: access_token: ${{ github.token }} @@ -153,14 +154,14 @@ jobs: command: pip install -r scripts/gha/requirements.txt - id: matrix_config run: | - if [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "expanded" ]]; then + if [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "expanded" ]]; then TEST_MATRIX_PARAM=-e=1 echo "::warning ::Running on the expanded matrix" - elif [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "minimal" ]]; then + elif [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "minimal" ]]; then TEST_MATRIX_PARAM=-m=1 echo "::warning ::Running on the minimal matrix" - elif [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "auto" ]]; then - # auto-diff only apply when running in a PR. + elif [[ "${{ steps.set_outputs.outputs.requested_tests }}" == "auto" ]]; then + # auto-diff only apply when running in a PR. # diff against the PR's base. "git merge-base main branch_name" will give the common ancestor of both branches. MERGE_BASE=$(git merge-base origin/${{github.event.pull_request.head.ref}} origin/${{github.event.pull_request.base.ref}} || true) # If origin/ is no longer valid, then just run all tests. @@ -177,6 +178,7 @@ jobs: echo "::set-output name=apis::${apis}" echo "::set-output name=matrix_platform::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k platform -o "${{github.event.inputs.platforms}}" --apis ${apis} )" echo "::set-output name=matrix_os::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k os -o "${{github.event.inputs.operating_systems}}")" + echo "::set-output name=matrix_arch_mac::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k architecture_macos)" # If building against a packaged SDK, only use boringssl. if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then echo "::warning ::Downloading SDK package from previous run: https://github.com/${{github.repository}}/actions/runs/${{ github.event.inputs.test_packaged_sdk }}" @@ -203,7 +205,7 @@ jobs: --run_id ${{github.run_id}} build_desktop: - name: build-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} + name: build-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}-${{ matrix.arch }} needs: [check_and_prepare] runs-on: ${{ matrix.os }} # Skip this if there is an empty matrix (which can happen if "auto" was set above). @@ -213,7 +215,14 @@ jobs: fail-fast: false matrix: os: ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }} + arch: ${{ fromJson(needs.check_and_prepare.outputs.matrix_arch_mac) }} ssl_variant: ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }} + exclude: + # Only build for arm64 on Mac. + - os: ubuntu-latest + arch: arm64 + - os: windows-latest + arch: arm64 steps: - name: setup Xcode version (macos) if: runner.os == 'macOS' @@ -307,8 +316,9 @@ jobs: workflow: 'cpp-packaging.yml' run_id: ${{ github.event.inputs.test_packaged_sdk }} - name: Build integration tests + id: build-tests shell: bash - env: + env: CCACHE_DIR: ${{ github.workspace }}/ccache_dir run: | declare -a additional_flags @@ -326,10 +336,19 @@ jobs: additional_flags+=(--cmake_flag=-DFIREBASE_USE_BORINGSSL=ON) fi fi + + # Special handling for MacOS ARM build. + artifact_os=${{ matrix.os }} + if [[ "${{ matrix.os }}" == "macos-latest" && "${{ matrix.arch }}" == "arm64" ]]; then + artifact_os=macosarm-latest + additional_flags+=(--arch arm64) + fi + echo "::set-output name=artifact_name::desktop-${artifact_os}-${{ matrix.ssl_variant }}" + python scripts/gha/build_testapps.py --p Desktop \ --t ${{ needs.check_and_prepare.outputs.apis }} \ --output_directory "${{ github.workspace }}" \ - --artifact_name "desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}" \ + --artifact_name "desktop-${artifact_os}-${{ matrix.ssl_variant }}" \ --noadd_timestamp \ --short_output_paths \ ${additional_flags[*]} @@ -337,28 +356,28 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - if [ ! -f build-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}.log.json ]; then + if [ ! -f build-results-${{ steps.build-tests.artifact_name }}.log.json ]; then # No summary was created, make a placeholder one. - echo "__SUMMARY_MISSING__" > build-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}.log.json + echo "__SUMMARY_MISSING__" > ${{ steps.build-tests.artifact_name }}.log.json fi - name: Upload Desktop integration tests artifact uses: actions/upload-artifact@v2.2.2 if: ${{ !cancelled() }} with: - name: testapps-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} - path: testapps-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} + name: testapps-${{ steps.build-tests.artifact_name }} + path: testapps-${{ steps.build-tests.artifact_name }} retention-days: ${{ env.artifactRetentionDays }} - name: Upload Desktop build results artifact uses: actions/upload-artifact@v2.2.2 if: ${{ !cancelled() }} with: name: log-artifact - path: build-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}* + path: build-results-${{ steps.build-tests.artifact_name }} retention-days: ${{ env.artifactRetentionDays }} - name: Cleanup Local Copies of Uploaded Artifacts shell: bash run: | - rm -rf testapps-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} + rm -rf testapps-${{ steps.build-tests.artifact_name }} - name: Set CLOUDSDK_PYTHON (Windows) shell: bash if: startsWith(matrix.os, 'windows') && !cancelled() @@ -392,7 +411,7 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - cat build-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}.log + cat build-results-${{ steps.build-tests.artifact_name }} if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi @@ -752,6 +771,73 @@ jobs: exit 1 fi + test_desktop_macos_arm: + name: test-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} + needs: [check_and_prepare, build_desktop] + runs-on: [self-hosted, macOS, ${{ matrix.os }}] + if: | + ${{ + contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && + contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && + github.event_name == 'workflow_dispatch' && + needs.check_and_prepare.outputs.apis != '' && + !cancelled() + }} + strategy: + fail-fast: false + matrix: + os: [ macosarm-selfhosted ] + ssl_variant: ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }} + steps: + - uses: actions/checkout@v2 + with: + ref: ${{needs.check_and_prepare.outputs.github_ref}} + - name: Download Desktop integration tests artifact + uses: actions/download-artifact@v2.0.8 + with: + path: testapps + name: testapps-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} + - name: Run Desktop integration tests + run: arch -arm64 python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}" + - name: Prepare results summary artifact + if: ${{ !cancelled() }} + shell: bash + run: | + if [ ! -f testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}.log.json ]; then + mkdir -p testapps && echo "__SUMMARY_MISSING__" > testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}.log.json + fi + - name: Upload Desktop test results artifact + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v2.2.2 + with: + name: log-artifact + path: testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}* + retention-days: ${{ env.artifactRetentionDays }} + - name: Download log artifacts + if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} + uses: actions/download-artifact@v2.0.8 + with: + path: test_results + name: log-artifact + - name: Update PR label and comment + if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} + run: | + python scripts/gha/it_workflow.py --stage progress \ + --token ${{github.token}} \ + --issue_number ${{needs.check_and_prepare.outputs.pr_number}}\ + --actor ${{github.actor}} \ + --commit ${{needs.check_and_prepare.outputs.github_ref}} \ + --run_id ${{github.run_id}} + - name: Summarize test results + if: ${{ !cancelled() }} + shell: bash + run: | + cat testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}.log + if [[ "${{ job.status }}" != "success" ]]; then + exit 1 + fi + + test_desktop: name: test-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] @@ -996,7 +1082,7 @@ jobs: uses: google-github-actions/setup-gcloud@master - name: Run iOS integration tests on Real Device via FTL # max 3 retry and 10m timeout for each testapp, plus other steps - timeout-minutes: 60 + timeout-minutes: 60 if: steps.get-device-type.outputs.device_type == 'real' run: | python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index ce3d4cec2d..3867599e34 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -108,7 +108,7 @@ "tvos_device": ["tvos_simulator"], "build_type": ["Debug"], "architecture_windows_linux": ["x64"], - "architecture_macos": ["x64"], + "architecture_macos": ["x64", "arm64"], "msvc_runtime": ["dynamic"], "cpp_compiler_windows": ["VisualStudio2019"], "cpp_compiler_linux": ["clang-11.0"], diff --git a/scripts/gha/summarize_test_results.py b/scripts/gha/summarize_test_results.py index 625e8e7b6c..3ce5b52578 100644 --- a/scripts/gha/summarize_test_results.py +++ b/scripts/gha/summarize_test_results.py @@ -75,6 +75,7 @@ CAPITALIZATIONS = { "macos": "MacOS", + "macosarm": "MacOS-ARM", "ubuntu": "Linux", "windows": "Windows", "ios": "iOS", From 0b590b3dce05ad75c7eced18ad77cfdc268ae4b3 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 20 Dec 2021 15:48:14 -0800 Subject: [PATCH 02/65] Workflow syntax --- .github/workflows/integration_tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index b986286d6e..0f80f00f2d 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -776,13 +776,11 @@ jobs: needs: [check_and_prepare, build_desktop] runs-on: [self-hosted, macOS, ${{ matrix.os }}] if: | - ${{ contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && !cancelled() - }} strategy: fail-fast: false matrix: From 0df0383cf657b74cb3803077a098a0f0e8a61a1b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 20 Dec 2021 15:49:50 -0800 Subject: [PATCH 03/65] Fix syntax --- .github/workflows/integration_tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 0f80f00f2d..878d747de5 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -340,7 +340,7 @@ jobs: # Special handling for MacOS ARM build. artifact_os=${{ matrix.os }} if [[ "${{ matrix.os }}" == "macos-latest" && "${{ matrix.arch }}" == "arm64" ]]; then - artifact_os=macosarm-latest + artifact_os=macosarm-selfhosted additional_flags+=(--arch arm64) fi echo "::set-output name=artifact_name::desktop-${artifact_os}-${{ matrix.ssl_variant }}" @@ -774,13 +774,15 @@ jobs: test_desktop_macos_arm: name: test-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] - runs-on: [self-hosted, macOS, ${{ matrix.os }}] + runs-on: [self-hosted, macOS, macosarm-selfhosted] if: | + ${{ contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && !cancelled() + }} strategy: fail-fast: false matrix: From 95e73c8ac4c2a20a8410efb64338f4ac63c50956 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 20 Dec 2021 15:51:06 -0800 Subject: [PATCH 04/65] Fix matrix --- .github/workflows/integration_tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 878d747de5..ea6e0ee621 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -217,12 +217,12 @@ jobs: os: ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }} arch: ${{ fromJson(needs.check_and_prepare.outputs.matrix_arch_mac) }} ssl_variant: ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }} - exclude: + exclude: # Only build for arm64 on Mac. - - os: ubuntu-latest - arch: arm64 - - os: windows-latest - arch: arm64 + - os: ubuntu-latest + arch: arm64 + - os: windows-latest + arch: arm64 steps: - name: setup Xcode version (macos) if: runner.os == 'macOS' From 6f41770ed408b935cb154cd4204ff0eb9dcc9e26 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 20 Dec 2021 15:51:48 -0800 Subject: [PATCH 05/65] Fix syntax --- .github/workflows/integration_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index ea6e0ee621..7acdddcbde 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -217,12 +217,12 @@ jobs: os: ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }} arch: ${{ fromJson(needs.check_and_prepare.outputs.matrix_arch_mac) }} ssl_variant: ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }} + # Only build for arm64 on Mac. exclude: - # Only build for arm64 on Mac. - os: ubuntu-latest arch: arm64 - os: windows-latest - arch: arm64 + arch: arm64 steps: - name: setup Xcode version (macos) if: runner.os == 'macOS' From f1f758684e1612b900bd36d97f2f2ae2c94e6a69 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 20 Dec 2021 16:15:12 -0800 Subject: [PATCH 06/65] Fix syntax --- .github/workflows/integration_tests.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 7acdddcbde..e59930fce4 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -316,7 +316,7 @@ jobs: workflow: 'cpp-packaging.yml' run_id: ${{ github.event.inputs.test_packaged_sdk }} - name: Build integration tests - id: build-tests + id: build_tests shell: bash env: CCACHE_DIR: ${{ github.workspace }}/ccache_dir @@ -356,28 +356,28 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - if [ ! -f build-results-${{ steps.build-tests.artifact_name }}.log.json ]; then + if [ ! -f build-results-${{ steps.build_tests.outputs.artifact_name }}.log.json ]; then # No summary was created, make a placeholder one. - echo "__SUMMARY_MISSING__" > ${{ steps.build-tests.artifact_name }}.log.json + echo "__SUMMARY_MISSING__" > ${{ steps.build_tests.outputs.artifact_name }}.log.json fi - name: Upload Desktop integration tests artifact uses: actions/upload-artifact@v2.2.2 if: ${{ !cancelled() }} with: - name: testapps-${{ steps.build-tests.artifact_name }} - path: testapps-${{ steps.build-tests.artifact_name }} + name: testapps-${{ steps.build_tests.outputs.artifact_name }} + path: testapps-${{ steps.build_tests.outputs.artifact_name }} retention-days: ${{ env.artifactRetentionDays }} - name: Upload Desktop build results artifact uses: actions/upload-artifact@v2.2.2 if: ${{ !cancelled() }} with: name: log-artifact - path: build-results-${{ steps.build-tests.artifact_name }} + path: build-results-${{ steps.build_tests.outputs.artifact_name }} retention-days: ${{ env.artifactRetentionDays }} - name: Cleanup Local Copies of Uploaded Artifacts shell: bash run: | - rm -rf testapps-${{ steps.build-tests.artifact_name }} + rm -rf testapps-${{ steps.build_tests.outputs.artifact_name }} - name: Set CLOUDSDK_PYTHON (Windows) shell: bash if: startsWith(matrix.os, 'windows') && !cancelled() @@ -411,7 +411,7 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - cat build-results-${{ steps.build-tests.artifact_name }} + cat build-results-${{ steps.build_tests.outputs.artifact_name }} if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi From f0ca763b4b18481c4d73f990771010afdf90a8ef Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 20 Dec 2021 16:21:01 -0800 Subject: [PATCH 07/65] Clear out directory first --- .github/workflows/integration_tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index e59930fce4..613b722763 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -789,6 +789,9 @@ jobs: os: [ macosarm-selfhosted ] ssl_variant: ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }} steps: + - name: Clear directory + shell: bash + run: rm -rf firebase-cpp-sdk testapps - uses: actions/checkout@v2 with: ref: ${{needs.check_and_prepare.outputs.github_ref}} From 3736574fd57e794202ecc4b05ff3d2081c8aa455 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 20 Dec 2021 16:49:49 -0800 Subject: [PATCH 08/65] Fix test log --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 613b722763..86f749fecf 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -372,7 +372,7 @@ jobs: if: ${{ !cancelled() }} with: name: log-artifact - path: build-results-${{ steps.build_tests.outputs.artifact_name }} + path: build-results-${{ steps.build_tests.outputs.artifact_name }}* retention-days: ${{ env.artifactRetentionDays }} - name: Cleanup Local Copies of Uploaded Artifacts shell: bash From 8584975eba2b9e7b37673fd4e679167b632022b6 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 11:14:24 -0800 Subject: [PATCH 09/65] Fix logging logic --- .github/workflows/integration_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 86f749fecf..57172cc3de 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -358,7 +358,7 @@ jobs: run: | if [ ! -f build-results-${{ steps.build_tests.outputs.artifact_name }}.log.json ]; then # No summary was created, make a placeholder one. - echo "__SUMMARY_MISSING__" > ${{ steps.build_tests.outputs.artifact_name }}.log.json + echo "__SUMMARY_MISSING__" > build-results-${{ steps.build_tests.outputs.artifact_name }}.log.json fi - name: Upload Desktop integration tests artifact uses: actions/upload-artifact@v2.2.2 @@ -411,7 +411,7 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - cat build-results-${{ steps.build_tests.outputs.artifact_name }} + cat build-results-${{ steps.build_tests.outputs.artifact_name }}.log if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi From dc0b6f47b96ba96f9691c644c5a9941d6f46cd1d Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 12:06:40 -0800 Subject: [PATCH 10/65] Restore google-services files before running --- .github/workflows/integration_tests.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 57172cc3de..4d5b74d042 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -781,7 +781,8 @@ jobs: contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && - !cancelled() + !cancelled() && + !failure() }} strategy: fail-fast: false @@ -800,6 +801,13 @@ jobs: with: path: testapps name: testapps-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} + - name: Restore google-services files + uses: nick-invision/retry@v2 + with: + timeout_minutes: 2 + max_attempts: 3 + shell: bash + command: python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps - name: Run Desktop integration tests run: arch -arm64 python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}" - name: Prepare results summary artifact From 287e639e4352edb0b1278a7434ce76f12f394354 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:07:25 -0800 Subject: [PATCH 11/65] Try to clean up the runner spec --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 4d5b74d042..ca16e18f0d 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -774,7 +774,7 @@ jobs: test_desktop_macos_arm: name: test-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] - runs-on: [self-hosted, macOS, macosarm-selfhosted] + runs-on: [self-hosted, macOS, '${{ matrix.os }}' ] if: | ${{ contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && From 83a5e15ba7a6de81227e6443bb559ba951be1cfe Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:11:15 -0800 Subject: [PATCH 12/65] Modify how the matrix is generated to allow for other self hosted runner OSes. --- .github/workflows/integration_tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index ca16e18f0d..8ed9c444ce 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -774,11 +774,11 @@ jobs: test_desktop_macos_arm: name: test-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] - runs-on: [self-hosted, macOS, '${{ matrix.os }}' ] + runs-on: [self-hosted, '${{ matrix.os }}' ] if: | ${{ contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && - contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && + contains(needs.check_and_prepare.outputs.matrix_os, matrix.built_on) && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && !cancelled() && @@ -787,8 +787,10 @@ jobs: strategy: fail-fast: false matrix: - os: [ macosarm-selfhosted ] ssl_variant: ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }} + include: + - os: macosarm-selfhosted + built_on: macos-latest steps: - name: Clear directory shell: bash From 8f8a3c487ba4729323e7a1ef01b29b72741fec8d Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:14:03 -0800 Subject: [PATCH 13/65] Attempt #2 --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 8ed9c444ce..194f9c77b3 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -778,7 +778,7 @@ jobs: if: | ${{ contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && - contains(needs.check_and_prepare.outputs.matrix_os, matrix.built_on) && + contains(needs.check_and_prepare.outputs.matrix_os, strategy.matrix.built_on) && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && !cancelled() && From df0fad2876009acbdd29d03897ba22dcaeeab2da Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:16:11 -0800 Subject: [PATCH 14/65] Try using env --- .github/workflows/integration_tests.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 194f9c77b3..b76d8af018 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -775,10 +775,13 @@ jobs: name: test-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] runs-on: [self-hosted, '${{ matrix.os }}' ] + env: + # OS that this testapp was built on. + build_os: ${{ matrix.build_os }} if: | ${{ contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && - contains(needs.check_and_prepare.outputs.matrix_os, strategy.matrix.built_on) && + contains(needs.check_and_prepare.outputs.matrix_os, env.build_os) && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && !cancelled() && @@ -790,7 +793,7 @@ jobs: ssl_variant: ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }} include: - os: macosarm-selfhosted - built_on: macos-latest + build_os: macos-latest steps: - name: Clear directory shell: bash From 6837a017a4d394fb9c5ee01c4df8fb9a85a4e395 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:18:08 -0800 Subject: [PATCH 15/65] Remove braces --- .github/workflows/integration_tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index b76d8af018..75abbbeafa 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -779,14 +779,12 @@ jobs: # OS that this testapp was built on. build_os: ${{ matrix.build_os }} if: | - ${{ contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && - contains(needs.check_and_prepare.outputs.matrix_os, env.build_os) && + contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && !cancelled() && !failure() - }} strategy: fail-fast: false matrix: From d0601443e2074ab12b2260a0fe774a3516f6bfea Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:19:31 -0800 Subject: [PATCH 16/65] Change syntax --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 75abbbeafa..fbbeb6df28 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -780,7 +780,7 @@ jobs: build_os: ${{ matrix.build_os }} if: | contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && - contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && + contains(needs.check_and_prepare.outputs.matrix_os, '${{ env.build_os }}') && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && !cancelled() && From fb51197bf33b4ef512f5d81f8efaa164dc481029 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:23:23 -0800 Subject: [PATCH 17/65] Try setting full path --- .github/workflows/integration_tests.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index fbbeb6df28..5132048e98 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -775,12 +775,10 @@ jobs: name: test-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] runs-on: [self-hosted, '${{ matrix.os }}' ] - env: - # OS that this testapp was built on. - build_os: ${{ matrix.build_os }} if: | contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && - contains(needs.check_and_prepare.outputs.matrix_os, '${{ env.build_os }}') && + contains(needs.check_and_prepare.outputs.matrix_os, + jobs.test_desktop_macos_arm.strategy.matrix.build_os) && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && !cancelled() && From 4623c9e2c23e10b16a43ccf659d13a299cfec152 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:25:29 -0800 Subject: [PATCH 18/65] Try another syntax --- .github/workflows/integration_tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 5132048e98..95f7a2dc19 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -777,8 +777,7 @@ jobs: runs-on: [self-hosted, '${{ matrix.os }}' ] if: | contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && - contains(needs.check_and_prepare.outputs.matrix_os, - jobs.test_desktop_macos_arm.strategy.matrix.build_os) && + contains(needs.check_and_prepare.outputs.matrix_os, job.strategy.matrix.build_os) && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && !cancelled() && From 3dd271fb8a9a8956931551520819898c6932bfff Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:43:22 -0800 Subject: [PATCH 19/65] Clean up matrix, and remove usage of non-GitHub marketplace actions --- .github/workflows/integration_tests.yml | 56 ++++++++++++++----------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 95f7a2dc19..92dbe43c39 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -772,12 +772,15 @@ jobs: fi test_desktop_macos_arm: - name: test-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} + name: test-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] - runs-on: [self-hosted, '${{ matrix.os }}' ] + runs-on: [self-hosted, '${{ matrix.runner_tag }}' ] if: | contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && - contains(needs.check_and_prepare.outputs.matrix_os, job.strategy.matrix.build_os) && + # Unfortunately, we can't use matrix.build_os on the following contains(). + # If we ever have other self-hosted runner OSes, we'll need to expand it + # to include other platforms. + contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && !cancelled() && @@ -787,51 +790,56 @@ jobs: matrix: ssl_variant: ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }} include: - - os: macosarm-selfhosted + # Unlike the other matrices, we don't set a matrix.os here. Instead, + # specify the tag of the self-hosted runner (and of the testapps to run), + # and the OS that the testapps were built on originally. + - runner_tag: macosarm-selfhosted + # Only run the steps if build_os was included in the list of target OSes. build_os: macos-latest steps: - - name: Clear directory + - name: Clean up previous run shell: bash - run: rm -rf firebase-cpp-sdk testapps + run: | + echo "Cleaning up previous run" + rm -rf "${{ github.workspace }}" - uses: actions/checkout@v2 + if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} with: ref: ${{needs.check_and_prepare.outputs.github_ref}} - name: Download Desktop integration tests artifact + if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} uses: actions/download-artifact@v2.0.8 with: path: testapps - name: testapps-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }} - - name: Restore google-services files - uses: nick-invision/retry@v2 - with: - timeout_minutes: 2 - max_attempts: 3 - shell: bash - command: python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps + name: testapps-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }} - name: Run Desktop integration tests - run: arch -arm64 python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}" + if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} + shell: bash + run: | + python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps + arch -arm64 python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}" - name: Prepare results summary artifact - if: ${{ !cancelled() }} + if: ${{ !cancelled() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash run: | - if [ ! -f testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}.log.json ]; then - mkdir -p testapps && echo "__SUMMARY_MISSING__" > testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}.log.json + if [ ! -f testapps/test-results-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}.log.json ]; then + mkdir -p testapps && echo "__SUMMARY_MISSING__" > testapps/test-results-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}.log.json fi - name: Upload Desktop test results artifact - if: ${{ !cancelled() }} + if: ${{ !cancelled() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} uses: actions/upload-artifact@v2.2.2 with: name: log-artifact - path: testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}* + path: testapps/test-results-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}* retention-days: ${{ env.artifactRetentionDays }} - name: Download log artifacts - if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} + if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} uses: actions/download-artifact@v2.0.8 with: path: test_results name: log-artifact - name: Update PR label and comment - if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} + if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} run: | python scripts/gha/it_workflow.py --stage progress \ --token ${{github.token}} \ @@ -840,10 +848,10 @@ jobs: --commit ${{needs.check_and_prepare.outputs.github_ref}} \ --run_id ${{github.run_id}} - name: Summarize test results - if: ${{ !cancelled() }} + if: ${{ !cancelled() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash run: | - cat testapps/test-results-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}.log + cat testapps/test-results-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}.log if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi From 3dac7b1aa7b846682dc7c566ce220e412af421cc Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:44:21 -0800 Subject: [PATCH 20/65] Fix cleanup --- .github/workflows/integration_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 92dbe43c39..5ecdbceb97 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -799,6 +799,7 @@ jobs: steps: - name: Clean up previous run shell: bash + if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} run: | echo "Cleaning up previous run" rm -rf "${{ github.workspace }}" From a6853d36384c38b06b58254daa7ed509e7c4329a Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:45:38 -0800 Subject: [PATCH 21/65] Move comment --- .github/workflows/integration_tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 5ecdbceb97..144a4011a4 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -775,12 +775,12 @@ jobs: name: test-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] runs-on: [self-hosted, '${{ matrix.runner_tag }}' ] + # Unfortunately, we can't use matrix.build_os on the first contains() below. + # If we ever have other self-hosted runner OSes, we'll need to expand it + # to include other platforms. if: | - contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && - # Unfortunately, we can't use matrix.build_os on the following contains(). - # If we ever have other self-hosted runner OSes, we'll need to expand it - # to include other platforms. contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && + contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && !cancelled() && From 99aa139b0607710d6fdfd67f0e065b1296e01b55 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:52:04 -0800 Subject: [PATCH 22/65] Enable running on scheduled tests as well as manually dispatched. --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 144a4011a4..c06b07c88f 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -781,8 +781,8 @@ jobs: if: | contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && - github.event_name == 'workflow_dispatch' && needs.check_and_prepare.outputs.apis != '' && + (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && !cancelled() && !failure() strategy: From 0002fbb5881c16f9708c76fbb39fa90a7a50b6c5 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:52:32 -0800 Subject: [PATCH 23/65] Run any time integration tests are run --- .github/workflows/integration_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index c06b07c88f..46d41a5d49 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -782,7 +782,6 @@ jobs: contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && needs.check_and_prepare.outputs.apis != '' && - (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && !cancelled() && !failure() strategy: From 895ef3dbcee0f4b908a828d1f058202dd0936e74 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 13:58:08 -0800 Subject: [PATCH 24/65] Clean up the self-hosted runner specification. --- .github/workflows/integration_tests.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 46d41a5d49..6133feab4a 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -48,6 +48,10 @@ env: pythonVersion: '3.7' artifactRetentionDays: 2 GITHUB_TOKEN: ${{ github.token }} + # This must consist of two words separated by a hyphen. + # The first word will be used in reports, the second + # will be removed. + armMacRunerTag: 'macosarm-internal' jobs: check_and_prepare: @@ -340,7 +344,7 @@ jobs: # Special handling for MacOS ARM build. artifact_os=${{ matrix.os }} if [[ "${{ matrix.os }}" == "macos-latest" && "${{ matrix.arch }}" == "arm64" ]]; then - artifact_os=macosarm-selfhosted + artifact_os='${{ env.armMacRunerTag }}' additional_flags+=(--arch arm64) fi echo "::set-output name=artifact_name::desktop-${artifact_os}-${{ matrix.ssl_variant }}" @@ -771,8 +775,10 @@ jobs: exit 1 fi - test_desktop_macos_arm: - name: test-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }} + # Run tests that depend on special self-hosted runners. + # For now, this is only ARM Mac builds. + test_desktop_special_runners: + name: test-desktop-self-hosted-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] runs-on: [self-hosted, '${{ matrix.runner_tag }}' ] # Unfortunately, we can't use matrix.build_os on the first contains() below. @@ -792,7 +798,7 @@ jobs: # Unlike the other matrices, we don't set a matrix.os here. Instead, # specify the tag of the self-hosted runner (and of the testapps to run), # and the OS that the testapps were built on originally. - - runner_tag: macosarm-selfhosted + - runner_tag: ${{ env.armMacRunerTag }} # Only run the steps if build_os was included in the list of target OSes. build_os: macos-latest steps: From 9f8f4204aab66f2881b2c61abbd7baa73e817894 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 14:02:27 -0800 Subject: [PATCH 25/65] Move env to an output so it can be seen by the matrix --- .github/workflows/integration_tests.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 6133feab4a..88f9de7589 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -51,7 +51,7 @@ env: # This must consist of two words separated by a hyphen. # The first word will be used in reports, the second # will be removed. - armMacRunerTag: 'macosarm-internal' + runnerTagMacArm64: 'macosarm-custom' jobs: check_and_prepare: @@ -70,7 +70,8 @@ jobs: xcode_version: ${{ steps.matrix_config.outputs.xcode_version }} ios_device: ${{ steps.matrix_config.outputs.ios_device }} tvos_device: ${{ steps.matrix_config.outputs.tvos_device }} - steps: + runner_tag_mac_arm64: ${{ env.runnerTagMacArm64 }} + steps: ### Fail the workflow if the user does not have admin access to run the tests. - name: Check if user has permission to trigger tests uses: lannonbr/repo-permission-check-action@2.0.0 @@ -344,7 +345,7 @@ jobs: # Special handling for MacOS ARM build. artifact_os=${{ matrix.os }} if [[ "${{ matrix.os }}" == "macos-latest" && "${{ matrix.arch }}" == "arm64" ]]; then - artifact_os='${{ env.armMacRunerTag }}' + artifact_os='${{ needs.check_and_prepare.outputs.runner_tag_mac_arm64 }}' additional_flags+=(--arch arm64) fi echo "::set-output name=artifact_name::desktop-${artifact_os}-${{ matrix.ssl_variant }}" @@ -798,7 +799,7 @@ jobs: # Unlike the other matrices, we don't set a matrix.os here. Instead, # specify the tag of the self-hosted runner (and of the testapps to run), # and the OS that the testapps were built on originally. - - runner_tag: ${{ env.armMacRunerTag }} + - runner_tag: '${{ needs.check_and_prepare.outputs.runner_tag_mac_arm64 }}' # Only run the steps if build_os was included in the list of target OSes. build_os: macos-latest steps: From 0679d13e29ce8d55a73712157080eed6c122c46b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 14:03:39 -0800 Subject: [PATCH 26/65] Fix syntax --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 88f9de7589..70505b582b 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -70,7 +70,7 @@ jobs: xcode_version: ${{ steps.matrix_config.outputs.xcode_version }} ios_device: ${{ steps.matrix_config.outputs.ios_device }} tvos_device: ${{ steps.matrix_config.outputs.tvos_device }} - runner_tag_mac_arm64: ${{ env.runnerTagMacArm64 }} + runner_tag_mac_arm64: '${{ env.runnerTagMacArm64 }}' steps: ### Fail the workflow if the user does not have admin access to run the tests. - name: Check if user has permission to trigger tests From 1c338bd1ba86e10e3cbd502d9c4e8c790141e88f Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 14:04:37 -0800 Subject: [PATCH 27/65] omit env --- .github/workflows/integration_tests.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 70505b582b..ab94afe6a3 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -48,10 +48,6 @@ env: pythonVersion: '3.7' artifactRetentionDays: 2 GITHUB_TOKEN: ${{ github.token }} - # This must consist of two words separated by a hyphen. - # The first word will be used in reports, the second - # will be removed. - runnerTagMacArm64: 'macosarm-custom' jobs: check_and_prepare: @@ -70,7 +66,10 @@ jobs: xcode_version: ${{ steps.matrix_config.outputs.xcode_version }} ios_device: ${{ steps.matrix_config.outputs.ios_device }} tvos_device: ${{ steps.matrix_config.outputs.tvos_device }} - runner_tag_mac_arm64: '${{ env.runnerTagMacArm64 }}' + # This must consist of two words separated by a hyphen. + # The first word will be used in reports, the second + # will be removed. + runner_tag_mac_arm64: 'macosarm-custom' steps: ### Fail the workflow if the user does not have admin access to run the tests. - name: Check if user has permission to trigger tests From 44faba88fdf588acc51d76ef3503a68d9209cdd2 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 14:05:10 -0800 Subject: [PATCH 28/65] Remove 64 from name --- .github/workflows/integration_tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index ab94afe6a3..6ff599c671 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -69,7 +69,7 @@ jobs: # This must consist of two words separated by a hyphen. # The first word will be used in reports, the second # will be removed. - runner_tag_mac_arm64: 'macosarm-custom' + runner_tag_mac_arm: 'macosarm-custom' steps: ### Fail the workflow if the user does not have admin access to run the tests. - name: Check if user has permission to trigger tests @@ -344,7 +344,7 @@ jobs: # Special handling for MacOS ARM build. artifact_os=${{ matrix.os }} if [[ "${{ matrix.os }}" == "macos-latest" && "${{ matrix.arch }}" == "arm64" ]]; then - artifact_os='${{ needs.check_and_prepare.outputs.runner_tag_mac_arm64 }}' + artifact_os='${{ needs.check_and_prepare.outputs.runner_tag_mac_arm }}' additional_flags+=(--arch arm64) fi echo "::set-output name=artifact_name::desktop-${artifact_os}-${{ matrix.ssl_variant }}" @@ -798,7 +798,7 @@ jobs: # Unlike the other matrices, we don't set a matrix.os here. Instead, # specify the tag of the self-hosted runner (and of the testapps to run), # and the OS that the testapps were built on originally. - - runner_tag: '${{ needs.check_and_prepare.outputs.runner_tag_mac_arm64 }}' + - runner_tag: '${{ needs.check_and_prepare.outputs.runner_tag_mac_arm }}' # Only run the steps if build_os was included in the list of target OSes. build_os: macos-latest steps: From b7e9b45e9eebfc061b680036ce4f36e9736eade1 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 14:07:44 -0800 Subject: [PATCH 29/65] Fix syntax...? --- .github/workflows/integration_tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 6ff599c671..ccb5cfac97 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -48,6 +48,7 @@ env: pythonVersion: '3.7' artifactRetentionDays: 2 GITHUB_TOKEN: ${{ github.token }} + runnerTagMacArm: 'macosarm-selfhosted' jobs: check_and_prepare: @@ -66,10 +67,7 @@ jobs: xcode_version: ${{ steps.matrix_config.outputs.xcode_version }} ios_device: ${{ steps.matrix_config.outputs.ios_device }} tvos_device: ${{ steps.matrix_config.outputs.tvos_device }} - # This must consist of two words separated by a hyphen. - # The first word will be used in reports, the second - # will be removed. - runner_tag_mac_arm: 'macosarm-custom' + runner_tag_mac_arm: ${{ steps.matrix_config.outputs.runner_tag_mac_arm }} steps: ### Fail the workflow if the user does not have admin access to run the tests. - name: Check if user has permission to trigger tests @@ -80,6 +78,7 @@ jobs: ### trigger value: manual_trigger, scheduled_trigger, label_trigger, postsubmit_trigger - id: set_outputs run: | + echo "::set-output name=runner_tag_mac_arm::${{env.runnerTagMacArm}}" if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then if [[ "${{ github.event.inputs.test_pull_request }}" != "nightly-packaging" ]]; then # Triggered manually From 145b834f8a8fda1463120a2ade1519c689c73cb2 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 14:08:55 -0800 Subject: [PATCH 30/65] Fix again --- .github/workflows/integration_tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index ccb5cfac97..498d04efe5 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -67,7 +67,6 @@ jobs: xcode_version: ${{ steps.matrix_config.outputs.xcode_version }} ios_device: ${{ steps.matrix_config.outputs.ios_device }} tvos_device: ${{ steps.matrix_config.outputs.tvos_device }} - runner_tag_mac_arm: ${{ steps.matrix_config.outputs.runner_tag_mac_arm }} steps: ### Fail the workflow if the user does not have admin access to run the tests. - name: Check if user has permission to trigger tests @@ -343,7 +342,7 @@ jobs: # Special handling for MacOS ARM build. artifact_os=${{ matrix.os }} if [[ "${{ matrix.os }}" == "macos-latest" && "${{ matrix.arch }}" == "arm64" ]]; then - artifact_os='${{ needs.check_and_prepare.outputs.runner_tag_mac_arm }}' + artifact_os='${{ env.runnerTagMacArm }}' additional_flags+=(--arch arm64) fi echo "::set-output name=artifact_name::desktop-${artifact_os}-${{ matrix.ssl_variant }}" @@ -797,7 +796,7 @@ jobs: # Unlike the other matrices, we don't set a matrix.os here. Instead, # specify the tag of the self-hosted runner (and of the testapps to run), # and the OS that the testapps were built on originally. - - runner_tag: '${{ needs.check_and_prepare.outputs.runner_tag_mac_arm }}' + - runner_tag: macosarm-selfhosted # Only run the steps if build_os was included in the list of target OSes. build_os: macos-latest steps: From 6a22452e1c850535ecd0b01a76588797f3aa14cd Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 14:10:47 -0800 Subject: [PATCH 31/65] Fix formatting --- .github/workflows/integration_tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 498d04efe5..099d7aa928 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -48,7 +48,7 @@ env: pythonVersion: '3.7' artifactRetentionDays: 2 GITHUB_TOKEN: ${{ github.token }} - runnerTagMacArm: 'macosarm-selfhosted' + runnerTagMacArm64: 'macosarm-selfhosted' jobs: check_and_prepare: @@ -67,7 +67,8 @@ jobs: xcode_version: ${{ steps.matrix_config.outputs.xcode_version }} ios_device: ${{ steps.matrix_config.outputs.ios_device }} tvos_device: ${{ steps.matrix_config.outputs.tvos_device }} - steps: + runner_tag_mac_arm64: ${{ env.runnerTagMacArm64 }} + steps: ### Fail the workflow if the user does not have admin access to run the tests. - name: Check if user has permission to trigger tests uses: lannonbr/repo-permission-check-action@2.0.0 @@ -77,7 +78,6 @@ jobs: ### trigger value: manual_trigger, scheduled_trigger, label_trigger, postsubmit_trigger - id: set_outputs run: | - echo "::set-output name=runner_tag_mac_arm::${{env.runnerTagMacArm}}" if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then if [[ "${{ github.event.inputs.test_pull_request }}" != "nightly-packaging" ]]; then # Triggered manually @@ -342,7 +342,7 @@ jobs: # Special handling for MacOS ARM build. artifact_os=${{ matrix.os }} if [[ "${{ matrix.os }}" == "macos-latest" && "${{ matrix.arch }}" == "arm64" ]]; then - artifact_os='${{ env.runnerTagMacArm }}' + artifact_os='${{ needs.check_and_prepare.outputs.runner_tag_mac_arm64 }}' additional_flags+=(--arch arm64) fi echo "::set-output name=artifact_name::desktop-${artifact_os}-${{ matrix.ssl_variant }}" @@ -796,7 +796,7 @@ jobs: # Unlike the other matrices, we don't set a matrix.os here. Instead, # specify the tag of the self-hosted runner (and of the testapps to run), # and the OS that the testapps were built on originally. - - runner_tag: macosarm-selfhosted + - runner_tag: '${{ needs.check_and_prepare.outputs.runner_tag_mac_arm64}}' # Only run the steps if build_os was included in the list of target OSes. build_os: macos-latest steps: From 6170a5c59ba107a8bb2cd19c7eaf563e559994aa Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 14:30:11 -0800 Subject: [PATCH 32/65] Add temporary keychain logic. --- .github/workflows/integration_tests.yml | 32 +++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 099d7aa928..cfc3e551e9 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -796,9 +796,10 @@ jobs: # Unlike the other matrices, we don't set a matrix.os here. Instead, # specify the tag of the self-hosted runner (and of the testapps to run), # and the OS that the testapps were built on originally. - - runner_tag: '${{ needs.check_and_prepare.outputs.runner_tag_mac_arm64}}' + - runner_tag: '${{ needs.check_and_prepare.outputs.runner_tag_mac_arm64 }}' # Only run the steps if build_os was included in the list of target OSes. build_os: macos-latest + arch: arm64 steps: - name: Clean up previous run shell: bash @@ -820,8 +821,35 @@ jobs: if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash run: | + if [[ '${{ runner.os }}' == "macOS" ]]; then + echo "Creating temporary keychain" + # Create a local keychain on Mac: + # Clean up previous temp keychain, if any. + security delete-keychain tmp-keychain || true + # Create temp keychain file. + security create-keychain -p "${{ secrets.TEST_SECRET }}" tmp-keychain + # Change the keychain list to the temp keychain. + security list-keychains -d user -s tmp-keychain + # Remove unlock timeout for temp keychain. + security set-keychain-settings tmp-keychain + # Unlock the keychain. + security unlock-keychain "${{ secrets.TEST_SECRET }}" tmp-keychain + + # Use arch -arm64 prefix to ensure running on arm64. + cmd_prefix="arch -${{ matrix.arch }}" + fi + # Restore google-services files. python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps - arch -arm64 python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}" + set -x + ${cmd_prefix} python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}" + set +x + if [[ '${{ runner.os }}' == 'macOS' ]]; then + # Remove the local keychain on Mac: + # Set back to the default login keychain. + security list-keychains -d user -s login.keychain + # Delete the keychain. + security delete-keychain tmp-keychain + fi - name: Prepare results summary artifact if: ${{ !cancelled() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash From 8044d5963604bc81fc73b5a4ab0f3f901ba9ba4c Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 14:38:13 -0800 Subject: [PATCH 33/65] Clean up workflow a bit --- .github/workflows/integration_tests.yml | 35 +++++++++++++------------ 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index cfc3e551e9..83f4ad1294 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -48,7 +48,7 @@ env: pythonVersion: '3.7' artifactRetentionDays: 2 GITHUB_TOKEN: ${{ github.token }} - runnerTagMacArm64: 'macosarm-selfhosted' + runnerLabelMacArm64: 'macosarm-custom' jobs: check_and_prepare: @@ -67,7 +67,7 @@ jobs: xcode_version: ${{ steps.matrix_config.outputs.xcode_version }} ios_device: ${{ steps.matrix_config.outputs.ios_device }} tvos_device: ${{ steps.matrix_config.outputs.tvos_device }} - runner_tag_mac_arm64: ${{ env.runnerTagMacArm64 }} + runner_label_mac_arm64: ${{ env.runnerLabelMacArm64 }} steps: ### Fail the workflow if the user does not have admin access to run the tests. - name: Check if user has permission to trigger tests @@ -342,7 +342,7 @@ jobs: # Special handling for MacOS ARM build. artifact_os=${{ matrix.os }} if [[ "${{ matrix.os }}" == "macos-latest" && "${{ matrix.arch }}" == "arm64" ]]; then - artifact_os='${{ needs.check_and_prepare.outputs.runner_tag_mac_arm64 }}' + artifact_os='${{ needs.check_and_prepare.outputs.runner_label_mac_arm64 }}' additional_flags+=(--arch arm64) fi echo "::set-output name=artifact_name::desktop-${artifact_os}-${{ matrix.ssl_variant }}" @@ -773,12 +773,12 @@ jobs: exit 1 fi - # Run tests that depend on special self-hosted runners. - # For now, this is only ARM Mac builds. - test_desktop_special_runners: - name: test-desktop-self-hosted-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }} + # Run tests that depend on custom (self-hosted) runners. + # For now, this is only used for ARM Mac builds. + test_desktop_custom_runners: + name: test-desktop-custom-${{ matrix.runner_label }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] - runs-on: [self-hosted, '${{ matrix.runner_tag }}' ] + runs-on: [self-hosted, '${{ matrix.runner_label }}' ] # Unfortunately, we can't use matrix.build_os on the first contains() below. # If we ever have other self-hosted runner OSes, we'll need to expand it # to include other platforms. @@ -794,9 +794,10 @@ jobs: ssl_variant: ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }} include: # Unlike the other matrices, we don't set a matrix.os here. Instead, - # specify the tag of the self-hosted runner (and of the testapps to run), - # and the OS that the testapps were built on originally. - - runner_tag: '${{ needs.check_and_prepare.outputs.runner_tag_mac_arm64 }}' + # specify the label for the self-hosted runner. This should be the + # same as the label used in the artifact name. Also specify the OS that + # the testapps were built on originally, and the architecture to run on. + - runner_label: '${{ needs.check_and_prepare.outputs.runner_label_mac_arm64 }}' # Only run the steps if build_os was included in the list of target OSes. build_os: macos-latest arch: arm64 @@ -816,7 +817,7 @@ jobs: uses: actions/download-artifact@v2.0.8 with: path: testapps - name: testapps-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }} + name: testapps-desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }} - name: Run Desktop integration tests if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash @@ -841,7 +842,7 @@ jobs: # Restore google-services files. python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps set -x - ${cmd_prefix} python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}" + ${cmd_prefix} python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }}" set +x if [[ '${{ runner.os }}' == 'macOS' ]]; then # Remove the local keychain on Mac: @@ -854,15 +855,15 @@ jobs: if: ${{ !cancelled() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash run: | - if [ ! -f testapps/test-results-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}.log.json ]; then - mkdir -p testapps && echo "__SUMMARY_MISSING__" > testapps/test-results-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}.log.json + if [ ! -f testapps/test-results-desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }}.log.json ]; then + mkdir -p testapps && echo "__SUMMARY_MISSING__" > testapps/test-results-desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }}.log.json fi - name: Upload Desktop test results artifact if: ${{ !cancelled() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} uses: actions/upload-artifact@v2.2.2 with: name: log-artifact - path: testapps/test-results-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}* + path: testapps/test-results-desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }}* retention-days: ${{ env.artifactRetentionDays }} - name: Download log artifacts if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} @@ -883,7 +884,7 @@ jobs: if: ${{ !cancelled() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash run: | - cat testapps/test-results-desktop-${{ matrix.runner_tag }}-${{ matrix.ssl_variant }}.log + cat testapps/test-results-desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }}.log if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi From 3a906ebaf4d8acb3b660d48c506145950b549c26 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 14:58:01 -0800 Subject: [PATCH 34/65] Fix cleanup --- .github/workflows/integration_tests.yml | 72 ++++++++++++++++--------- 1 file changed, 46 insertions(+), 26 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 83f4ad1294..8134d18e8b 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -807,7 +807,7 @@ jobs: if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} run: | echo "Cleaning up previous run" - rm -rf "${{ github.workspace }}" + rm -rf "${{ github.workspace }}"/* - uses: actions/checkout@v2 if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} with: @@ -818,39 +818,53 @@ jobs: with: path: testapps name: testapps-desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }} + - name: Setup Firestore Emulator + if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} + run: | + npm install -g firebase-tools + - name: Create keychain (macOS) + if: ${{ runner.os == 'macOS' && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} + shell: bash + run: | + pwd + echo "Creating temporary keychain" + # Create a local keychain on Mac: + # Clean up previous temp keychain, if any. + security delete-keychain tmp-keychain || true + # Create temp keychain file. + security create-keychain -p '${{ secrets.TEST_SECRET }}' tmp-keychain + # Change the keychain list to the temp keychain. + security list-keychains -d user -s tmp-keychain + # Remove unlock timeout for temp keychain. + security set-keychain-settings tmp-keychain + # Unlock the keychain. + security unlock-keychain '${{ secrets.TEST_SECRET }}' tmp-keychain + - name: Restore google-services files + if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} + shell: bash + run: python scripts/gha/restore_secrets.py --passphrase '${{ secrets.TEST_SECRET }}' --artifact testapps - name: Run Desktop integration tests if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash run: | - if [[ '${{ runner.os }}' == "macOS" ]]; then - echo "Creating temporary keychain" - # Create a local keychain on Mac: - # Clean up previous temp keychain, if any. - security delete-keychain tmp-keychain || true - # Create temp keychain file. - security create-keychain -p "${{ secrets.TEST_SECRET }}" tmp-keychain - # Change the keychain list to the temp keychain. - security list-keychains -d user -s tmp-keychain - # Remove unlock timeout for temp keychain. - security set-keychain-settings tmp-keychain - # Unlock the keychain. - security unlock-keychain "${{ secrets.TEST_SECRET }}" tmp-keychain - + if [[ '${{ runner.os }}' == 'macOS' ]]; then # Use arch -arm64 prefix to ensure running on arm64. - cmd_prefix="arch -${{ matrix.arch }}" + cmd_prefix='arch -${{ matrix.arch }}' fi - # Restore google-services files. - python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps set -x - ${cmd_prefix} python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }}" + ${cmd_prefix} firebase emulators:exec --only firestore --project demo-example 'python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }}"' set +x - if [[ '${{ runner.os }}' == 'macOS' ]]; then - # Remove the local keychain on Mac: - # Set back to the default login keychain. - security list-keychains -d user -s login.keychain - # Delete the keychain. - security delete-keychain tmp-keychain - fi + env: + USE_FIRESTORE_EMULATOR: true + - name: Delete keychain (macOS) + if: ${{ runner.os == 'macOS' && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} + shell: bash + run: | + # Remove the local keychain on Mac: + # Set back to the default login keychain. + security list-keychains -d user -s login.keychain + # Delete the keychain, if it exists. + security delete-keychain tmp-keychain || true - name: Prepare results summary artifact if: ${{ !cancelled() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash @@ -888,6 +902,12 @@ jobs: if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi + - name: Clean up after this run + shell: bash + if: ${{ always() && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} + run: | + echo "Cleaning up after this run" + rm -rf "${{ github.workspace }}"/* test_desktop: From 9db333dec0d6f8a4f1312d089c9459132104f91b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 15:00:57 -0800 Subject: [PATCH 35/65] Don't add unnecessary installations --- .github/workflows/integration_tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 8134d18e8b..d936cc0a8a 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -819,9 +819,6 @@ jobs: path: testapps name: testapps-desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }} - name: Setup Firestore Emulator - if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} - run: | - npm install -g firebase-tools - name: Create keychain (macOS) if: ${{ runner.os == 'macOS' && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash From 498e60eecdee77c82aac641d5484724c218ea9b3 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 15:01:31 -0800 Subject: [PATCH 36/65] Remove extraneous --- .github/workflows/integration_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index d936cc0a8a..213acfe5f1 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -818,7 +818,6 @@ jobs: with: path: testapps name: testapps-desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }} - - name: Setup Firestore Emulator - name: Create keychain (macOS) if: ${{ runner.os == 'macOS' && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash From 0bc38110e744e99e9f1f830e9a9e934f96a495d7 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 15:13:22 -0800 Subject: [PATCH 37/65] Clean up comments and if statements a bit. --- .github/workflows/integration_tests.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 213acfe5f1..74f510c8a8 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -48,6 +48,10 @@ env: pythonVersion: '3.7' artifactRetentionDays: 2 GITHUB_TOKEN: ${{ github.token }} + # All self-hosted ARM Mac runners should have this label. Due to how + # our custom reporting works, it must be exactly two words separated + # by a hyphen, and the second word will be omitted from the summary + # log. runnerLabelMacArm64: 'macosarm-custom' jobs: @@ -67,6 +71,7 @@ jobs: xcode_version: ${{ steps.matrix_config.outputs.xcode_version }} ios_device: ${{ steps.matrix_config.outputs.ios_device }} tvos_device: ${{ steps.matrix_config.outputs.tvos_device }} + # Copy the runner label here because matrix specifiers cannot see env. runner_label_mac_arm64: ${{ env.runnerLabelMacArm64 }} steps: ### Fail the workflow if the user does not have admin access to run the tests. @@ -795,12 +800,11 @@ jobs: include: # Unlike the other matrices, we don't set a matrix.os here. Instead, # specify the label for the self-hosted runner. This should be the - # same as the label used in the artifact name. Also specify the OS that - # the testapps were built on originally, and the architecture to run on. + # same as the label used in the artifact name in build_desktop above. - runner_label: '${{ needs.check_and_prepare.outputs.runner_label_mac_arm64 }}' - # Only run the steps if build_os was included in the list of target OSes. + # Also specify the OS that the testapps were built on originally. + # (We won't run any tests unless that OS was included in the build matrix.) build_os: macos-latest - arch: arm64 steps: - name: Clean up previous run shell: bash @@ -818,6 +822,8 @@ jobs: with: path: testapps name: testapps-desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }} + # Omit all of the prerequisites steps; we ensure that our self-hosted runners + # are configured with all prereqs already installed. - name: Create keychain (macOS) if: ${{ runner.os == 'macOS' && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash @@ -843,9 +849,9 @@ jobs: if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash run: | - if [[ '${{ runner.os }}' == 'macOS' ]]; then - # Use arch -arm64 prefix to ensure running on arm64. - cmd_prefix='arch -${{ matrix.arch }}' + if [[ '${{ matrix.runner_label }}' == '${{ needs.check_and_prepare.outputs.runner_label_mac_arm64 }}' ]]; then + # Mac ARM64 only: Use arch -arm64 prefix to ensure that the app is running on arm64. + cmd_prefix='arch -arm64' fi set -x ${cmd_prefix} firebase emulators:exec --only firestore --project demo-example 'python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }}"' From 1bb33d4fd4adce48fd730d605415f630122f5e5b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 15:39:12 -0800 Subject: [PATCH 38/65] Add arm64 to the default matrix but allow it to not be included. --- .github/workflows/integration_tests.yml | 31 +++++++++++++++++------ scripts/gha/print_matrix_configuration.py | 4 ++- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 74f510c8a8..2af8f6176c 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -63,7 +63,9 @@ jobs: pr_number: ${{ steps.set_outputs.outputs.pr_number }} matrix_platform: ${{ steps.matrix_config.outputs.matrix_platform }} matrix_os: ${{ steps.matrix_config.outputs.matrix_os }} - matrix_arch_mac: ${{ steps.matrix_config.outputs.matrix_arch_mac }} + matrix_arch_macos: ${{ steps.matrix_config.outputs.matrix_arch_macos }} + matrix_arch_windows_linux: ${{ steps.matrix_config.outputs.matrix_arch_windows_linux }} + matrix_arch_combined: ${{ steps.matrix_config.outputs.matrix_arch_combined }} matrix_ssl: ${{ steps.matrix_config.outputs.matrix_ssl }} apis: ${{ steps.matrix_config.outputs.apis }} mobile_test_on: ${{ steps.matrix_config.outputs.mobile_test_on }} @@ -185,7 +187,14 @@ jobs: echo "::set-output name=apis::${apis}" echo "::set-output name=matrix_platform::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k platform -o "${{github.event.inputs.platforms}}" --apis ${apis} )" echo "::set-output name=matrix_os::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k os -o "${{github.event.inputs.operating_systems}}")" - echo "::set-output name=matrix_arch_mac::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k architecture_macos)" + echo "::set-output name=matrix_arch_macos::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k architecture_macos)" + echo "::set-output name=matrix_arch_windows_linux::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k architecture_windows_linux)" + # Combine architecture_macos and architecture_windows_linux to get a list of all architectures for the build matrix. + matrix_arch_combined=`echo $( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k architecture_macos | sed 's/[]\[,]//g') \ + $( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k architecture_windows_linux | sed 's/[]\[,]//g' ) \ + | sed 's/ /\n/g' | sort | uniq` + matrix_arch_combined_json=["$(echo ${matrix_arch_combined} | sed 's/ /,/g')"] + echo "::set-output name=matrix_arch_combined::${matrix_arch_combined_json}" # If building against a packaged SDK, only use boringssl. if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then echo "::warning ::Downloading SDK package from previous run: https://github.com/${{github.repository}}/actions/runs/${{ github.event.inputs.test_packaged_sdk }}" @@ -222,14 +231,19 @@ jobs: fail-fast: false matrix: os: ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }} - arch: ${{ fromJson(needs.check_and_prepare.outputs.matrix_arch_mac) }} + arch: ${{ fromJson(needs.check_and_prepare.outputs.matrix_arch_combined) }} ssl_variant: ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }} - # Only build for arm64 on Mac. + # Because matrix_arch_combined combines mac, linux, and windows, we need a few exclusions. exclude: + # Only allow building for arm64 on Mac. - os: ubuntu-latest arch: arm64 - os: windows-latest arch: arm64 + # Only allow building for x86 on Windows and Linux. + # (Not currently used, but it could be in the future.) + - os: macos-latest + arch: x86 steps: - name: setup Xcode version (macos) if: runner.os == 'macOS' @@ -784,12 +798,13 @@ jobs: name: test-desktop-custom-${{ matrix.runner_label }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] runs-on: [self-hosted, '${{ matrix.runner_label }}' ] - # Unfortunately, we can't use matrix.build_os on the first contains() below. - # If we ever have other self-hosted runner OSes, we'll need to expand it - # to include other platforms. + # Unfortunately, we can't use matrix.build_os in the contains() expressions + # below. If we ever have other self-hosted runner OSes, we'll need to modify + # the 'if' here to include other platforms. if: | - contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && contains(needs.check_and_prepare.outputs.matrix_platform, 'Desktop') && + contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && + contains(needs.check_and_prepare.outputs.matrix_arch_combined, 'arm64') && needs.check_and_prepare.outputs.apis != '' && !cancelled() && !failure() diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index 3867599e34..2bd766e65b 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -120,7 +120,8 @@ MINIMAL_KEY: { "os": ["ubuntu-latest"], "platform": ["Desktop"], - "apis": "firestore" + "apis": "firestore", + "architecture_macos": ["x64"], }, EXPANDED_KEY: { @@ -128,6 +129,7 @@ "android_device": ["android_target", "android_latest", "emulator_target", "emulator_latest", "emulator_32bit"], "ios_device": ["ios_min", "ios_target", "ios_latest", "simulator_min", "simulator_target", "simulator_latest"], "tvos_device": ["tvos_simulator"], + "architecture_macos": ["x64", "arm64"] } }, "config": { From 7755027afa3fd22b08cb43276d325ca18335baa2 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 15:39:31 -0800 Subject: [PATCH 39/65] Remove arm64 from the default matrix; add only to expanded. --- scripts/gha/print_matrix_configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index 2bd766e65b..f638ad440f 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -108,7 +108,7 @@ "tvos_device": ["tvos_simulator"], "build_type": ["Debug"], "architecture_windows_linux": ["x64"], - "architecture_macos": ["x64", "arm64"], + "architecture_macos": ["x64"], "msvc_runtime": ["dynamic"], "cpp_compiler_windows": ["VisualStudio2019"], "cpp_compiler_linux": ["clang-11.0"], From 8e643fda0ad9877a8a37cfe2d1145822fc2c2a74 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 15:40:21 -0800 Subject: [PATCH 40/65] Remove extraneous --- scripts/gha/print_matrix_configuration.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index f638ad440f..56603aca3b 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -121,7 +121,6 @@ "os": ["ubuntu-latest"], "platform": ["Desktop"], "apis": "firestore", - "architecture_macos": ["x64"], }, EXPANDED_KEY: { From 0534db52bca5b45a6cdf7362e35e1d073639abd6 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 15:44:07 -0800 Subject: [PATCH 41/65] Add arm64 back to default --- scripts/gha/print_matrix_configuration.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index 56603aca3b..f7d3daa27b 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -108,7 +108,7 @@ "tvos_device": ["tvos_simulator"], "build_type": ["Debug"], "architecture_windows_linux": ["x64"], - "architecture_macos": ["x64"], + "architecture_macos": ["x64", "arm64"], "msvc_runtime": ["dynamic"], "cpp_compiler_windows": ["VisualStudio2019"], "cpp_compiler_linux": ["clang-11.0"], @@ -121,6 +121,9 @@ "os": ["ubuntu-latest"], "platform": ["Desktop"], "apis": "firestore", + # Ensure only one architecture is built. + "architecture_windows_linux": ["x64"], + "architecture_macos": ["x64"], }, EXPANDED_KEY: { @@ -128,7 +131,6 @@ "android_device": ["android_target", "android_latest", "emulator_target", "emulator_latest", "emulator_32bit"], "ios_device": ["ios_min", "ios_target", "ios_latest", "simulator_min", "simulator_target", "simulator_latest"], "tvos_device": ["tvos_simulator"], - "architecture_macos": ["x64", "arm64"] } }, "config": { From 6c1eb81bb2741fe0040f5c802e04576febb49239 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 16:09:21 -0800 Subject: [PATCH 42/65] Fix call to 'security' --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 2af8f6176c..0870a8445a 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -855,7 +855,7 @@ jobs: # Remove unlock timeout for temp keychain. security set-keychain-settings tmp-keychain # Unlock the keychain. - security unlock-keychain '${{ secrets.TEST_SECRET }}' tmp-keychain + security unlock-keychain -p '${{ secrets.TEST_SECRET }}' tmp-keychain - name: Restore google-services files if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash From bcd3196b57657bdd0e129c15b027090bf11ae2b3 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 16:17:17 -0800 Subject: [PATCH 43/65] Suppress error msg --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 0870a8445a..3f1e4ccdf4 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -847,7 +847,7 @@ jobs: echo "Creating temporary keychain" # Create a local keychain on Mac: # Clean up previous temp keychain, if any. - security delete-keychain tmp-keychain || true + security delete-keychain tmp-keychain 2> /dev/null || true # Create temp keychain file. security create-keychain -p '${{ secrets.TEST_SECRET }}' tmp-keychain # Change the keychain list to the temp keychain. From 716cb143441970a6d04417e20124a894ca3ff81e Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 16:23:28 -0800 Subject: [PATCH 44/65] Make keychain creation more secure by not passing the secret on the command line --- .github/workflows/integration_tests.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 3f1e4ccdf4..ad1aba0d08 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -848,14 +848,16 @@ jobs: # Create a local keychain on Mac: # Clean up previous temp keychain, if any. security delete-keychain tmp-keychain 2> /dev/null || true - # Create temp keychain file. - security create-keychain -p '${{ secrets.TEST_SECRET }}' tmp-keychain + # Create temp keychain file and unlock it. + # (Avoid passing in -p on command line by using interactive mode.) + # Also set it to default settings so there is no unlock timeout. + security -i < Date: Tue, 21 Dec 2021 16:31:45 -0800 Subject: [PATCH 45/65] Add option for restore_secrets to read passphrase from stdin. --- scripts/gha/restore_secrets.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/gha/restore_secrets.py b/scripts/gha/restore_secrets.py index 4a73051548..977594769e 100644 --- a/scripts/gha/restore_secrets.py +++ b/scripts/gha/restore_secrets.py @@ -22,7 +22,7 @@ --passphrase: Passphrase to decrypt the files. This option is insecure on a multi-user machine; use the --passphrase_file option instead. --passphrase_file: Specify a file to read the passphrase from (only reads the - first line). + first line). Use "-" (without quotes) for stdin. --repo_dir: Path to C++ SDK Github repository. Defaults to current directory. This script will perform the following: @@ -48,7 +48,8 @@ flags.DEFINE_string("repo_dir", os.getcwd(), "Path to C++ SDK Github repo.") flags.DEFINE_string("passphrase", None, "The passphrase itself.") -flags.DEFINE_string("passphrase_file", None, "Path to file with passphrase.") +flags.DEFINE_string("passphrase_file", None, + "Path to file with passphrase. Use \"-\" (without quotes) for stdin.") flags.DEFINE_string("artifact", None, "Artifact Path, google-services.json will be placed here.") @@ -60,6 +61,8 @@ def main(argv): # The passphrase is sensitive, do not log. if FLAGS.passphrase: passphrase = FLAGS.passphrase + elif FLAGS.passphrase_file == "-": + passphrase = input() elif FLAGS.passphrase_file: with open(FLAGS.passphrase_file, "r") as f: passphrase = f.readline().strip() From 992bf5e863c7505f23e295caa58be803b41ed727 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 16:32:44 -0800 Subject: [PATCH 46/65] Use stdin to pass in the passphrase file, for security --- .github/workflows/integration_tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index ad1aba0d08..d0f89ed67b 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -861,7 +861,10 @@ jobs: - name: Restore google-services files if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash - run: python scripts/gha/restore_secrets.py --passphrase '${{ secrets.TEST_SECRET }}' --artifact testapps + run: | + python scripts/gha/restore_secrets.py --passphrase_file=- --artifact testapps < Date: Tue, 21 Dec 2021 16:44:30 -0800 Subject: [PATCH 47/65] Remove extra print of path --- .github/workflows/integration_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index d0f89ed67b..387850f4a6 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -843,7 +843,6 @@ jobs: if: ${{ runner.os == 'macOS' && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash run: | - pwd echo "Creating temporary keychain" # Create a local keychain on Mac: # Clean up previous temp keychain, if any. From 67711e502a08b9f513e1bd3f517a26194db6b827 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 17:52:10 -0800 Subject: [PATCH 48/65] Fix Firestore emulator --- .github/workflows/integration_tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 387850f4a6..677b2bcd1f 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -871,6 +871,9 @@ jobs: if [[ '${{ matrix.runner_label }}' == '${{ needs.check_and_prepare.outputs.runner_label_mac_arm64 }}' ]]; then # Mac ARM64 only: Use arch -arm64 prefix to ensure that the app is running on arm64. cmd_prefix='arch -arm64' + # ARM Mac requires a firestore.json to specify the host as 127.0.0.1 rather than localhost. + # Otherwise the Firestore emulator cannot connect, probably because localhost is ipv6. + echo '{"emulators":{"firestore":{"port":"8080","host":"127.0.0.1"}}}' > firebase.json fi set -x ${cmd_prefix} firebase emulators:exec --only firestore --project demo-example 'python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.runner_label }}-${{ matrix.ssl_variant }}"' From d513b0bf05e20bbaf1091df2e96eb7e91b33437f Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 18:22:04 -0800 Subject: [PATCH 49/65] Also set the default keychain. --- .github/workflows/integration_tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 677b2bcd1f..9ab538ad52 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -855,8 +855,9 @@ jobs: set-keychain-settings tmp-keychain unlock-keychain -p ${{ secrets.TEST_SECRET }} tmp-keychain EOF - # Change the keychain list to the temp keychain. + # Change the keychain list and default keychain to the temp keychain. security list-keychains -d user -s tmp-keychain + security default-keychain -s tmp-keychain - name: Restore google-services files if: ${{ contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash From 981fb1f871380a4a354ff502d2d8028212b6a4e9 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 18:34:53 -0800 Subject: [PATCH 50/65] Only test on arm64 with the expanded matrix. --- scripts/gha/print_matrix_configuration.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index f7d3daa27b..23c7e33a31 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -108,7 +108,7 @@ "tvos_device": ["tvos_simulator"], "build_type": ["Debug"], "architecture_windows_linux": ["x64"], - "architecture_macos": ["x64", "arm64"], + "architecture_macos": ["x64"], "msvc_runtime": ["dynamic"], "cpp_compiler_windows": ["VisualStudio2019"], "cpp_compiler_linux": ["clang-11.0"], @@ -121,9 +121,6 @@ "os": ["ubuntu-latest"], "platform": ["Desktop"], "apis": "firestore", - # Ensure only one architecture is built. - "architecture_windows_linux": ["x64"], - "architecture_macos": ["x64"], }, EXPANDED_KEY: { @@ -131,6 +128,7 @@ "android_device": ["android_target", "android_latest", "emulator_target", "emulator_latest", "emulator_32bit"], "ios_device": ["ios_min", "ios_target", "ios_latest", "simulator_min", "simulator_target", "simulator_latest"], "tvos_device": ["tvos_simulator"], + "architecture_macos": ["x64", "arm64"], } }, "config": { From d70e3b5f77042a904f3b42c184d96c069f3a12df Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 18:44:26 -0800 Subject: [PATCH 51/65] Add custom runners to summarize so it will wait. --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 9ab538ad52..e294ebbcd0 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -1308,7 +1308,7 @@ jobs: summarize_results: name: "summarize-results" - needs: [check_and_prepare, test_desktop, test_android, test_ios, test_tvos] + needs: [check_and_prepare, test_desktop, test_desktop_custom_runners, test_android, test_ios, test_tvos] runs-on: ubuntu-latest if: ${{ !cancelled() }} steps: From 920d3d1633ffaf07ecfed7fbf94ab4993d4bd6d3 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 20:39:14 -0800 Subject: [PATCH 52/65] Still run on failure (so we can test any remaining ones) --- .github/workflows/integration_tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index e294ebbcd0..75921e1b06 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -806,8 +806,7 @@ jobs: contains(needs.check_and_prepare.outputs.matrix_os, 'macos-latest') && contains(needs.check_and_prepare.outputs.matrix_arch_combined, 'arm64') && needs.check_and_prepare.outputs.apis != '' && - !cancelled() && - !failure() + !cancelled() strategy: fail-fast: false matrix: From 32d19b354af385705944b7ba86f181ede562f36e Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 20:40:22 -0800 Subject: [PATCH 53/65] Temporarily only build/run auth tests. --- scripts/gha/print_matrix_configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index 23c7e33a31..75e0679968 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -132,7 +132,7 @@ } }, "config": { - "apis": "admob,analytics,auth,database,dynamic_links,firestore,functions,installations,messaging,remote_config,storage", + "apis": "auth", #admob,analytics,auth,database,dynamic_links,firestore,functions,installations,messaging,remote_config,storage", "mobile_test_on": "real,virtual" } }, From 602d4bb98e99dcecf72f6116b7c671a3cdc414c9 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 20:42:10 -0800 Subject: [PATCH 54/65] Fix a bug in the error handling for desktop builds --- .github/workflows/integration_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 75921e1b06..e97e04b991 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -421,7 +421,6 @@ jobs: shell: bash if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} run: | - pushd ${{env.GCS_UPLOAD_DIR}} python scripts/gha/it_workflow.py --stage progress \ --token ${{github.token}} \ --issue_number ${{needs.check_and_prepare.outputs.pr_number}}\ From 1d4178a090831708573db4dba3859310381b365a Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 21:12:32 -0800 Subject: [PATCH 55/65] For arm64, don't try to build against system openssl, as it won't link. This could be fixed in the future by building openssl from source at build time... --- .github/workflows/integration_tests.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index e97e04b991..8ee8d98325 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -195,11 +195,11 @@ jobs: | sed 's/ /\n/g' | sort | uniq` matrix_arch_combined_json=["$(echo ${matrix_arch_combined} | sed 's/ /,/g')"] echo "::set-output name=matrix_arch_combined::${matrix_arch_combined_json}" - # If building against a packaged SDK, only use boringssl. + # If building against a packaged SDK, consider it as using boringssl, as the packaged SDK uses boringssl under the hood. + # This avoids trying to install openssl on the system when compiling against the packaged SDK. if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then echo "::warning ::Downloading SDK package from previous run: https://github.com/${{github.repository}}/actions/runs/${{ github.event.inputs.test_packaged_sdk }}" - # Because the mobile tests require this value to be set to 'openssl', set it to 'openssl' here. It won't actually matter later. - echo "::set-output name=matrix_ssl::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k ssl_lib -o openssl )" + echo "::set-output name=matrix_ssl::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k ssl_lib -o boringssl )" else echo "::set-output name=matrix_ssl::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${TEST_MATRIX_PARAM} -k ssl_lib -o "${{github.event.inputs.desktop_ssl_variants}}" )" fi @@ -244,6 +244,9 @@ jobs: # (Not currently used, but it could be in the future.) - os: macos-latest arch: x86 + # Until we support building openssl from source, we can't link to system openssl when cross-compiling. + - ssl_variant: openssl + arch: arm64 steps: - name: setup Xcode version (macos) if: runner.os == 'macOS' From 32786a948ba7f31bd24c4bf960f48d8c2aa7773d Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 21:16:07 -0800 Subject: [PATCH 56/65] Add macosarm to build configs. --- scripts/gha/print_matrix_configuration.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index 75e0679968..e3078b5df4 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -132,7 +132,7 @@ } }, "config": { - "apis": "auth", #admob,analytics,auth,database,dynamic_links,firestore,functions,installations,messaging,remote_config,storage", + "apis": "admob,analytics,auth,database,dynamic_links,firestore,functions,installations,messaging,remote_config,storage", "mobile_test_on": "real,virtual" } }, @@ -155,6 +155,7 @@ "windows": ["ssl_lib", "build_type", "architecture_windows_linux", "msvc_runtime", "cpp_compiler_windows"], "ubuntu": ["ssl_lib", "build_type", "architecture_windows_linux", "cpp_compiler_linux"], "macos": ["ssl_lib", "architecture_macos", "xcode_version"], + "macosarm": ["ssl_lib", "architecture_macos", "xcode_version"], "android": ["os", "ndk_version", "build_tools", "platform_version", "android_device"], "ios": ["os", "xcode_version", "ios_device"], "tvos": ["os", "xcode_version", "tvos_device"] From 1d86ba5b4f2c36dad17f5dcd171176a078039a3e Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 21 Dec 2021 23:45:19 -0800 Subject: [PATCH 57/65] Don't try to test openssl on mac either. --- .github/workflows/integration_tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 8ee8d98325..2a6d144304 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -821,6 +821,11 @@ jobs: # Also specify the OS that the testapps were built on originally. # (We won't run any tests unless that OS was included in the build matrix.) build_os: macos-latest + exclude: + # Until we support building openssl from source, we can't link to system + # openssl when cross-compiling, so exclude openssl from mac arm64 testing. + - build_os: macos-latest + ssl_variant: openssl steps: - name: Clean up previous run shell: bash From 64f88504b891c4d3a5dff64a509981abc7d20eec Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 22 Dec 2021 08:42:29 -0800 Subject: [PATCH 58/65] Fix matrix exclusion --- .github/workflows/integration_tests.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 2a6d144304..b525101ce2 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -799,7 +799,7 @@ jobs: test_desktop_custom_runners: name: test-desktop-custom-${{ matrix.runner_label }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] - runs-on: [self-hosted, '${{ matrix.runner_label }}' ] + runs-on: [self-hosted, firebase-cpp, '${{ matrix.runner_label }}' ] # Unfortunately, we can't use matrix.build_os in the contains() expressions # below. If we ever have other self-hosted runner OSes, we'll need to modify # the 'if' here to include other platforms. @@ -813,15 +813,17 @@ jobs: fail-fast: false matrix: ssl_variant: ${{ fromJson(needs.check_and_prepare.outputs.matrix_ssl) }} + build_os: ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }} include: # Unlike the other matrices, we don't set a matrix.os here. Instead, # specify the label for the self-hosted runner. This should be the # same as the label used in the artifact name in build_desktop above. - - runner_label: '${{ needs.check_and_prepare.outputs.runner_label_mac_arm64 }}' - # Also specify the OS that the testapps were built on originally. - # (We won't run any tests unless that OS was included in the build matrix.) - build_os: macos-latest + - build_os: macos-latest + runner_label: '${{ needs.check_and_prepare.outputs.runner_label_mac_arm64 }}' exclude: + # No custom tests for Linux or Windows ... for now. + - build_os: ubuntu-latest + - build_os: windows-latest # Until we support building openssl from source, we can't link to system # openssl when cross-compiling, so exclude openssl from mac arm64 testing. - build_os: macos-latest From 9fe24a90dda02f2f1baf8ef406468e2b2b38d1f4 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 22 Dec 2021 09:47:47 -0800 Subject: [PATCH 59/65] Rename job --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index b525101ce2..5483353e5c 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -797,7 +797,7 @@ jobs: # Run tests that depend on custom (self-hosted) runners. # For now, this is only used for ARM Mac builds. test_desktop_custom_runners: - name: test-desktop-custom-${{ matrix.runner_label }}-${{ matrix.ssl_variant }} + name: test-desktop-selfhosted-${{ matrix.runner_label }}-${{ matrix.ssl_variant }} needs: [check_and_prepare, build_desktop] runs-on: [self-hosted, firebase-cpp, '${{ matrix.runner_label }}' ] # Unfortunately, we can't use matrix.build_os in the contains() expressions From b57a39a509546a7223e088747952c9278fb0671d Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 22 Dec 2021 09:51:22 -0800 Subject: [PATCH 60/65] Clean up the keychain even if the run failed. --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 5483353e5c..35a6081e05 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -890,7 +890,7 @@ jobs: env: USE_FIRESTORE_EMULATOR: true - name: Delete keychain (macOS) - if: ${{ runner.os == 'macOS' && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} + if: ${{ always() && runner.os == 'macOS' && contains(needs.check_and_prepare.outputs.matrix_os, matrix.build_os) }} shell: bash run: | # Remove the local keychain on Mac: From 0c95579c0765696f256c3a3d759c1a5d5daa1505 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 22 Dec 2021 11:01:47 -0800 Subject: [PATCH 61/65] Reverse variable names --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 35a6081e05..3bff47b179 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -221,7 +221,7 @@ jobs: --run_id ${{github.run_id}} build_desktop: - name: build-desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}-${{ matrix.arch }} + name: build-desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }} needs: [check_and_prepare] runs-on: ${{ matrix.os }} # Skip this if there is an empty matrix (which can happen if "auto" was set above). From 748476ddf0357d3b3abcc205c0bbdd48254f6fab Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 22 Dec 2021 11:05:11 -0800 Subject: [PATCH 62/65] Change branch to main --- .github/workflows/integration_tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 3bff47b179..c7806f6a77 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -408,7 +408,7 @@ jobs: run: echo "CLOUDSDK_PYTHON=${{env.pythonLocation}}\python.exe" >> $GITHUB_ENV - name: Install Cloud SDK if: ${{ !cancelled() }} - uses: google-github-actions/setup-gcloud@master + uses: google-github-actions/setup-gcloud@main - name: Upload Desktop Artifacts to GCS shell: bash if: ${{ !cancelled() }} @@ -1082,7 +1082,7 @@ jobs: --ci - name: Install Cloud SDK if: steps.get-device-type.outputs.device_type == 'real' - uses: google-github-actions/setup-gcloud@master + uses: google-github-actions/setup-gcloud@main - name: Run Android integration tests on Real Device via FTL timeout-minutes: 60 if: steps.get-device-type.outputs.device_type == 'real' @@ -1184,7 +1184,7 @@ jobs: --ci - name: Install Cloud SDK if: steps.get-device-type.outputs.device_type == 'real' - uses: google-github-actions/setup-gcloud@master + uses: google-github-actions/setup-gcloud@main - name: Run iOS integration tests on Real Device via FTL # max 3 retry and 10m timeout for each testapp, plus other steps timeout-minutes: 60 From 93231d9e47c18eac4d196d69e0b8f2aac25f8771 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 22 Dec 2021 11:16:08 -0800 Subject: [PATCH 63/65] Pin to a version. --- .github/workflows/integration_tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index c7806f6a77..b2d202bec8 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -408,7 +408,7 @@ jobs: run: echo "CLOUDSDK_PYTHON=${{env.pythonLocation}}\python.exe" >> $GITHUB_ENV - name: Install Cloud SDK if: ${{ !cancelled() }} - uses: google-github-actions/setup-gcloud@main + uses: google-github-actions/setup-gcloud@v0.3 - name: Upload Desktop Artifacts to GCS shell: bash if: ${{ !cancelled() }} @@ -1082,7 +1082,7 @@ jobs: --ci - name: Install Cloud SDK if: steps.get-device-type.outputs.device_type == 'real' - uses: google-github-actions/setup-gcloud@main + uses: google-github-actions/setup-gcloud@v0.3 - name: Run Android integration tests on Real Device via FTL timeout-minutes: 60 if: steps.get-device-type.outputs.device_type == 'real' @@ -1184,7 +1184,7 @@ jobs: --ci - name: Install Cloud SDK if: steps.get-device-type.outputs.device_type == 'real' - uses: google-github-actions/setup-gcloud@main + uses: google-github-actions/setup-gcloud@v0.3 - name: Run iOS integration tests on Real Device via FTL # max 3 retry and 10m timeout for each testapp, plus other steps timeout-minutes: 60 From 8e2ede88f5abeeb697f0ebe48913de7f285dd637 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 22 Dec 2021 11:17:23 -0800 Subject: [PATCH 64/65] Change pinned version as per README. --- .github/workflows/integration_tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index b2d202bec8..2ecc209090 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -408,7 +408,7 @@ jobs: run: echo "CLOUDSDK_PYTHON=${{env.pythonLocation}}\python.exe" >> $GITHUB_ENV - name: Install Cloud SDK if: ${{ !cancelled() }} - uses: google-github-actions/setup-gcloud@v0.3 + uses: google-github-actions/setup-gcloud@v0 - name: Upload Desktop Artifacts to GCS shell: bash if: ${{ !cancelled() }} @@ -1082,7 +1082,7 @@ jobs: --ci - name: Install Cloud SDK if: steps.get-device-type.outputs.device_type == 'real' - uses: google-github-actions/setup-gcloud@v0.3 + uses: google-github-actions/setup-gcloud@v0 - name: Run Android integration tests on Real Device via FTL timeout-minutes: 60 if: steps.get-device-type.outputs.device_type == 'real' @@ -1184,7 +1184,7 @@ jobs: --ci - name: Install Cloud SDK if: steps.get-device-type.outputs.device_type == 'real' - uses: google-github-actions/setup-gcloud@v0.3 + uses: google-github-actions/setup-gcloud@v0 - name: Run iOS integration tests on Real Device via FTL # max 3 retry and 10m timeout for each testapp, plus other steps timeout-minutes: 60 From eaf5abed9c811e04663dd3e3a4b1e3c99acde92b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 22 Dec 2021 15:32:16 -0800 Subject: [PATCH 65/65] Remove trailing commas --- scripts/gha/print_matrix_configuration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index e3078b5df4..1a348c93ce 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -120,7 +120,7 @@ MINIMAL_KEY: { "os": ["ubuntu-latest"], "platform": ["Desktop"], - "apis": "firestore", + "apis": "firestore" }, EXPANDED_KEY: { @@ -128,7 +128,7 @@ "android_device": ["android_target", "android_latest", "emulator_target", "emulator_latest", "emulator_32bit"], "ios_device": ["ios_min", "ios_target", "ios_latest", "simulator_min", "simulator_target", "simulator_latest"], "tvos_device": ["tvos_simulator"], - "architecture_macos": ["x64", "arm64"], + "architecture_macos": ["x64", "arm64"] } }, "config": {