Quellcode durchsuchen

Remove broken size infrastructure (#12283)

Paul Beusterien vor 2 Jahren
Ursprung
Commit
7482919ea5

+ 0 - 48
.github/workflows/health-metrics-presubmit.yml

@@ -54,54 +54,6 @@ jobs:
             ./scripts/health_metrics/get_updated_files.sh
           fi
 
-  binary_size_metrics:
-    needs: check
-    # Prevent the job from being triggered in fork.
-    # always() will trigger this job when `needs` are skipped in a `merge` pull_request event.
-    if: always() && github.event.pull_request.head.repo.full_name == github.repository && ((github.event.action != 'closed' &&  github.event.pull_request.base.ref == 'main') || github.event.pull_request.merged)
-    runs-on: macos-12
-    strategy:
-      matrix:
-        target: [iOS]
-    steps:
-    - uses: actions/checkout@v4
-    - name: Access to Metrics Service
-      run: |
-        # Install gcloud sdk
-        curl https://sdk.cloud.google.com > install.sh
-        bash install.sh --disable-prompts
-        echo "${HOME}/google-cloud-sdk/bin/" >> $GITHUB_PATH
-        export PATH="${HOME}/google-cloud-sdk/bin/:${PATH}"
-
-        # Activate the service account for Metrics Service.
-        scripts/decrypt_gha_secret.sh scripts/gha-encrypted/metrics_service_access.json.gpg \
-        metrics-access.json "${{ env.METRICS_SERVICE_SECRET }}"
-        gcloud auth activate-service-account --key-file metrics-access.json
-    - name: Build and test
-      run: |
-        FirebaseABTesting=${{ needs.check.outputs.abtesting_run_job }} \
-        FirebaseAnalytics=${{ needs.check.outputs.analytics_run_job }} \
-        FirebaseAppCheck=${{ needs.check.outputs.appcheck_run_job }} \
-        FirebaseAppDistribution=${{ needs.check.outputs.appdistribution_run_job }} \
-        FirebaseAuth=${{ needs.check.outputs.auth_run_job }} \
-        FirebaseCrashlytics=${{ needs.check.outputs.crashlytics_run_job }} \
-        FirebaseDatabase=${{ needs.check.outputs.database_run_job }} \
-        FirebaseDynamicLinks=${{ needs.check.outputs.dynamiclinks_run_job }} \
-        FirebaseFirestore=${{ needs.check.outputs.firestore_run_job }} \
-        FirebaseFunctions=${{ needs.check.outputs.functions_run_job}} \
-        FirebaseInAppMessaging=${{ needs.check.outputs.inappmessaging_run_job }} \
-        FirebaseInstallations=${{ needs.check.outputs.installations_run_job }} \
-        FirebaseMessaging=${{ needs.check.outputs.messaging_run_job}} \
-        FirebasePerformance=${{ needs.check.outputs.performance_run_job }} \
-        FirebaseRemoteConfig=${{ needs.check.outputs.remoteconfig_run_job }} \
-        FirebaseStorage=${{ needs.check.outputs.storage_run_job }} \
-        ./scripts/health_metrics/create_binary_size_report.sh
-      env:
-        PULL_REQUEST_NUM: ${{ github.event.pull_request.number }}
-        BASE_COMMIT: ${{ needs.check.outputs.target_branch_head }}
-        POSTSUBMIT: ${{ github.event.pull_request.merged }}
-        SOURCE_BRANCH: ${{ github.base_ref }}
-
   pod-lib-lint-abtesting:
     needs: check
     # Don't run on private repo unless it is a PR.

+ 0 - 87
scripts/health_metrics/create_binary_size_report.sh

@@ -1,87 +0,0 @@
-#!/bin/bash
-
-# Copyright 2021 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is to generate pod size report and send to the Metrics Service.
-# The Metrics Service will either
-# 1. save binary size data into the databasae when POSTSUBMIT is true, or
-# 2. post a report in a PR when POSTSUBMIT is not true.
-
-set -ex
-
-BINARY_SIZE_SDK=()
-
-# In presubmits, `check` job in the health_metrics.yml workflow will turn on SDK flags if a corresponding
-# file path, in `scripts/health_metrics/file_patterns.json` is updated.
-# In postsubmits, all SDKs should be measured, so binary size data of all SDKs should be uploaded to a
-# merged commit. Next time a new PR can compare the head of the PR to a commit on the base branch.
-if [[ "${POSTSUBMIT}" == true || "${FirebaseABTesting}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseABTesting')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseAnalytics}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseAnalytics')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseAppCheck}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseAppCheck')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseAppDistribution}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseAppDistribution')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseAuth}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseAuth')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseCrashlytics}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseCrashlytics')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseDatabase}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseDatabase')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseDynamicLinks}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseDynamicLinks')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseFirestore}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseFirestore')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseFunctions}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseFunctions')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseInAppMessaging}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseInAppMessaging')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseInstallations}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseInstallations')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseMessaging}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseMessaging')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebasePerformance}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebasePerformance');
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseRemoteConfig}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseRemoteConfig')
-fi
-if [[ "${POSTSUBMIT}" == true || "${FirebaseStorage}" == 'true' ]]; then
-  BINARY_SIZE_SDK+=('FirebaseStorage')
-fi
-if [ -n "$BINARY_SIZE_SDK" ]; then
-  cd scripts/health_metrics/generate_code_coverage_report/
-  git clone https://github.com/google/cocoapods-size
-  swift build
-  if [[ "${POSTSUBMIT}" == true ]]; then
-    .build/debug/BinarySizeReportGenerator --binary-size-tool-dir cocoapods-size/  --sdk-repo-dir "${GITHUB_WORKSPACE}" --sdk ${BINARY_SIZE_SDK[@]} --merge "firebase/firebase-ios-sdk" --head-commit "${GITHUB_SHA}" --token $(gcloud auth print-identity-token) --log-link "https://github.com/firebase/firebase-ios-sdk/actions/runs/${GITHUB_RUN_ID}" --source-branch "${SOURCE_BRANCH}"
-  else
-    .build/debug/BinarySizeReportGenerator --binary-size-tool-dir cocoapods-size/  --sdk-repo-dir "${GITHUB_WORKSPACE}" --sdk ${BINARY_SIZE_SDK[@]} --presubmit "firebase/firebase-ios-sdk" --head-commit "${GITHUB_SHA}" --token $(gcloud auth print-identity-token) --log-link "https://github.com/firebase/firebase-ios-sdk/actions/runs/${GITHUB_RUN_ID}" --pull-request-num "${PULL_REQUEST_NUM}" --base-commit "${BASE_COMMIT}"
-  fi
-fi