From 5c707118b87d826dadde92a8d061d709ecfc5222 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Thu, 14 Nov 2024 10:37:11 -0500 Subject: [PATCH 1/6] [Infra] Exclude pods that aren't releasing in GHAMatrixSpecCollector --- .../Sources/ManifestParser/GHAMatrixSpecCollector.swift | 3 +-- ReleaseTooling/Sources/ManifestParser/main.swift | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ReleaseTooling/Sources/ManifestParser/GHAMatrixSpecCollector.swift b/ReleaseTooling/Sources/ManifestParser/GHAMatrixSpecCollector.swift index 40541c73ff2..fd942698c4c 100644 --- a/ReleaseTooling/Sources/ManifestParser/GHAMatrixSpecCollector.swift +++ b/ReleaseTooling/Sources/ManifestParser/GHAMatrixSpecCollector.swift @@ -31,11 +31,10 @@ struct SDKPodspec: Codable { struct GHAMatrixSpecCollector { var SDKRepoURL: URL var outputSpecFileURL: URL - var excludedSDKs: [String] = [] func getPodsInManifest(_ manifest: Manifest) -> [String: SDKPodspec] { var podsMap: [String: SDKPodspec] = [:] - for pod in manifest.pods { + for pod in manifest.pods.filter({ $0.releasing }) { podsMap[pod.name] = SDKPodspec(podspec: pod.name, allowWarnings: pod.allowWarnings) } return podsMap diff --git a/ReleaseTooling/Sources/ManifestParser/main.swift b/ReleaseTooling/Sources/ManifestParser/main.swift index a6d976a0f21..900488afdfb 100644 --- a/ReleaseTooling/Sources/ManifestParser/main.swift +++ b/ReleaseTooling/Sources/ManifestParser/main.swift @@ -69,9 +69,7 @@ struct ManifestParser: ParsableCommand { try parsePodNames(FirebaseManifest.shared) case .forGHAMatrixGeneration: guard let sdkRepoURL = SDKRepoURL else { - throw fatalError( - "--sdk-repo-url should be specified when --for-gha-matrix-generation is on." - ) + fatalError("--sdk-repo-url should be specified when --for-gha-matrix-generation is on.") } let specCollector = GHAMatrixSpecCollector( SDKRepoURL: sdkRepoURL, From 62ef13208dbdbb89b58b1a3abe34981ab471339b Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Thu, 14 Nov 2024 10:50:14 -0500 Subject: [PATCH 2/6] Allow running release.buildup_SpecsReleasing_repo with workflow_dispatch --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2d934918c71..3722efa96da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,7 +107,7 @@ jobs: buildup_SpecsReleasing_repo: needs: [buildup_SpecsReleasing_repo_FirebaseCore, specs_checking] # Don't run on private repo unless it is a PR. - if: github.repository == 'Firebase/firebase-ios-sdk' + if: github.repository == 'Firebase/firebase-ios-sdk' || github.event_name == 'workflow_dispatch' runs-on: macos-14 strategy: fail-fast: false From 431fa6b060b943b67e9a30167fa731ec99e326cd Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Thu, 14 Nov 2024 10:51:22 -0500 Subject: [PATCH 3/6] Allow running cocoapods-integration.tests with workflow_dispatch --- .github/workflows/cocoapods-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cocoapods-integration.yml b/.github/workflows/cocoapods-integration.yml index bd82129d66f..465bb9002eb 100644 --- a/.github/workflows/cocoapods-integration.yml +++ b/.github/workflows/cocoapods-integration.yml @@ -17,7 +17,7 @@ concurrency: jobs: tests: # Don't run on private repo unless it is a PR. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' runs-on: macos-14 steps: From e936660f5e2a4f128af5bfdbf844822ba3251cea Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Thu, 14 Nov 2024 10:53:04 -0500 Subject: [PATCH 4/6] Allow running generate_notices.generate_a_notice with workflow_dispatch --- .github/workflows/notice_generation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notice_generation.yml b/.github/workflows/notice_generation.yml index 579db732cbc..58f9a4345b8 100644 --- a/.github/workflows/notice_generation.yml +++ b/.github/workflows/notice_generation.yml @@ -11,7 +11,7 @@ on: jobs: generate_a_notice: # Don't run on private repo. - if: github.repository == 'Firebase/firebase-ios-sdk' + if: github.repository == 'Firebase/firebase-ios-sdk' || github.event_name == 'workflow_dispatch' runs-on: macos-14 name: Generate NOTICES env: From 252310e4417d4b62f8be58a013b4556134ca5117 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Thu, 14 Nov 2024 10:59:49 -0500 Subject: [PATCH 5/6] Split long line --- .github/workflows/cocoapods-integration.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cocoapods-integration.yml b/.github/workflows/cocoapods-integration.yml index 465bb9002eb..0e08b9a3a6f 100644 --- a/.github/workflows/cocoapods-integration.yml +++ b/.github/workflows/cocoapods-integration.yml @@ -17,7 +17,8 @@ concurrency: jobs: tests: # Don't run on private repo unless it is a PR. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' + || github.event_name == 'workflow_dispatch' runs-on: macos-14 steps: From 0d3471008dca962e023ead5ed32b6530fbc91ef9 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Thu, 14 Nov 2024 11:01:48 -0500 Subject: [PATCH 6/6] Filter out pods that aren't releasing in `parsePodNames` --- ReleaseTooling/Sources/ManifestParser/main.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ReleaseTooling/Sources/ManifestParser/main.swift b/ReleaseTooling/Sources/ManifestParser/main.swift index 900488afdfb..88cd76159f0 100644 --- a/ReleaseTooling/Sources/ManifestParser/main.swift +++ b/ReleaseTooling/Sources/ManifestParser/main.swift @@ -42,15 +42,12 @@ struct ManifestParser: ParsableCommand { }) var outputFilePath: URL - @Option(parsing: .upToNextOption, help: "Podspec files that will not be included.") - var excludedSpecs: [String] - @Flag(help: "Parsing mode for manifest") var mode: ParsingMode func parsePodNames(_ manifest: Manifest) throws { var output: [String] = [] - for pod in manifest.pods { + for pod in manifest.pods.filter({ $0.releasing }) { output.append(pod.name) } do {