Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infra] Exclude pods that aren't releasing in GHAMatrixSpecCollector #14119

Merged
merged 7 commits into from
Nov 14, 2024
1 change: 1 addition & 0 deletions .github/workflows/cocoapods-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ 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'

runs-on: macos-14
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notice_generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ struct SDKPodspec: Codable {
struct GHAMatrixSpecCollector {
var SDKRepoURL: URL
var outputSpecFileURL: URL
var excludedSDKs: [String] = []
andrewheard marked this conversation as resolved.
Show resolved Hide resolved

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
Expand Down
9 changes: 2 additions & 7 deletions ReleaseTooling/Sources/ManifestParser/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,12 @@ struct ManifestParser: ParsableCommand {
})
var outputFilePath: URL

@Option(parsing: .upToNextOption, help: "Podspec files that will not be included.")
andrewheard marked this conversation as resolved.
Show resolved Hide resolved
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 {
Expand All @@ -69,9 +66,7 @@ struct ManifestParser: ParsableCommand {
try parsePodNames(FirebaseManifest.shared)
case .forGHAMatrixGeneration:
guard let sdkRepoURL = SDKRepoURL else {
throw fatalError(
andrewheard marked this conversation as resolved.
Show resolved Hide resolved
"--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,
Expand Down
Loading