From 91945f77dc88e281c7de5b796fb5fbfbf53c8e36 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Wed, 13 Sep 2023 18:52:50 -0400 Subject: [PATCH 01/20] [Firestore] Consolidate Firestore and FirestoreSwift --- FirebaseFirestore.podspec | 3 + FirebaseFirestoreSwift.podspec | 7 +- .../Sources/FirebaseFirestoreSwift.swift | 37 ++++ .../CollectionReference+AsyncAwait.swift | 4 +- .../AsyncAwait/Firestore+AsyncAwait.swift | 4 +- .../Codable/CodablePassThroughTypes.swift | 4 +- .../CollectionReference+WriteEncodable.swift | 4 +- .../Swift/Source/Codable/DocumentID.swift | 4 +- .../Codable/DocumentReference+Codable.swift | 4 +- .../DocumentReference+ReadDecodable.swift | 4 +- .../DocumentReference+WriteEncodable.swift | 4 +- .../DocumentSnapshot+ReadDecodable.swift | 4 +- .../Swift/Source/Codable/EncoderDecoder.swift | 4 +- .../Swift/Source/Codable/ExplicitNull.swift | 4 +- .../Source/Codable/FieldValue+Encodable.swift | 4 +- .../Source/Codable/GeoPoint+Codable.swift | 4 +- .../Source/Codable/ServerTimestamp.swift | 4 +- .../Source/Codable/Timestamp+Codable.swift | 4 +- .../Codable/TimestampDecodingStrategy.swift | 4 +- .../Codable/TimestampEncodingStrategy.swift | 4 +- .../Codable/Transaction+WriteEncodable.swift | 4 +- .../Codable/WriteBatch+WriteEncodable.swift | 4 +- .../PropertyWrapper/FirestoreQuery.swift | 4 +- .../FirestoreQueryObservable.swift | 4 +- .../PropertyWrapper/QueryPredicate.swift | 4 +- .../Source/SPMSwiftHeaderWorkaround.swift | 29 +++ Package.swift | 208 +++++++++--------- 27 files changed, 247 insertions(+), 125 deletions(-) create mode 100644 FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift create mode 100644 Firestore/Swift/Source/SPMSwiftHeaderWorkaround.swift diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index d846ca519bb..57f0ac80b2f 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -51,6 +51,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, 'Firestore/core/include/**/*.{cc,mm}', 'Firestore/core/src/**/*.{cc,mm}', 'FirebaseAuth/Interop/*.h', + 'Firestore/Swift/Source/**/*.swift', ] # Internal headers that aren't necessarily globally unique. Most C++ internal @@ -89,6 +90,8 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, s.dependency 'FirebaseAppCheckInterop', '~> 10.17' s.dependency 'FirebaseCore', '~> 10.0' + s.dependency 'FirebaseCoreExtension', '~> 10.0' + s.dependency 'FirebaseSharedSwift', '~> 10.0' abseil_version = '~> 1.20220623.0' s.dependency 'abseil/algorithm', abseil_version diff --git a/FirebaseFirestoreSwift.podspec b/FirebaseFirestoreSwift.podspec index d1c43768369..ef0afa3ceb2 100644 --- a/FirebaseFirestoreSwift.podspec +++ b/FirebaseFirestoreSwift.podspec @@ -31,12 +31,9 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, s.requires_arc = true s.source_files = [ - 'Firestore/Swift/Source/**/*.swift', + 'FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift' ] - s.dependency 'FirebaseCore', '~> 10.0' - s.dependency 'FirebaseCoreExtension', '~> 10.0' - s.dependency 'FirebaseFirestore', '~> 10.0' - s.dependency 'FirebaseSharedSwift', '~> 10.0' + s.dependency 'FirebaseFirestore', '~> 10.16' end diff --git a/FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift b/FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift new file mode 100644 index 00000000000..a0b0d6a1447 --- /dev/null +++ b/FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift @@ -0,0 +1,37 @@ +// Copyright 2023 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. + +#warning(""" +The `FirebaseFirestoreSwift` module is deprecated and will be removed in +the future. All of the public API from `FirebaseFirestoreSwift` can now be +accessed through the `FirebaseFirestore` module. To migrate, delete imports +of `FirebaseFirestoreSwift` and remove the module as a dependency to your +project. If applicable, any APIs namespaced with `FirebaseFirestoreSwift` +can now be namespaced with `FirebaseFirestore`. Additionally, if +applicable, `@testable import FirebaseFirestoreSwift` should be replaced +with `@testable import FirebaseFirestore`. +""") + +// The `@_exported` is needed to prevent breaking clients that are using +// types prefixed with the `FirebaseFirestoreSwift` namespace. +@_exported import enum FirebaseFirestore.DecodingFailureStrategy +@_exported import struct FirebaseFirestore.DocumentID +@_exported import protocol FirebaseFirestore.DocumentIDWrappable +@_exported import struct FirebaseFirestore.ExplicitNull +@_exported import enum FirebaseFirestore.FirestoreDecodingError +@_exported import enum FirebaseFirestore.FirestoreEncodingError +@_exported import struct FirebaseFirestore.FirestoreQuery +@_exported import enum FirebaseFirestore.QueryPredicate +@_exported import struct FirebaseFirestore.ServerTimestamp +@_exported import protocol FirebaseFirestore.ServerTimestampWrappable diff --git a/Firestore/Swift/Source/AsyncAwait/CollectionReference+AsyncAwait.swift b/Firestore/Swift/Source/AsyncAwait/CollectionReference+AsyncAwait.swift index 3fcb340da63..bb7cac18090 100644 --- a/Firestore/Swift/Source/AsyncAwait/CollectionReference+AsyncAwait.swift +++ b/Firestore/Swift/Source/AsyncAwait/CollectionReference+AsyncAwait.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE import Foundation #if compiler(>=5.5.2) && canImport(_Concurrency) diff --git a/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift b/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift index 2a09c08efab..d9cf549a15c 100644 --- a/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift +++ b/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE import Foundation #if compiler(>=5.5.2) && canImport(_Concurrency) diff --git a/Firestore/Swift/Source/Codable/CodablePassThroughTypes.swift b/Firestore/Swift/Source/Codable/CodablePassThroughTypes.swift index 0b6371745ac..56fceebfd4d 100644 --- a/Firestore/Swift/Source/Codable/CodablePassThroughTypes.swift +++ b/Firestore/Swift/Source/Codable/CodablePassThroughTypes.swift @@ -16,7 +16,9 @@ import Foundation import FirebaseSharedSwift -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE internal struct FirestorePassthroughTypes: StructureCodingPassthroughTypeResolver { static func isPassthroughType(_ t: T) -> Bool { diff --git a/Firestore/Swift/Source/Codable/CollectionReference+WriteEncodable.swift b/Firestore/Swift/Source/Codable/CollectionReference+WriteEncodable.swift index fe3ee5167b9..21d4d8dfc32 100644 --- a/Firestore/Swift/Source/Codable/CollectionReference+WriteEncodable.swift +++ b/Firestore/Swift/Source/Codable/CollectionReference+WriteEncodable.swift @@ -15,7 +15,9 @@ */ import Foundation -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE public extension CollectionReference { /// Encodes an instance of `Encodable` and adds a new document to this collection diff --git a/Firestore/Swift/Source/Codable/DocumentID.swift b/Firestore/Swift/Source/Codable/DocumentID.swift index fca5f8de0d8..d9abce5907b 100644 --- a/Firestore/Swift/Source/Codable/DocumentID.swift +++ b/Firestore/Swift/Source/Codable/DocumentID.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE import FirebaseSharedSwift @_implementationOnly import FirebaseCoreExtension diff --git a/Firestore/Swift/Source/Codable/DocumentReference+Codable.swift b/Firestore/Swift/Source/Codable/DocumentReference+Codable.swift index ca52fac5e63..76f6b2ceec7 100644 --- a/Firestore/Swift/Source/Codable/DocumentReference+Codable.swift +++ b/Firestore/Swift/Source/Codable/DocumentReference+Codable.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE /** Mark DocumentReference to conform to Codable. */ diff --git a/Firestore/Swift/Source/Codable/DocumentReference+ReadDecodable.swift b/Firestore/Swift/Source/Codable/DocumentReference+ReadDecodable.swift index 28e76010055..673be200d07 100644 --- a/Firestore/Swift/Source/Codable/DocumentReference+ReadDecodable.swift +++ b/Firestore/Swift/Source/Codable/DocumentReference+ReadDecodable.swift @@ -15,7 +15,9 @@ */ import Foundation -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE public extension DocumentReference { /// Fetches and decodes the document referenced by this `DocumentReference`. diff --git a/Firestore/Swift/Source/Codable/DocumentReference+WriteEncodable.swift b/Firestore/Swift/Source/Codable/DocumentReference+WriteEncodable.swift index 11fbfa18330..c9345a3867b 100644 --- a/Firestore/Swift/Source/Codable/DocumentReference+WriteEncodable.swift +++ b/Firestore/Swift/Source/Codable/DocumentReference+WriteEncodable.swift @@ -15,7 +15,9 @@ */ import Foundation -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE public extension DocumentReference { /// Encodes an instance of `Encodable` and overwrites the encoded data diff --git a/Firestore/Swift/Source/Codable/DocumentSnapshot+ReadDecodable.swift b/Firestore/Swift/Source/Codable/DocumentSnapshot+ReadDecodable.swift index ad9a10bd92a..90a637d2a9b 100644 --- a/Firestore/Swift/Source/Codable/DocumentSnapshot+ReadDecodable.swift +++ b/Firestore/Swift/Source/Codable/DocumentSnapshot+ReadDecodable.swift @@ -15,7 +15,9 @@ */ import Foundation -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE public extension DocumentSnapshot { /// Retrieves all fields in a document and converts them to an instance of diff --git a/Firestore/Swift/Source/Codable/EncoderDecoder.swift b/Firestore/Swift/Source/Codable/EncoderDecoder.swift index 3c35117222c..1e503999a39 100644 --- a/Firestore/Swift/Source/Codable/EncoderDecoder.swift +++ b/Firestore/Swift/Source/Codable/EncoderDecoder.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE import FirebaseSharedSwift import Foundation diff --git a/Firestore/Swift/Source/Codable/ExplicitNull.swift b/Firestore/Swift/Source/Codable/ExplicitNull.swift index 980093dbf0c..428c9755890 100644 --- a/Firestore/Swift/Source/Codable/ExplicitNull.swift +++ b/Firestore/Swift/Source/Codable/ExplicitNull.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE /// Wraps an `Optional` field in a `Codable` object such that when the field /// has a `nil` value it will encode to a null value in Firestore. Normally, diff --git a/Firestore/Swift/Source/Codable/FieldValue+Encodable.swift b/Firestore/Swift/Source/Codable/FieldValue+Encodable.swift index ef52b09f30f..554d86d505b 100644 --- a/Firestore/Swift/Source/Codable/FieldValue+Encodable.swift +++ b/Firestore/Swift/Source/Codable/FieldValue+Encodable.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE /** Extends FieldValue to conform to Encodable. */ extension FieldValue: Encodable { diff --git a/Firestore/Swift/Source/Codable/GeoPoint+Codable.swift b/Firestore/Swift/Source/Codable/GeoPoint+Codable.swift index 60acc2db661..befcd1235c3 100644 --- a/Firestore/Swift/Source/Codable/GeoPoint+Codable.swift +++ b/Firestore/Swift/Source/Codable/GeoPoint+Codable.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE /** * A protocol describing the encodable properties of a GeoPoint. diff --git a/Firestore/Swift/Source/Codable/ServerTimestamp.swift b/Firestore/Swift/Source/Codable/ServerTimestamp.swift index bd211a9c442..1be29446b73 100644 --- a/Firestore/Swift/Source/Codable/ServerTimestamp.swift +++ b/Firestore/Swift/Source/Codable/ServerTimestamp.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE /// A type that can initialize itself from a Firestore Timestamp, which makes /// it suitable for use with the `@ServerTimestamp` property wrapper. diff --git a/Firestore/Swift/Source/Codable/Timestamp+Codable.swift b/Firestore/Swift/Source/Codable/Timestamp+Codable.swift index 9bed88200ad..15281e6e67b 100644 --- a/Firestore/Swift/Source/Codable/Timestamp+Codable.swift +++ b/Firestore/Swift/Source/Codable/Timestamp+Codable.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE /** * A protocol describing the encodable properties of a Timestamp. diff --git a/Firestore/Swift/Source/Codable/TimestampDecodingStrategy.swift b/Firestore/Swift/Source/Codable/TimestampDecodingStrategy.swift index d72c941ac77..57d69dc4d80 100644 --- a/Firestore/Swift/Source/Codable/TimestampDecodingStrategy.swift +++ b/Firestore/Swift/Source/Codable/TimestampDecodingStrategy.swift @@ -15,7 +15,9 @@ */ import Foundation -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE import FirebaseSharedSwift public extension FirebaseDataDecoder.DateDecodingStrategy { diff --git a/Firestore/Swift/Source/Codable/TimestampEncodingStrategy.swift b/Firestore/Swift/Source/Codable/TimestampEncodingStrategy.swift index 7d1f47dc9fb..7b9bf45098c 100644 --- a/Firestore/Swift/Source/Codable/TimestampEncodingStrategy.swift +++ b/Firestore/Swift/Source/Codable/TimestampEncodingStrategy.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE import FirebaseSharedSwift import Foundation diff --git a/Firestore/Swift/Source/Codable/Transaction+WriteEncodable.swift b/Firestore/Swift/Source/Codable/Transaction+WriteEncodable.swift index 196cee6c94b..dc8d0ea9531 100644 --- a/Firestore/Swift/Source/Codable/Transaction+WriteEncodable.swift +++ b/Firestore/Swift/Source/Codable/Transaction+WriteEncodable.swift @@ -15,7 +15,9 @@ */ import Foundation -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE public extension Transaction { /// Encodes an instance of `Encodable` and overwrites the encoded data diff --git a/Firestore/Swift/Source/Codable/WriteBatch+WriteEncodable.swift b/Firestore/Swift/Source/Codable/WriteBatch+WriteEncodable.swift index 8232325d1fd..7afda568be5 100644 --- a/Firestore/Swift/Source/Codable/WriteBatch+WriteEncodable.swift +++ b/Firestore/Swift/Source/Codable/WriteBatch+WriteEncodable.swift @@ -15,7 +15,9 @@ */ import Foundation -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE public extension WriteBatch { /// Encodes an instance of `Encodable` and overwrites the encoded data diff --git a/Firestore/Swift/Source/PropertyWrapper/FirestoreQuery.swift b/Firestore/Swift/Source/PropertyWrapper/FirestoreQuery.swift index 16ca88baa27..d0663c71801 100644 --- a/Firestore/Swift/Source/PropertyWrapper/FirestoreQuery.swift +++ b/Firestore/Swift/Source/PropertyWrapper/FirestoreQuery.swift @@ -15,7 +15,9 @@ */ import SwiftUI -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE /// The strategy to use when an error occurs during mapping Firestore documents /// to the target type of `FirestoreQuery`. diff --git a/Firestore/Swift/Source/PropertyWrapper/FirestoreQueryObservable.swift b/Firestore/Swift/Source/PropertyWrapper/FirestoreQueryObservable.swift index ba1db479c9c..c1c9d35b66f 100644 --- a/Firestore/Swift/Source/PropertyWrapper/FirestoreQueryObservable.swift +++ b/Firestore/Swift/Source/PropertyWrapper/FirestoreQueryObservable.swift @@ -15,7 +15,9 @@ */ import SwiftUI -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE @available(iOS 14.0, macOS 11.0, macCatalyst 14.0, tvOS 14.0, watchOS 7.0, *) internal class FirestoreQueryObservable: ObservableObject { diff --git a/Firestore/Swift/Source/PropertyWrapper/QueryPredicate.swift b/Firestore/Swift/Source/PropertyWrapper/QueryPredicate.swift index 54779049d10..e40e10f59cc 100644 --- a/Firestore/Swift/Source/PropertyWrapper/QueryPredicate.swift +++ b/Firestore/Swift/Source/PropertyWrapper/QueryPredicate.swift @@ -14,7 +14,9 @@ * limitations under the License. */ -import FirebaseFirestore +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal +#endif // SWIFT_PACKAGE /// Query predicates that can be used to filter results fetched by `FirestoreQuery`. /// diff --git a/Firestore/Swift/Source/SPMSwiftHeaderWorkaround.swift b/Firestore/Swift/Source/SPMSwiftHeaderWorkaround.swift new file mode 100644 index 00000000000..986d54e697f --- /dev/null +++ b/Firestore/Swift/Source/SPMSwiftHeaderWorkaround.swift @@ -0,0 +1,29 @@ +// Copyright 2023 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. +#if SWIFT_PACKAGE + @_exported import FirebaseFirestoreInternal + + // This is a trick to force generate a `FirebaseFirestore-Swift.h` + // header that re-exports `FirebaseFirestoreInternal` for Objective-C + // clients. It is important for the below code to reference a Remote + // Config symbol defined in Objective-C as that will import the symbol's + // module (`FirebaseFirestoreInternal`) in the generated header. This + // allows Objective-C clients to import Remote Config's Objective-C API + // using `@import FirebaseFirestore;`. This API is not needed for Swift + // clients and is therefore unavailable in a Swift context. + @available(*, unavailable) + @objc public extension Firestore { + static var __no_op: () -> Void { {} } + } +#endif // SWIFT_PACKAGE diff --git a/Package.swift b/Package.swift index 7d641c55d28..db9db015649 100644 --- a/Package.swift +++ b/Package.swift @@ -651,7 +651,6 @@ let package = Package( ] ), firestoreWrapperTarget(), - firestoreTarget(), .target( name: "FirebaseFirestoreSwiftTarget", dependencies: [.target(name: "FirebaseFirestoreSwift", @@ -663,30 +662,9 @@ let package = Package( .target( name: "FirebaseFirestoreSwift", dependencies: [ - "FirebaseCore", - "FirebaseCoreExtension", "FirebaseFirestoreTarget", - "FirebaseSharedSwift", - ], - path: "Firestore", - exclude: [ - "CHANGELOG.md", - "CMakeLists.txt", - "Example/", - "LICENSE", - "Protos/", - "README.md", - "Source/", - "core/", - "fuzzing/", - "test.sh", - "Swift/CHANGELOG.md", - "Swift/Tests/", - "third_party/nlohmann_json", ], - sources: [ - "Swift/Source/", - ] + path: "FirebaseFirestoreSwift/Sources" ), // MARK: - Firebase Functions @@ -1296,8 +1274,7 @@ let package = Package( .headerSearchPath("../../.."), ] ), - - ], + ] + firestoreTargets(), cLanguageStandard: .c99, cxxLanguageStandard: CXXLanguageStandard.gnucxx14 ) @@ -1324,7 +1301,9 @@ func abseilDependency() -> Package.Dependency { if ProcessInfo.processInfo.environment["FIREBASE_SOURCE_FIRESTORE"] != nil { packageInfo = ( "https://github.com/firebase/abseil-cpp-SwiftPM.git", - "0.20220623.0" ..< "0.20220624.0" +// "0.20220623.0" ..< "0.20220624.0" + // Use older version because above newer version is broken. See #11788. + "0.20220203.1" ..< "0.20220204.0" ) } else { packageInfo = ( @@ -1371,6 +1350,7 @@ func firestoreWrapperTarget() -> Target { .product(name: "abseil", package: "abseil-cpp-binary"), .product(name: "gRPC-C++", package: "grpc-binary"), .product(name: "nanopb", package: "nanopb"), + "FirebaseAppCheckInterop", "FirebaseCore", "leveldb", ], @@ -1383,82 +1363,114 @@ func firestoreWrapperTarget() -> Target { ) } -func firestoreTarget() -> Target { +func firestoreTargets() -> [Target] { if ProcessInfo.processInfo.environment["FIREBASE_SOURCE_FIRESTORE"] != nil { - return .target( - name: "FirebaseFirestore", - dependencies: [ - "FirebaseAppCheckInterop", - "FirebaseCore", - "leveldb", - .product(name: "nanopb", package: "nanopb"), - .product(name: "abseil", package: "abseil-cpp-SwiftPM"), - .product(name: "gRPC-cpp", package: "grpc-ios"), - ], - path: "Firestore", - exclude: [ - "CHANGELOG.md", - "CMakeLists.txt", - "Example/", - "LICENSE", - "Protos/CMakeLists.txt", - "Protos/Podfile", - "Protos/README.md", - "Protos/build_protos.py", - "Protos/cpp/", - "Protos/lib/", - "Protos/nanopb_cpp_generator.py", - "Protos/protos/", - "README.md", - "Source/CMakeLists.txt", - "Swift/", - "core/CMakeLists.txt", - "core/src/util/config_detected.h.in", - "core/test/", - "fuzzing/", - "test.sh", - // Swift PM doesn't recognize hpp files, so we're relying on search paths - // to find third_party/nlohmann_json/json.hpp. - "third_party/", + return [ + .target( + name: "FirebaseFirestoreInternal", + dependencies: [ + "FirebaseAppCheckInterop", + "FirebaseCore", + "leveldb", + .product(name: "nanopb", package: "nanopb"), + .product(name: "abseil", package: "abseil-cpp-SwiftPM"), + .product(name: "gRPC-cpp", package: "grpc-ios"), + ], + path: "Firestore", + exclude: [ + "CHANGELOG.md", + "CMakeLists.txt", + "Example/", + "LICENSE", + "Protos/CMakeLists.txt", + "Protos/Podfile", + "Protos/README.md", + "Protos/build_protos.py", + "Protos/cpp/", + "Protos/lib/", + "Protos/nanopb_cpp_generator.py", + "Protos/protos/", + "README.md", + "Source/CMakeLists.txt", + "Swift/", + "core/CMakeLists.txt", + "core/src/util/config_detected.h.in", + "core/test/", + "fuzzing/", + "test.sh", + // Swift PM doesn't recognize hpp files, so we're relying on search paths + // to find third_party/nlohmann_json/json.hpp. + "third_party/", - // Exclude alternate implementations for other platforms - "core/src/remote/connectivity_monitor_noop.cc", - "core/src/util/filesystem_win.cc", - "core/src/util/log_stdio.cc", - "core/src/util/secure_random_openssl.cc", - ], - sources: [ - "Source/", - "Protos/nanopb/", - "core/include/", - "core/src", - ], - publicHeadersPath: "Source/Public", - cSettings: [ - .headerSearchPath("../"), - .headerSearchPath("Source/Public/FirebaseFirestore"), - .headerSearchPath("Protos/nanopb"), - .define("PB_FIELD_32BIT", to: "1"), - .define("PB_NO_PACKED_STRUCTS", to: "1"), - .define("PB_ENABLE_MALLOC", to: "1"), - .define("FIRFirestore_VERSION", to: firebaseVersion), - ], - linkerSettings: [ - .linkedFramework( - "SystemConfiguration", - .when(platforms: [.iOS, .macOS, .tvOS, .firebaseVisionOS]) - ), - .linkedFramework("UIKit", .when(platforms: [.iOS, .tvOS, .firebaseVisionOS])), - .linkedLibrary("c++"), - ] - ) + // Exclude alternate implementations for other platforms + "core/src/remote/connectivity_monitor_noop.cc", + "core/src/util/filesystem_win.cc", + "core/src/util/log_stdio.cc", + "core/src/util/secure_random_openssl.cc", + ], + sources: [ + "Source/", + "Protos/nanopb/", + "core/include/", + "core/src", + ], + publicHeadersPath: "Source/Public", + cSettings: [ + .headerSearchPath("../"), + .headerSearchPath("Source/Public/FirebaseFirestore"), + .headerSearchPath("Protos/nanopb"), + .define("PB_FIELD_32BIT", to: "1"), + .define("PB_NO_PACKED_STRUCTS", to: "1"), + .define("PB_ENABLE_MALLOC", to: "1"), + .define("FIRFirestore_VERSION", to: firebaseVersion), + ], + linkerSettings: [ + .linkedFramework( + "SystemConfiguration", + .when(platforms: [.iOS, .macOS, .tvOS, .firebaseVisionOS]) + ), + .linkedFramework("UIKit", .when(platforms: [.iOS, .tvOS, .firebaseVisionOS])), + .linkedLibrary("c++"), + ] + ), + .target( + name: "FirebaseFirestore", + dependencies: [ + "FirebaseCore", + "FirebaseCoreExtension", + "FirebaseFirestoreInternal", + "FirebaseSharedSwift", + ], + path: "Firestore", + exclude: [ + "CHANGELOG.md", + "CMakeLists.txt", + "Example/", + "LICENSE", + "Protos/", + "README.md", + "Source/", + "core/", + "fuzzing/", + "test.sh", + "Swift/CHANGELOG.md", + "Swift/Tests/", + "third_party/nlohmann_json", + ], + sources: [ + "Swift/Source/", + ] + ), + ] } else if ProcessInfo.processInfo.environment["FIREBASECI_USE_LOCAL_FIRESTORE_ZIP"] != nil { // This is set when running `scripts/check_firestore_symbols.sh`. - return .binaryTarget( - name: "FirebaseFirestore", - // The `xcframework` should be moved to the root of the repo. - path: "FirebaseFirestore.xcframework" - ) + return [ + .binaryTarget( + name: "FirebaseFirestore", + // The `xcframework` should be moved to the root of the repo. + path: "FirebaseFirestore.xcframework" + ), + ] } return .binaryTarget( From d9ac38343b52b69982c26525a36eade623145702 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Thu, 14 Sep 2023 00:04:47 -0400 Subject: [PATCH 02/20] Allow warnings since FSTSwift is deprecated --- ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift b/ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift index 0f73d19f074..515ce6f823a 100755 --- a/ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift +++ b/ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift @@ -48,7 +48,7 @@ public let shared = Manifest( Pod("FirebaseDatabaseSwift", zip: true), Pod("FirebaseDynamicLinks", platforms: ["ios"], zip: true), Pod("FirebaseFirestore", allowWarnings: true), - Pod("FirebaseFirestoreSwift", zip: true), + Pod("FirebaseFirestoreSwift", allowWarnings: true, zip: true), Pod("FirebaseFunctions", zip: true), Pod("FirebaseInAppMessaging", isBeta: true, platforms: ["ios"]), Pod("FirebaseInAppMessagingSwift", isBeta: true, platforms: ["ios"], zip: true), From d3428f2bb3ac397236553c8d6e76dd2b1a11dc9c Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Thu, 14 Sep 2023 00:46:24 -0400 Subject: [PATCH 03/20] Update binary artifact --- Package.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index db9db015649..6f959905675 100644 --- a/Package.swift +++ b/Package.swift @@ -1473,11 +1473,13 @@ func firestoreTargets() -> [Target] { ] } - return .binaryTarget( - name: "FirebaseFirestore", - url: "https://dl.google.com/firebase/ios/bin/firestore/10.16.0/FirebaseFirestore.zip", - checksum: "0a6616a4bbf1adb2f0a502e9ad8e5ab144a8c4993a15bb4b795bae86b66ecab8" - ) + return [ + .binaryTarget( + name: "FirebaseFirestore", + url: "https://dl.google.com//firebase/ios/sandbox/bin/firestore/10.16.0/FirebaseFirestore.zip", + checksum: "ebf71284189f81602ca7551449acbda704d11ab9834a3c544a833d0c168ad072" + ), + ] } extension Platform { From 29599fd694c1a92a5bfc7b05c7efdc94c6c0d065 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Thu, 14 Sep 2023 00:50:34 -0400 Subject: [PATCH 04/20] Add missing dependencies to FST wrapper target --- Package.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Package.swift b/Package.swift index 6f959905675..8fe3da92bb2 100644 --- a/Package.swift +++ b/Package.swift @@ -1352,6 +1352,8 @@ func firestoreWrapperTarget() -> Target { .product(name: "nanopb", package: "nanopb"), "FirebaseAppCheckInterop", "FirebaseCore", + "FirebaseCoreExtension", + "FirebaseSharedSwift", "leveldb", ], path: "SwiftPM-PlatformExclude/FirebaseFirestoreWrap", From a239bd8aa8ccb0496c8de5bdc64f513c53071448 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Thu, 14 Sep 2023 00:53:01 -0400 Subject: [PATCH 05/20] Add changelog entries --- Firestore/CHANGELOG.md | 6 ++++++ Firestore/Swift/CHANGELOG.md | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md index 44dafdecb09..b0f68196083 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -1,3 +1,9 @@ +# Unreleased +- [feature] The `FirebaseFirestore` module now contains Firebase Firestore's + Swift-only APIs that were previously only available via the + `FirebaseFirestoreSwift` extension SDK. See the + `FirebaseFirestoreSwift` release note from this release for more details. + # 10.16.0 - [fixed] Fixed an issue where Firestore's binary SwiftPM distribution would not link properly when building a target for testing. This issue affected diff --git a/Firestore/Swift/CHANGELOG.md b/Firestore/Swift/CHANGELOG.md index a176d7c4e11..535138cc9e6 100644 --- a/Firestore/Swift/CHANGELOG.md +++ b/Firestore/Swift/CHANGELOG.md @@ -1,3 +1,15 @@ +Unreleased +- [deprecated] `FirebaseFirestoreSwift` has been deprecated, and will be + removed in a future release. All of the public API from + `FirebaseFirestoreSwift` can now be accessed through the + `FirebaseFirestore` module. To migrate, delete imports of + `FirebaseFirestoreSwift` and remove the module as a dependency to your + project. If applicable, any APIs namespaced with + `FirebaseFirestoreSwift` can now be namespaced with + `FirebaseFirestore`. Additionally, if applicable, + `@testable import FirebaseFirestoreSwift` should be replaced with + `@testable import FirebaseFirestore`. + # 10.12.0 - [added] Added support animations on the `@FirestoreQuery` property wrapper. From 86809694b80dcecd8c2f94e51d56e769a07fd808 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Thu, 14 Sep 2023 09:42:15 -0400 Subject: [PATCH 06/20] Add missing '#' to changelog entry --- Firestore/Swift/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firestore/Swift/CHANGELOG.md b/Firestore/Swift/CHANGELOG.md index 535138cc9e6..729384881c6 100644 --- a/Firestore/Swift/CHANGELOG.md +++ b/Firestore/Swift/CHANGELOG.md @@ -1,4 +1,4 @@ -Unreleased +# Unreleased - [deprecated] `FirebaseFirestoreSwift` has been deprecated, and will be removed in a future release. All of the public API from `FirebaseFirestoreSwift` can now be accessed through the From b6c81a1c19d544918d12df0cdd23aab07f559f06 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Thu, 14 Sep 2023 09:54:10 -0400 Subject: [PATCH 07/20] Update binary artifacts for FST and SharedSwift --- Package.swift | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Package.swift b/Package.swift index 8fe3da92bb2..0bbb146cb80 100644 --- a/Package.swift +++ b/Package.swift @@ -616,13 +616,10 @@ let package = Package( dependencies: ["FirebaseDatabase", "FirebaseDatabaseSwift"], path: "FirebaseDatabaseSwift/Tests/" ), - .target( + .binaryTarget( name: "FirebaseSharedSwift", - path: "FirebaseSharedSwift/Sources", - exclude: [ - "third_party/FirebaseDataEncoder/LICENSE", - "third_party/FirebaseDataEncoder/METADATA", - ] + url: "https://dl.google.com/firebase/ios/experimental/bin/sharedswift/11.0.0/FirebaseSharedSwift.zip", + checksum: "c9f6699932bba781457363daff279b452ac6322283d250cfb5dd860f48c889c7" ), .testTarget( name: "FirebaseSharedSwiftTests", @@ -1478,7 +1475,7 @@ func firestoreTargets() -> [Target] { return [ .binaryTarget( name: "FirebaseFirestore", - url: "https://dl.google.com//firebase/ios/sandbox/bin/firestore/10.16.0/FirebaseFirestore.zip", + url: "https://dl.google.com/firebase/ios/experimental/bin/firestore/10.16.0/FirebaseFirestore.zip", checksum: "ebf71284189f81602ca7551449acbda704d11ab9834a3c544a833d0c168ad072" ), ] From c58c3727d26b2ea59f9c06301bfa509f5608eb98 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Thu, 14 Sep 2023 15:41:05 -0400 Subject: [PATCH 08/20] Attempt to fix zip CI --- FirebaseFirestore.podspec | 1 + .../Sources/FirebaseFirestoreSwift.swift | 13 +++---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index 57f0ac80b2f..4caef19254b 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -114,6 +114,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, s.library = 'c++' s.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14', + 'CLANG_CXX_LIBRARY' => 'libc++', 'GCC_C_LANGUAGE_STANDARD' => 'c99', 'GCC_PREPROCESSOR_DEFINITIONS' => "FIRFirestore_VERSION=#{s.version} " + diff --git a/FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift b/FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift index a0b0d6a1447..17d758d276d 100644 --- a/FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift +++ b/FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift @@ -12,16 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#warning(""" -The `FirebaseFirestoreSwift` module is deprecated and will be removed in -the future. All of the public API from `FirebaseFirestoreSwift` can now be -accessed through the `FirebaseFirestore` module. To migrate, delete imports -of `FirebaseFirestoreSwift` and remove the module as a dependency to your -project. If applicable, any APIs namespaced with `FirebaseFirestoreSwift` -can now be namespaced with `FirebaseFirestore`. Additionally, if -applicable, `@testable import FirebaseFirestoreSwift` should be replaced -with `@testable import FirebaseFirestore`. -""") +#warning( + "The `FirebaseFirestoreSwift` module is deprecated and will be removed in the future. All of the public API from `FirebaseFirestoreSwift` can now be accessed through the `FirebaseFirestore` module. To migrate, delete imports of `FirebaseFirestoreSwift` and remove the module as a dependency to your project. If applicable, any APIs namespaced with `FirebaseFirestoreSwift` can now be namespaced with `FirebaseFirestore`. Additionally, if applicable, `@testable import FirebaseFirestoreSwift` should be replaced with `@testable import FirebaseFirestore`." +) // The `@_exported` is needed to prevent breaking clients that are using // types prefixed with the `FirebaseFirestoreSwift` namespace. From 4cec1847421ed0c6813a362746c2d583d8427d7f Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Thu, 14 Sep 2023 17:05:57 -0400 Subject: [PATCH 09/20] Build 'FirebaseSharedSwift.xcframework' with Xcode 14.1 rather than 13.3.1 --- Package.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 0bbb146cb80..4d15683f2de 100644 --- a/Package.swift +++ b/Package.swift @@ -618,8 +618,8 @@ let package = Package( ), .binaryTarget( name: "FirebaseSharedSwift", - url: "https://dl.google.com/firebase/ios/experimental/bin/sharedswift/11.0.0/FirebaseSharedSwift.zip", - checksum: "c9f6699932bba781457363daff279b452ac6322283d250cfb5dd860f48c889c7" + url: "https://dl.google.com/firebase/ios/experimental/bin/sharedswift/10.16.0/FirebaseSharedSwift.zip", + checksum: "cfa32eb16ba8fafa7a443ab8f48e019794470bb358066d6c571df1531df02fe6" ), .testTarget( name: "FirebaseSharedSwiftTests", From 39189473b8ceaf7a6d8040b07ceb65120a7bb6ca Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 15 Sep 2023 07:59:32 -0400 Subject: [PATCH 10/20] Add fixed zip to SPM target --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 4d15683f2de..5b5dbcbcc23 100644 --- a/Package.swift +++ b/Package.swift @@ -1476,7 +1476,7 @@ func firestoreTargets() -> [Target] { .binaryTarget( name: "FirebaseFirestore", url: "https://dl.google.com/firebase/ios/experimental/bin/firestore/10.16.0/FirebaseFirestore.zip", - checksum: "ebf71284189f81602ca7551449acbda704d11ab9834a3c544a833d0c168ad072" + checksum: "62f1ce3478de5ff9672644cd545e10ac0c39ed7c411661d0136ded28489b2c12" ), ] } From f3d2fff3f5a538f7985eeb55826a28ca8086489a Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 15 Sep 2023 11:50:26 -0400 Subject: [PATCH 11/20] Reduce CI running --- .github/workflows/api_diff_report.yml | 180 +-- .github/workflows/client_app.yml | 102 +- .github/workflows/firebasepod.yml | 64 +- .github/workflows/firestore.yml | 419 +++--- .../workflows/health-metrics-presubmit.yml | 812 +++++------ .github/workflows/spectesting.yml | 130 +- .github/workflows/spm.yml | 144 +- .github/workflows/zip.yml | 1200 ++++++++--------- 8 files changed, 1519 insertions(+), 1532 deletions(-) diff --git a/.github/workflows/api_diff_report.yml b/.github/workflows/api_diff_report.yml index 8dfc5cc7616..7a22477bcf4 100644 --- a/.github/workflows/api_diff_report.yml +++ b/.github/workflows/api_diff_report.yml @@ -1,90 +1,90 @@ -name: API Diff Report - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -env: - STAGE_PROGRESS: progress - STAGE_END: end - PR_API_OUTPUT: ci_outputs/pr_branch_api - BASE_API_OUTPUT: ci_outputs/base_branch_api - DIFF_REPORT_OUTPUT: ci_outputs/diff_report - -jobs: - diff_report: - runs-on: macos-latest - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - - steps: - - name: Checkout PR branch - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Copy diff report tools - run: cp -a scripts/api_diff_report/. ~/api_diff_report - - - id: get_changed_files - name: Get changed file list - run: | - echo "file_list=$(git diff --name-only -r HEAD^1 HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT - - - name: Setup python - uses: actions/setup-python@v4 - with: - python-version: 3.7 - - - name: Install Prerequisites - run: ~/api_diff_report/prerequisite.sh - - - name: Clean Diff Report Comment in PR - run: | - python ~/api_diff_report/pr_commenter.py \ - --stage ${{ env.STAGE_PROGRESS }} \ - --token ${{github.token}} \ - --pr_number ${{github.event.pull_request.number}} \ - --commit $GITHUB_SHA \ - --run_id ${{github.run_id}} - - - name: Generate API files for PR branch - run: | - python ~/api_diff_report/api_info.py \ - --file_list ${{ steps.get_changed_files.outputs.file_list }} \ - --output_dir ${{ env.PR_API_OUTPUT }} - - - name: Checkout Base branch - run: git checkout HEAD^ - - - name: Generate API files for Base branch - run: | - python ~/api_diff_report/api_info.py \ - --file_list ${{ steps.get_changed_files.outputs.file_list }} \ - --output_dir ${{ env.BASE_API_OUTPUT }} - - - name: Generate API Diff Report - run: | - python ~/api_diff_report/api_diff_report.py \ - --pr_branch ${{ env.PR_API_OUTPUT }} \ - --base_branch ${{ env.BASE_API_OUTPUT }} \ - --output_dir ${{ env.DIFF_REPORT_OUTPUT }} - - - name: Update Diff Report Comment in PR - run: | - python ~/api_diff_report/pr_commenter.py \ - --stage ${{ env.STAGE_END }} \ - --report ${{ env.DIFF_REPORT_OUTPUT }} \ - --token ${{github.token}} \ - --pr_number ${{github.event.pull_request.number}} \ - --commit $GITHUB_SHA \ - --run_id ${{github.run_id}} - - - uses: actions/upload-artifact@v3 - if: ${{ !cancelled() }} - with: - name: api_info_and_report - path: ci_outputs - retention-days: 1 +# name: API Diff Report + +# on: [pull_request] + +# concurrency: +# group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} +# cancel-in-progress: true + +# env: +# STAGE_PROGRESS: progress +# STAGE_END: end +# PR_API_OUTPUT: ci_outputs/pr_branch_api +# BASE_API_OUTPUT: ci_outputs/base_branch_api +# DIFF_REPORT_OUTPUT: ci_outputs/diff_report + +# jobs: +# diff_report: +# runs-on: macos-latest +# env: +# FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + +# steps: +# - name: Checkout PR branch +# uses: actions/checkout@v3 +# with: +# fetch-depth: 2 + +# - name: Copy diff report tools +# run: cp -a scripts/api_diff_report/. ~/api_diff_report + +# - id: get_changed_files +# name: Get changed file list +# run: | +# echo "file_list=$(git diff --name-only -r HEAD^1 HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT + +# - name: Setup python +# uses: actions/setup-python@v4 +# with: +# python-version: 3.7 + +# - name: Install Prerequisites +# run: ~/api_diff_report/prerequisite.sh + +# - name: Clean Diff Report Comment in PR +# run: | +# python ~/api_diff_report/pr_commenter.py \ +# --stage ${{ env.STAGE_PROGRESS }} \ +# --token ${{github.token}} \ +# --pr_number ${{github.event.pull_request.number}} \ +# --commit $GITHUB_SHA \ +# --run_id ${{github.run_id}} + +# - name: Generate API files for PR branch +# run: | +# python ~/api_diff_report/api_info.py \ +# --file_list ${{ steps.get_changed_files.outputs.file_list }} \ +# --output_dir ${{ env.PR_API_OUTPUT }} + +# - name: Checkout Base branch +# run: git checkout HEAD^ + +# - name: Generate API files for Base branch +# run: | +# python ~/api_diff_report/api_info.py \ +# --file_list ${{ steps.get_changed_files.outputs.file_list }} \ +# --output_dir ${{ env.BASE_API_OUTPUT }} + +# - name: Generate API Diff Report +# run: | +# python ~/api_diff_report/api_diff_report.py \ +# --pr_branch ${{ env.PR_API_OUTPUT }} \ +# --base_branch ${{ env.BASE_API_OUTPUT }} \ +# --output_dir ${{ env.DIFF_REPORT_OUTPUT }} + +# - name: Update Diff Report Comment in PR +# run: | +# python ~/api_diff_report/pr_commenter.py \ +# --stage ${{ env.STAGE_END }} \ +# --report ${{ env.DIFF_REPORT_OUTPUT }} \ +# --token ${{github.token}} \ +# --pr_number ${{github.event.pull_request.number}} \ +# --commit $GITHUB_SHA \ +# --run_id ${{github.run_id}} + +# - uses: actions/upload-artifact@v3 +# if: ${{ !cancelled() }} +# with: +# name: api_info_and_report +# path: ci_outputs +# retention-days: 1 diff --git a/.github/workflows/client_app.yml b/.github/workflows/client_app.yml index 92fcb132860..d737c5b6b48 100644 --- a/.github/workflows/client_app.yml +++ b/.github/workflows/client_app.yml @@ -1,55 +1,55 @@ -name: client_app +# name: client_app -on: - pull_request: - paths: - - ".github/workflows/client_app.yml" - - "Package.swift" - - ".swiftpm/*" - - "*.podspec" - - "scripts/install_prereqs.sh" - - "scripts/build.sh" - - "ClientApp/**" - - "Gemfile*" - schedule: - # Run every day at 12am (PST) - cron uses UTC times - - cron: "0 8 * * *" +# on: +# pull_request: +# paths: +# - ".github/workflows/client_app.yml" +# - "Package.swift" +# - ".swiftpm/*" +# - "*.podspec" +# - "scripts/install_prereqs.sh" +# - "scripts/build.sh" +# - "ClientApp/**" +# - "Gemfile*" +# schedule: +# # Run every day at 12am (PST) - cron uses UTC times +# - cron: "0 8 * * *" -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} +# cancel-in-progress: true -jobs: - client-app-spm: - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' - env: - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-12 - strategy: - matrix: - #TODO(ncooke3): Add multi-platform support: tvOS, macOS, catalyst - platform: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - name: Build Client App –– ${{ matrix.platform }} - run: scripts/third_party/travis/retry.sh ./scripts/build.sh SwiftPMClientApp ${{ matrix.platform }} xcodebuild +# jobs: +# client-app-spm: +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' +# env: +# FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 +# runs-on: macos-12 +# strategy: +# matrix: +# #TODO(ncooke3): Add multi-platform support: tvOS, macOS, catalyst +# platform: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - name: Build Client App –– ${{ matrix.platform }} +# run: scripts/third_party/travis/retry.sh ./scripts/build.sh SwiftPMClientApp ${{ matrix.platform }} xcodebuild - client-app-cocoapods: - # 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' - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Prereqs - run: scripts/install_prereqs.sh ClientApp iOS xcodebuild - - name: Build - run: scripts/build.sh CocoaPodsClientApp iOS xcodebuild +# client-app-cocoapods: +# # 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' +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Prereqs +# run: scripts/install_prereqs.sh ClientApp iOS xcodebuild +# - name: Build +# run: scripts/build.sh CocoaPodsClientApp iOS xcodebuild diff --git a/.github/workflows/firebasepod.yml b/.github/workflows/firebasepod.yml index ecc59185800..9694d472294 100644 --- a/.github/workflows/firebasepod.yml +++ b/.github/workflows/firebasepod.yml @@ -1,38 +1,38 @@ -name: firebasepod +# name: firebasepod -# Verify that the Firebase.podspec will successfully `pod install`. +# # Verify that the Firebase.podspec will successfully `pod install`. -on: - pull_request: - paths: - - '*.podspec' - - 'CoreOnly/**' - - '.github/workflows/firebasepod.yml' - - 'Gemfile*' - schedule: - # Run every day at 1am (PST) - cron uses UTC times - - cron: '0 9 * * *' +# on: +# pull_request: +# paths: +# - '*.podspec' +# - 'CoreOnly/**' +# - '.github/workflows/firebasepod.yml' +# - 'Gemfile*' +# schedule: +# # Run every day at 1am (PST) - cron uses UTC times +# - cron: '0 9 * * *' -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} +# cancel-in-progress: true -jobs: - installation-test: - # 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' +# jobs: +# installation-test: +# # 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' - runs-on: macos-12 +# runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Prereqs - run: scripts/install_prereqs.sh FirebasePod iOS - - name: Build - run: scripts/build.sh FirebasePod iOS +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Prereqs +# run: scripts/install_prereqs.sh FirebasePod iOS +# - name: Build +# run: scripts/build.sh FirebasePod iOS diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 14ca76163ba..31673f889d5 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -96,225 +96,225 @@ jobs: run: scripts/check.sh --test-only - cmake: - needs: check - # Either a scheduled run from public repo, or a pull request with firestore changes. - if: | - (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || - (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - strategy: - matrix: - os: [macos-12, ubuntu-latest] + # cmake: + # needs: check + # # Either a scheduled run from public repo, or a pull request with firestore changes. + # if: | + # (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || + # (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + # strategy: + # matrix: + # os: [macos-12, ubuntu-latest] - env: - MINT_PATH: ${{ github.workspace }}/mint + # env: + # MINT_PATH: ${{ github.workspace }}/mint - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v3 - - name: Prepare ccache - uses: actions/cache@v3 - with: - path: ${{ runner.temp }}/ccache - key: firestore-ccache-${{ runner.os }}-${{ github.sha }} - restore-keys: | - firestore-ccache-${{ runner.os }}- + # - name: Prepare ccache + # uses: actions/cache@v3 + # with: + # path: ${{ runner.temp }}/ccache + # key: firestore-ccache-${{ runner.os }}-${{ github.sha }} + # restore-keys: | + # firestore-ccache-${{ runner.os }}- - - name: Cache Mint packages - uses: actions/cache@v3 - with: - path: ${{ env.MINT_PATH }} - key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} - restore-keys: ${{ runner.os }}-mint- + # - name: Cache Mint packages + # uses: actions/cache@v3 + # with: + # path: ${{ env.MINT_PATH }} + # key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} + # restore-keys: ${{ runner.os }}-mint- - - name: Setup build - run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake + # - name: Setup build + # run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake - - name: Build and test - run: | - export CCACHE_DIR=${{ runner.temp }}/ccache - scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake + # - name: Build and test + # run: | + # export CCACHE_DIR=${{ runner.temp }}/ccache + # scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake - cmake-prod-db: - # Either a scheduled run from public repo, or a pull request with firestore changes. - if: | - (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || - (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - needs: check + # cmake-prod-db: + # # Either a scheduled run from public repo, or a pull request with firestore changes. + # if: | + # (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || + # (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + # needs: check - strategy: - matrix: - os: [macos-12] - databaseId: [(default), test-db] + # strategy: + # matrix: + # os: [macos-12] + # databaseId: [(default), test-db] - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - MINT_PATH: ${{ github.workspace }}/mint - TARGET_DATABASE_ID: ${{ matrix.databaseId }} + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # MINT_PATH: ${{ github.workspace }}/mint + # TARGET_DATABASE_ID: ${{ matrix.databaseId }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v3 - - name: Prepare ccache - uses: actions/cache@v3 - with: - path: ${{ runner.temp }}/ccache - key: firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}-${{ github.sha }} - restore-keys: | - firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}- + # - name: Prepare ccache + # uses: actions/cache@v3 + # with: + # path: ${{ runner.temp }}/ccache + # key: firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}-${{ github.sha }} + # restore-keys: | + # firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}- - - name: Cache Mint packages - uses: actions/cache@v3 - with: - path: ${{ env.MINT_PATH }} - key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} - restore-keys: ${{ runner.os }}-mint- + # - name: Cache Mint packages + # uses: actions/cache@v3 + # with: + # path: ${{ env.MINT_PATH }} + # key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} + # restore-keys: ${{ runner.os }}-mint- - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/firestore.plist.gpg \ - Firestore/Example/App/GoogleService-Info.plist "$plist_secret" + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/firestore.plist.gpg \ + # Firestore/Example/App/GoogleService-Info.plist "$plist_secret" - - name: Setup build - run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake + # - name: Setup build + # run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake - - name: Build and test - run: | - export CCACHE_DIR=${{ runner.temp }}/ccache - scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake + # - name: Build and test + # run: | + # export CCACHE_DIR=${{ runner.temp }}/ccache + # scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake - sanitizers: - # Either a scheduled run from public repo, or a pull request with firestore changes. - if: | - (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || - (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - needs: check + # sanitizers: + # # Either a scheduled run from public repo, or a pull request with firestore changes. + # if: | + # (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || + # (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + # needs: check - strategy: - matrix: - # TODO(b/260248007): Re-enable this once tsan passes on Linux - os: [macos-12] - sanitizer: [asan, tsan] + # strategy: + # matrix: + # # TODO(b/260248007): Re-enable this once tsan passes on Linux + # os: [macos-12] + # sanitizer: [asan, tsan] - runs-on: ${{ matrix.os }} + # runs-on: ${{ matrix.os }} - env: - SANITIZERS: ${{ matrix.sanitizer }} + # env: + # SANITIZERS: ${{ matrix.sanitizer }} - steps: - - uses: actions/checkout@v3 + # steps: + # - uses: actions/checkout@v3 - - name: Prepare ccache - uses: actions/cache@v3 - with: - path: ${{ runner.temp }}/ccache - key: ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-${{ github.sha }} - restore-keys: | - ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}- + # - name: Prepare ccache + # uses: actions/cache@v3 + # with: + # path: ${{ runner.temp }}/ccache + # key: ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-${{ github.sha }} + # restore-keys: | + # ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}- - - name: Setup build - run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake + # - name: Setup build + # run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake - - name: Build and test - run: | - export CCACHE_DIR=${{ runner.temp }}/ccache - scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake + # - name: Build and test + # run: | + # export CCACHE_DIR=${{ runner.temp }}/ccache + # scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake - xcodebuild: - # Either a scheduled run from public repo, or a pull request with firestore changes. - if: | - (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || - (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - runs-on: macos-12 - needs: check + # xcodebuild: + # # Either a scheduled run from public repo, or a pull request with firestore changes. + # if: | + # (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || + # (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + # runs-on: macos-12 + # needs: check - strategy: - matrix: - target: [iOS, tvOS, macOS] + # strategy: + # matrix: + # target: [iOS, tvOS, macOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.target }} + # steps: + # - uses: actions/checkout@v3 + # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + # with: + # cache_key: ${{ matrix.target }} - - uses: ruby/setup-ruby@v1 + # - uses: ruby/setup-ruby@v1 - - name: Setup build - run: scripts/install_prereqs.sh Firestore ${{ matrix.target }} xcodebuild + # - name: Setup build + # run: scripts/install_prereqs.sh Firestore ${{ matrix.target }} xcodebuild - - name: Build and test - run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild + # - name: Build and test + # run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild - pod-lib-lint: - # Either a scheduled run from public repo, or a pull request with firestore changes. - if: | - (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || - (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - runs-on: macos-12 - needs: check - strategy: - matrix: - podspec: [ - 'FirebaseFirestore.podspec', - 'FirebaseFirestoreSwift.podspec', - ] + # pod-lib-lint: + # # Either a scheduled run from public repo, or a pull request with firestore changes. + # if: | + # (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || + # (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + # runs-on: macos-12 + # needs: check + # strategy: + # matrix: + # podspec: [ + # 'FirebaseFirestore.podspec', + # 'FirebaseFirestoreSwift.podspec', + # ] - steps: - - uses: actions/checkout@v3 + # steps: + # - uses: actions/checkout@v3 - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - - name: Pod lib lint - # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed. - run: | - scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} \ - --platforms=ios \ - --allow-warnings \ - --no-analyze - - # `pod lib lint` takes a long time so only run the other platforms and static frameworks build in the cron. - pod-lib-lint-cron: - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - runs-on: macos-12 - needs: check - strategy: - matrix: - podspec: [ - 'FirebaseFirestore.podspec', - 'FirebaseFirestoreSwift.podspec', - ] - platforms: [ - 'macos', - 'tvos', - ] - flags: [ - '--use-static-frameworks', - '', - ] + # - uses: ruby/setup-ruby@v1 + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh - steps: - - uses: actions/checkout@v3 + # - name: Pod lib lint + # # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed. + # run: | + # scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} \ + # --platforms=ios \ + # --allow-warnings \ + # --no-analyze + + # # `pod lib lint` takes a long time so only run the other platforms and static frameworks build in the cron. + # pod-lib-lint-cron: + # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + # runs-on: macos-12 + # needs: check + # strategy: + # matrix: + # podspec: [ + # 'FirebaseFirestore.podspec', + # 'FirebaseFirestoreSwift.podspec', + # ] + # platforms: [ + # 'macos', + # 'tvos', + # ] + # flags: [ + # '--use-static-frameworks', + # '', + # ] + + # steps: + # - uses: actions/checkout@v3 - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh + # - uses: ruby/setup-ruby@v1 + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh - - name: Pod lib lint - # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed. - run: | - scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }}\ - ${{ matrix.flags }} \ - --platforms=${{ matrix.platforms }} \ - --allow-warnings \ - --no-analyze + # - name: Pod lib lint + # # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed. + # run: | + # scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }}\ + # ${{ matrix.flags }} \ + # --platforms=${{ matrix.platforms }} \ + # --allow-warnings \ + # --no-analyze spm-source: # Either a scheduled run from public repo, or a pull request with firestore changes. @@ -351,21 +351,22 @@ jobs: cache_key: ${{ matrix.os }} - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - - name: iOS Build Test - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly + # - name: iOS Build Test – Binary + # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly + # - name: iOS Build Test – Source + # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly + # env: + # FIREBASE_SOURCE_FIRESTORE: 1 - name: Swift Build run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift iOS spmbuildonly - # TODO: Re-enable either in or after #11706. - # spm-source-cron: + # spm-cron: # # Don't run on private repo. # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' # runs-on: macos-12 # strategy: # matrix: # target: [tvOS, macOS, catalyst] - # env: - # FIREBASE_SOURCE_FIRESTORE: 1 # steps: # - uses: actions/checkout@v3 # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 @@ -375,39 +376,25 @@ jobs: # run: scripts/setup_spm_tests.sh # - name: Build Test - Binary # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly + # # TODO: Re-enable either in or after #11706. + # # - name: Build Test – Source + # # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly + # # env: + # # FIREBASE_SOURCE_FIRESTORE: 1 # - name: Swift Build # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift ${{ matrix.target }} spmbuildonly - spm-binary-cron: - # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - runs-on: macos-12 - strategy: - matrix: - target: [tvOS, macOS, catalyst] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Build Test - Binary - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly - - name: Swift Build - run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift ${{ matrix.target }} spmbuildonly - - # A job that fails if any required job in the test matrix fails, - # to be used as a required check for merging. - check-required-tests: - runs-on: ubuntu-latest - if: always() - name: Check all required Firestore tests results - needs: [cmake, cmake-prod-db, xcodebuild, spm-source, spm-binary] - steps: - - name: Check test matrix - if: needs.cmake.result == 'failure' || needs.cmake-prod-db.result == 'failure' || needs.xcodebuild.result == 'failure' || needs.spm.result == 'failure' - run: exit 1 + # # A job that fails if any required job in the test matrix fails, + # # to be used as a required check for merging. + # check-required-tests: + # runs-on: ubuntu-latest + # if: always() + # name: Check all required Firestore tests results + # needs: [cmake, cmake-prod-db, xcodebuild, spm-source, spm-binary] + # steps: + # - name: Check test matrix + # if: needs.cmake.result == 'failure' || needs.cmake-prod-db.result == 'failure' || needs.xcodebuild.result == 'failure' || needs.spm.result == 'failure' + # run: exit 1 # Disable until FirebaseUI is updated to accept Firebase 9 and quickstart is updated to accept diff --git a/.github/workflows/health-metrics-presubmit.yml b/.github/workflows/health-metrics-presubmit.yml index fa0a15b4b66..44f0bf3cdb7 100644 --- a/.github/workflows/health-metrics-presubmit.yml +++ b/.github/workflows/health-metrics-presubmit.yml @@ -1,426 +1,426 @@ -name: health-metrics-presubmit +# name: health-metrics-presubmit -on: - pull_request: - # open will be triggered when a pull request is created. - # synchronize will be triggered when a pull request has new commits. - # closed will be triggered when a pull request is closed. - types: [opened, synchronize, closed] +# on: +# pull_request: +# # open will be triggered when a pull request is created. +# # synchronize will be triggered when a pull request has new commits. +# # closed will be triggered when a pull request is closed. +# types: [opened, synchronize, closed] -env: - METRICS_SERVICE_SECRET: ${{ secrets.GHASecretsGPGPassphrase1 }} +# env: +# METRICS_SERVICE_SECRET: ${{ secrets.GHASecretsGPGPassphrase1 }} -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} +# cancel-in-progress: true -jobs: - # Check all the modified SDKs, the flags will be true if changed files match patterns in the file - # scripts/health_metrics/file_patterns.json - check: - if: github.repository == 'Firebase/firebase-ios-sdk' && (github.event.action == 'opened' || github.event.action == 'synchronize') - name: Check changed files - outputs: - abtesting_run_job: ${{ steps.check_files.outputs.abtesting_run_job }} - analytics_run_job: ${{ steps.check_files.outputs.analytics_run_job }} - appcheck_run_job: ${{ steps.check_files.outputs.appcheck_run_job }} - appdistribution_run_job: ${{ steps.check_files.outputs.appdistribution_run_job }} - auth_run_job: ${{ steps.check_files.outputs.auth_run_job }} - crashlytics_run_job: ${{ steps.check_files.outputs.crashlytics_run_job }} - database_run_job: ${{ steps.check_files.outputs.database_run_job }} - dynamiclinks_run_job: ${{ steps.check_files.outputs.dynamiclinks_run_job }} - firestore_run_job: ${{ steps.check_files.outputs.firestore_run_job }} - functions_run_job: ${{ steps.check_files.outputs.functions_run_job }} - inappmessaging_run_job: ${{ steps.check_files.outputs.inappmessaging_run_job }} - installations_run_job: ${{ steps.check_files.outputs.installations_run_job }} - messaging_run_job: ${{ steps.check_files.outputs.messaging_run_job }} - performance_run_job: ${{ steps.check_files.outputs.performance_run_job }} - remoteconfig_run_job: ${{ steps.check_files.outputs.remoteconfig_run_job }} - storage_run_job: ${{ steps.check_files.outputs.storage_run_job }} - target_branch_head: ${{ steps.check_files.outputs.target_branch_head }} - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: check files - id: check_files - env: - pr_branch: ${{ github.event.pull_request.head.ref }} - run: | - if [ ! -z "${{ env.METRICS_SERVICE_SECRET }}" ]; then - ./scripts/health_metrics/get_updated_files.sh - fi +# jobs: +# # Check all the modified SDKs, the flags will be true if changed files match patterns in the file +# # scripts/health_metrics/file_patterns.json +# check: +# if: github.repository == 'Firebase/firebase-ios-sdk' && (github.event.action == 'opened' || github.event.action == 'synchronize') +# name: Check changed files +# outputs: +# abtesting_run_job: ${{ steps.check_files.outputs.abtesting_run_job }} +# analytics_run_job: ${{ steps.check_files.outputs.analytics_run_job }} +# appcheck_run_job: ${{ steps.check_files.outputs.appcheck_run_job }} +# appdistribution_run_job: ${{ steps.check_files.outputs.appdistribution_run_job }} +# auth_run_job: ${{ steps.check_files.outputs.auth_run_job }} +# crashlytics_run_job: ${{ steps.check_files.outputs.crashlytics_run_job }} +# database_run_job: ${{ steps.check_files.outputs.database_run_job }} +# dynamiclinks_run_job: ${{ steps.check_files.outputs.dynamiclinks_run_job }} +# firestore_run_job: ${{ steps.check_files.outputs.firestore_run_job }} +# functions_run_job: ${{ steps.check_files.outputs.functions_run_job }} +# inappmessaging_run_job: ${{ steps.check_files.outputs.inappmessaging_run_job }} +# installations_run_job: ${{ steps.check_files.outputs.installations_run_job }} +# messaging_run_job: ${{ steps.check_files.outputs.messaging_run_job }} +# performance_run_job: ${{ steps.check_files.outputs.performance_run_job }} +# remoteconfig_run_job: ${{ steps.check_files.outputs.remoteconfig_run_job }} +# storage_run_job: ${{ steps.check_files.outputs.storage_run_job }} +# target_branch_head: ${{ steps.check_files.outputs.target_branch_head }} +# runs-on: ubuntu-latest +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# with: +# fetch-depth: 0 +# - name: check files +# id: check_files +# env: +# pr_branch: ${{ github.event.pull_request.head.ref }} +# run: | +# if [ ! -z "${{ env.METRICS_SERVICE_SECRET }}" ]; then +# ./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 == 'master') || github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - 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}" +# 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 == 'master') || github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - 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 }} +# # 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. - if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.abtesting_run_job == 'true'|| github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Build and test - run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseABTesting --platform=${{ matrix.target }} - - uses: actions/upload-artifact@v2 - with: - name: codecoverage - path: /Users/runner/*.xcresult +# pod-lib-lint-abtesting: +# needs: check +# # Don't run on private repo unless it is a PR. +# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.abtesting_run_job == 'true'|| github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Build and test +# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseABTesting --platform=${{ matrix.target }} +# - uses: actions/upload-artifact@v2 +# with: +# name: codecoverage +# path: /Users/runner/*.xcresult - pod-lib-lint-auth: - needs: check - # Don't run on private repo unless it is a PR. - if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.auth_run_job == 'true'|| github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Build and test - run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseAuth --platform=${{ matrix.target }} - - uses: actions/upload-artifact@v2 - with: - name: codecoverage - path: /Users/runner/*.xcresult +# pod-lib-lint-auth: +# needs: check +# # Don't run on private repo unless it is a PR. +# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.auth_run_job == 'true'|| github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Build and test +# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseAuth --platform=${{ matrix.target }} +# - uses: actions/upload-artifact@v2 +# with: +# name: codecoverage +# path: /Users/runner/*.xcresult - pod-lib-lint-database: - needs: check - # Don't run on private repo unless it is a PR. - if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.database_run_job == 'true' || github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Build and test - run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseDatabase --platform=${{ matrix.target }} - - uses: actions/upload-artifact@v2 - with: - name: codecoverage - path: /Users/runner/*.xcresult +# pod-lib-lint-database: +# needs: check +# # Don't run on private repo unless it is a PR. +# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.database_run_job == 'true' || github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Build and test +# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseDatabase --platform=${{ matrix.target }} +# - uses: actions/upload-artifact@v2 +# with: +# name: codecoverage +# path: /Users/runner/*.xcresult - pod-lib-lint-dynamiclinks: - needs: check - # Don't run on private repo unless it is a PR. - if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.dynamiclinks_run_job == 'true'|| github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Build and test - run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseDynamicLinks --platform=${{ matrix.target }} - - uses: actions/upload-artifact@v2 - with: - name: codecoverage - path: /Users/runner/*.xcresult +# pod-lib-lint-dynamiclinks: +# needs: check +# # Don't run on private repo unless it is a PR. +# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.dynamiclinks_run_job == 'true'|| github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Build and test +# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseDynamicLinks --platform=${{ matrix.target }} +# - uses: actions/upload-artifact@v2 +# with: +# name: codecoverage +# path: /Users/runner/*.xcresult - pod-lib-lint-firestore: - needs: check - # Don't run on private repo unless it is a PR. - # Disable Firestore for now since Firestore currently does not have unit tests in podspecs. - if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.firestore_run_job == 'true'|| github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Build and test - run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseFirestore --platform=${{ matrix.target }} - - uses: actions/upload-artifact@v2 - with: - name: codecoverage - path: /Users/runner/*.xcresult +# pod-lib-lint-firestore: +# needs: check +# # Don't run on private repo unless it is a PR. +# # Disable Firestore for now since Firestore currently does not have unit tests in podspecs. +# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.firestore_run_job == 'true'|| github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Build and test +# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseFirestore --platform=${{ matrix.target }} +# - uses: actions/upload-artifact@v2 +# with: +# name: codecoverage +# path: /Users/runner/*.xcresult - pod-lib-lint-functions: - needs: check - # Don't run on private repo unless it is a PR. - if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.functions_run_job == 'true'|| github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Build and test - run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseFunctions --platform=${{ matrix.target }} - - uses: actions/upload-artifact@v2 - with: - name: codecoverage - path: /Users/runner/*.xcresult +# pod-lib-lint-functions: +# needs: check +# # Don't run on private repo unless it is a PR. +# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.functions_run_job == 'true'|| github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Build and test +# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseFunctions --platform=${{ matrix.target }} +# - uses: actions/upload-artifact@v2 +# with: +# name: codecoverage +# path: /Users/runner/*.xcresult - pod-lib-lint-inappmessaging: - needs: check - # Don't run on private repo unless it is a PR. - if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.inappmessaging_run_job == 'true'|| github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Build and test - run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseInAppMessaging --platform=${{ matrix.target }} - - uses: actions/upload-artifact@v2 - with: - name: codecoverage - path: /Users/runner/*.xcresult +# pod-lib-lint-inappmessaging: +# needs: check +# # Don't run on private repo unless it is a PR. +# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.inappmessaging_run_job == 'true'|| github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Build and test +# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseInAppMessaging --platform=${{ matrix.target }} +# - uses: actions/upload-artifact@v2 +# with: +# name: codecoverage +# path: /Users/runner/*.xcresult - pod-lib-lint-messaging: - needs: check - # Don't run on private repo unless it is a PR. - if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.messaging_run_job == 'true'|| github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Build and test - run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseMessaging --platform=${{ matrix.target }} - - uses: actions/upload-artifact@v2 - with: - name: codecoverage - path: /Users/runner/*.xcresult +# pod-lib-lint-messaging: +# needs: check +# # Don't run on private repo unless it is a PR. +# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.messaging_run_job == 'true'|| github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Build and test +# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseMessaging --platform=${{ matrix.target }} +# - uses: actions/upload-artifact@v2 +# with: +# name: codecoverage +# path: /Users/runner/*.xcresult - pod-lib-lint-performance: - needs: check - # Don't run on private repo unless it is a PR. - if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.performance_run_job == 'true'|| github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Install xcpretty - run: gem install xcpretty - - name: Build and test - run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebasePerformance --platform=${{ matrix.target }} - - uses: actions/upload-artifact@v2 - with: - name: codecoverage - path: /Users/runner/*.xcresult +# pod-lib-lint-performance: +# needs: check +# # Don't run on private repo unless it is a PR. +# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.performance_run_job == 'true'|| github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Install xcpretty +# run: gem install xcpretty +# - name: Build and test +# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebasePerformance --platform=${{ matrix.target }} +# - uses: actions/upload-artifact@v2 +# with: +# name: codecoverage +# path: /Users/runner/*.xcresult - pod-lib-lint-remoteconfig: - needs: check - # Don't run on private repo unless it is a PR. - if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.remoteconfig_run_job == 'true'|| github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Build and test - run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseRemoteConfig --platform=${{ matrix.target }} - - uses: actions/upload-artifact@v2 - with: - name: codecoverage - path: /Users/runner/*.xcresult +# pod-lib-lint-remoteconfig: +# needs: check +# # Don't run on private repo unless it is a PR. +# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.remoteconfig_run_job == 'true'|| github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Build and test +# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseRemoteConfig --platform=${{ matrix.target }} +# - uses: actions/upload-artifact@v2 +# with: +# name: codecoverage +# path: /Users/runner/*.xcresult - pod-lib-lint-storage: - needs: check - # Don't run on private repo unless it is a PR. - if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.storage_run_job == 'true'|| github.event.pull_request.merged) - runs-on: macos-12 - strategy: - matrix: - target: [iOS] - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: scripts/setup_bundler.sh - - name: Build and test - run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseStorage --platform=${{ matrix.target }} - - uses: actions/upload-artifact@v2 - with: - name: codecoverage - path: /Users/runner/*.xcresult +# pod-lib-lint-storage: +# needs: check +# # Don't run on private repo unless it is a PR. +# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.storage_run_job == 'true'|| github.event.pull_request.merged) +# runs-on: macos-12 +# strategy: +# matrix: +# target: [iOS] +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: scripts/setup_bundler.sh +# - name: Build and test +# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseStorage --platform=${{ matrix.target }} +# - uses: actions/upload-artifact@v2 +# with: +# name: codecoverage +# path: /Users/runner/*.xcresult - create_report: - needs: [check, pod-lib-lint-abtesting, pod-lib-lint-auth, pod-lib-lint-database, pod-lib-lint-dynamiclinks, pod-lib-lint-firestore, pod-lib-lint-functions, pod-lib-lint-inappmessaging, pod-lib-lint-messaging, pod-lib-lint-performance, pod-lib-lint-remoteconfig, pod-lib-lint-storage] - if: always() - runs-on: macos-12 - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Access to Metrics Service - if: github.event.pull_request.head.repo.full_name == github.repository && (github.event.action != 'closed' || github.event.pull_request.merged) - 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}" +# create_report: +# needs: [check, pod-lib-lint-abtesting, pod-lib-lint-auth, pod-lib-lint-database, pod-lib-lint-dynamiclinks, pod-lib-lint-firestore, pod-lib-lint-functions, pod-lib-lint-inappmessaging, pod-lib-lint-messaging, pod-lib-lint-performance, pod-lib-lint-remoteconfig, pod-lib-lint-storage] +# if: always() +# runs-on: macos-12 +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# with: +# fetch-depth: 0 +# - name: Access to Metrics Service +# if: github.event.pull_request.head.repo.full_name == github.repository && (github.event.action != 'closed' || github.event.pull_request.merged) +# 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 - - uses: actions/download-artifact@v2 - id: download - with: - path: /Users/runner/test - - name: Compare Diff and Post a Report - if: github.event.pull_request.merged != true && github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'master' - env: - base_commit: ${{ needs.check.outputs.target_branch_head }} - run: | - # Get Head commit of the branch, instead of a merge commit created by actions/checkout. - if [ -d "${{steps.download.outputs.download-path}}" ]; then - cd scripts/health_metrics/generate_code_coverage_report - swift run CoverageReportGenerator --presubmit "firebase/firebase-ios-sdk" --head-commit "${GITHUB_SHA}" --token $(gcloud auth print-identity-token) --xcresult-dir "/Users/runner/test/codecoverage" --log-link "https://github.com/firebase/firebase-ios-sdk/actions/runs/${GITHUB_RUN_ID}" --pull-request-num ${{github.event.pull_request.number}} --base-commit "$base_commit" - fi - # Will reactivate the job after the issue #8305 is resovled. - # - name: Incremental Code Coverage - # if: github.event.pull_request.merged != true && github.event.action != 'closed' - # env: - # base_commit: ${{ needs.check.outputs.base_commit }} - # run: | - # # Get Head commit of the branch, instead of a merge commit created by actions/checkout. - # GITHUB_SHA=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.head.sha) - # # Get a JSON of `git diff` from the base commit. - # git diff -U0 ${base_commit} "${GITHUB_SHA}" | scripts/health_metrics/git_diff_to_json.sh > scripts/health_metrics/generate_code_coverage_report/git_diff.json - # cat "scripts/health_metrics/generate_code_coverage_report/git_diff.json" - # if [ -d "${{steps.download.outputs.download-path}}" ]; then - # # Create an uncovered_file_lines.json including code lines not covered by tests. - # cd scripts/health_metrics/generate_code_coverage_report - # swift run IncrementalCoverageReportGenerator --changed-files "git_diff.json" --file-archive-root-path "${GITHUB_WORKSPACE}" --xcresult-dir "${{steps.download.outputs.download-path}}" --uncovered-line-file-json "uncovered_file_lines.json" - # # Post uncovered lines to PRs. - # pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") - # cd .. - # bundle install - # INPUT_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }} \ - # GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" \ - # UNCOVERED_LINE_FILE="generate_code_coverage_report/uncovered_file_lines.json" \ - # TESTING_COMMIT="${GITHUB_SHA}" \ - # PULL_REQUEST="${pull_number}" \ - # bundle exec ruby post_incremental_coverage_in_pr.rb - # fi - - name: Update New Coverage Data - if: github.event.pull_request.merged && github.event.pull_request.head.repo.full_name == github.repository - run: | - if [ -d "${{steps.download.outputs.download-path}}" ]; then - cd scripts/health_metrics/generate_code_coverage_report - swift run CoverageReportGenerator --merge "firebase/firebase-ios-sdk" --head-commit "${GITHUB_SHA}" --token $(gcloud auth print-identity-token) --xcresult-dir "/Users/runner/test/codecoverage" --log-link "https://github.com/firebase/firebase-ios-sdk/actions/runs/${GITHUB_RUN_ID}" --source-branch "${{ github.base_ref }}" - fi +# # 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 +# - uses: actions/download-artifact@v2 +# id: download +# with: +# path: /Users/runner/test +# - name: Compare Diff and Post a Report +# if: github.event.pull_request.merged != true && github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'master' +# env: +# base_commit: ${{ needs.check.outputs.target_branch_head }} +# run: | +# # Get Head commit of the branch, instead of a merge commit created by actions/checkout. +# if [ -d "${{steps.download.outputs.download-path}}" ]; then +# cd scripts/health_metrics/generate_code_coverage_report +# swift run CoverageReportGenerator --presubmit "firebase/firebase-ios-sdk" --head-commit "${GITHUB_SHA}" --token $(gcloud auth print-identity-token) --xcresult-dir "/Users/runner/test/codecoverage" --log-link "https://github.com/firebase/firebase-ios-sdk/actions/runs/${GITHUB_RUN_ID}" --pull-request-num ${{github.event.pull_request.number}} --base-commit "$base_commit" +# fi +# # Will reactivate the job after the issue #8305 is resovled. +# # - name: Incremental Code Coverage +# # if: github.event.pull_request.merged != true && github.event.action != 'closed' +# # env: +# # base_commit: ${{ needs.check.outputs.base_commit }} +# # run: | +# # # Get Head commit of the branch, instead of a merge commit created by actions/checkout. +# # GITHUB_SHA=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.head.sha) +# # # Get a JSON of `git diff` from the base commit. +# # git diff -U0 ${base_commit} "${GITHUB_SHA}" | scripts/health_metrics/git_diff_to_json.sh > scripts/health_metrics/generate_code_coverage_report/git_diff.json +# # cat "scripts/health_metrics/generate_code_coverage_report/git_diff.json" +# # if [ -d "${{steps.download.outputs.download-path}}" ]; then +# # # Create an uncovered_file_lines.json including code lines not covered by tests. +# # cd scripts/health_metrics/generate_code_coverage_report +# # swift run IncrementalCoverageReportGenerator --changed-files "git_diff.json" --file-archive-root-path "${GITHUB_WORKSPACE}" --xcresult-dir "${{steps.download.outputs.download-path}}" --uncovered-line-file-json "uncovered_file_lines.json" +# # # Post uncovered lines to PRs. +# # pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") +# # cd .. +# # bundle install +# # INPUT_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }} \ +# # GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" \ +# # UNCOVERED_LINE_FILE="generate_code_coverage_report/uncovered_file_lines.json" \ +# # TESTING_COMMIT="${GITHUB_SHA}" \ +# # PULL_REQUEST="${pull_number}" \ +# # bundle exec ruby post_incremental_coverage_in_pr.rb +# # fi +# - name: Update New Coverage Data +# if: github.event.pull_request.merged && github.event.pull_request.head.repo.full_name == github.repository +# run: | +# if [ -d "${{steps.download.outputs.download-path}}" ]; then +# cd scripts/health_metrics/generate_code_coverage_report +# swift run CoverageReportGenerator --merge "firebase/firebase-ios-sdk" --head-commit "${GITHUB_SHA}" --token $(gcloud auth print-identity-token) --xcresult-dir "/Users/runner/test/codecoverage" --log-link "https://github.com/firebase/firebase-ios-sdk/actions/runs/${GITHUB_RUN_ID}" --source-branch "${{ github.base_ref }}" +# fi diff --git a/.github/workflows/spectesting.yml b/.github/workflows/spectesting.yml index 55388cb15f9..3c6d465ddab 100644 --- a/.github/workflows/spectesting.yml +++ b/.github/workflows/spectesting.yml @@ -1,68 +1,68 @@ -name: spectesting +# name: spectesting -on: - pull_request +# on: +# pull_request -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} +# cancel-in-progress: true -jobs: - specs_checking: - # Don't run on private repo unless it is a PR. - if: github.repository == 'Firebase/firebase-ios-sdk' - runs-on: macos-12 - outputs: - matrix: ${{ steps.check_files.outputs.matrix }} - podspecs: ${{ steps.check_files.outputs.podspecs }} - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: check files - id: check_files - env: - pr_branch: ${{ github.event.pull_request.head.ref }} - run: | - # The output.json will have podspecs that will be tested. - # ``` output.json - # [{"podspec":"FirebaseABTesting.podspec"},{"podspec":"FirebaseAnalytics.podspec"}] - # ``` - # This array will help generate a matrix for jobs in GHA, taking - # advantage of `include`. - # https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-including-additional-values-into-combinations - # The final matrix will be set as an env var in the GHA workflow, - # This env var, matrix, will be passed as a matrix in the next job of - # the workflow. - # If multiple podspecs need to be excluded, escaping space is required - # to split podspecs, e.g. get_updated_files.sh ... -e Firebase.podspec\ FirebaseABTesting.podspec - ./scripts/health_metrics/get_updated_files.sh -p output.json -e Firebase.podspec\ FirebaseFunctions.podspec - echo "::set-output name=matrix::{\"include\":$( cat output.json )}" - # `podspecs` is to help determine if specs_testing job should be run. - echo "::set-output name=podspecs::$(cat output.json)" - specs_testing: - needs: specs_checking - if: ${{ needs.specs_checking.outputs.podspecs != '[]' }} - runs-on: macos-12 - strategy: - fail-fast: false - matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}} - env: - PODSPEC: ${{ matrix.podspec }} - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Init podspecs and source - run: | - mkdir specTestingLogs - cd ReleaseTooling - swift run podspecs-tester --git-root "${GITHUB_WORKSPACE}" --podspec ${PODSPEC} --skip-tests --temp-log-dir "${GITHUB_WORKSPACE}/specTestingLogs" - - name: Upload Failed Testing Logs - if: failure() - uses: actions/upload-artifact@v2 - with: - name: specTestingLogs - path: specTestingLogs/*.txt +# jobs: +# specs_checking: +# # Don't run on private repo unless it is a PR. +# if: github.repository == 'Firebase/firebase-ios-sdk' +# runs-on: macos-12 +# outputs: +# matrix: ${{ steps.check_files.outputs.matrix }} +# podspecs: ${{ steps.check_files.outputs.podspecs }} +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# with: +# fetch-depth: 0 +# - name: check files +# id: check_files +# env: +# pr_branch: ${{ github.event.pull_request.head.ref }} +# run: | +# # The output.json will have podspecs that will be tested. +# # ``` output.json +# # [{"podspec":"FirebaseABTesting.podspec"},{"podspec":"FirebaseAnalytics.podspec"}] +# # ``` +# # This array will help generate a matrix for jobs in GHA, taking +# # advantage of `include`. +# # https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-including-additional-values-into-combinations +# # The final matrix will be set as an env var in the GHA workflow, +# # This env var, matrix, will be passed as a matrix in the next job of +# # the workflow. +# # If multiple podspecs need to be excluded, escaping space is required +# # to split podspecs, e.g. get_updated_files.sh ... -e Firebase.podspec\ FirebaseABTesting.podspec +# ./scripts/health_metrics/get_updated_files.sh -p output.json -e Firebase.podspec\ FirebaseFunctions.podspec +# echo "::set-output name=matrix::{\"include\":$( cat output.json )}" +# # `podspecs` is to help determine if specs_testing job should be run. +# echo "::set-output name=podspecs::$(cat output.json)" +# specs_testing: +# needs: specs_checking +# if: ${{ needs.specs_checking.outputs.podspecs != '[]' }} +# runs-on: macos-12 +# strategy: +# fail-fast: false +# matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}} +# env: +# PODSPEC: ${{ matrix.podspec }} +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# with: +# fetch-depth: 0 +# - name: Init podspecs and source +# run: | +# mkdir specTestingLogs +# cd ReleaseTooling +# swift run podspecs-tester --git-root "${GITHUB_WORKSPACE}" --podspec ${PODSPEC} --skip-tests --temp-log-dir "${GITHUB_WORKSPACE}/specTestingLogs" +# - name: Upload Failed Testing Logs +# if: failure() +# uses: actions/upload-artifact@v2 +# with: +# name: specTestingLogs +# path: specTestingLogs/*.txt diff --git a/.github/workflows/spm.yml b/.github/workflows/spm.yml index b9d6d7c1af1..5da8877b549 100644 --- a/.github/workflows/spm.yml +++ b/.github/workflows/spm.yml @@ -1,79 +1,79 @@ -name: spm +# name: spm -on: - pull_request: - paths: - - '.github/workflows/spm.yml' - - 'Package.swift' - - '.swiftpm/*' - - 'scripts/build.sh' - - 'SwiftPMTests/*' - - 'SwiftPM-PlatformExclude' - - 'Gemfile*' - schedule: - # Run every day at 12am (PST) - cron uses UTC times - - cron: '0 8 * * *' +# on: +# pull_request: +# paths: +# - '.github/workflows/spm.yml' +# - 'Package.swift' +# - '.swiftpm/*' +# - 'scripts/build.sh' +# - 'SwiftPMTests/*' +# - 'SwiftPM-PlatformExclude' +# - 'Gemfile*' +# schedule: +# # Run every day at 12am (PST) - cron uses UTC times +# - cron: '0 8 * * *' -# This workflow builds and tests the Swift Package Manager. Only iOS runs on PRs -# because each platform takes 15-20 minutes after adding Firestore. +# # This workflow builds and tests the Swift Package Manager. Only iOS runs on PRs +# # because each platform takes 15-20 minutes after adding Firestore. -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} +# cancel-in-progress: true -jobs: - swift-build-run: - # 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' - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Functions Integration Test Server - run: FirebaseFunctions/Backend/start.sh synchronous - - name: iOS Unit Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS spm +# jobs: +# swift-build-run: +# # 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' +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - name: Initialize xcodebuild +# run: scripts/setup_spm_tests.sh +# - name: Functions Integration Test Server +# run: FirebaseFunctions/Backend/start.sh synchronous +# - name: iOS Unit Tests +# run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS spm - # Test iOS Device build since some Firestore dependencies build different files. - iOS-Device: - # 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' - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: iOS Device and Test Build - run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS-device spmbuildonly +# # Test iOS Device build since some Firestore dependencies build different files. +# iOS-Device: +# # 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' +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - name: Initialize xcodebuild +# run: scripts/setup_spm_tests.sh +# - name: iOS Device and Test Build +# run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS-device spmbuildonly - platforms: - # 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' +# platforms: +# # 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' - runs-on: macos-12 - strategy: - matrix: - target: [tvOS, macOS, catalyst] - # Full set of Firebase-Package tests only run on iOS. - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - name: Initialize xcodebuild - run: scripts/setup_spm_tests.sh - - name: Objc Import Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh objc-import-test ${{ matrix.target }} spm - - name: Swift Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh swift-test ${{ matrix.target }} spm - - name: Version Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh version-test ${{ matrix.target }} spm - - name: Analytics Build Tests - run: scripts/third_party/travis/retry.sh ./scripts/build.sh analytics-import-test ${{ matrix.target }} spm +# runs-on: macos-12 +# strategy: +# matrix: +# target: [tvOS, macOS, catalyst] +# # Full set of Firebase-Package tests only run on iOS. +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - name: Initialize xcodebuild +# run: scripts/setup_spm_tests.sh +# - name: Objc Import Tests +# run: scripts/third_party/travis/retry.sh ./scripts/build.sh objc-import-test ${{ matrix.target }} spm +# - name: Swift Tests +# run: scripts/third_party/travis/retry.sh ./scripts/build.sh swift-test ${{ matrix.target }} spm +# - name: Version Tests +# run: scripts/third_party/travis/retry.sh ./scripts/build.sh version-test ${{ matrix.target }} spm +# - name: Analytics Build Tests +# run: scripts/third_party/travis/retry.sh ./scripts/build.sh analytics-import-test ${{ matrix.target }} spm diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index abc585c387c..da6ff9f3927 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -1,618 +1,618 @@ -name: zip +# name: zip -on: - pull_request: - paths: - - 'ReleaseTooling/Sources/**' - - '.github/workflows/zip.yml' - - 'scripts/build_non_firebase_sdks.sh' - - 'Gemfile*' - # Don't run based on any markdown only changes. - - '!ReleaseTooling/*.md' - schedule: - # Run every day at 8pm(PST) - cron uses UTC times - - cron: '0 4 * * *' +# on: +# pull_request: +# paths: +# - 'ReleaseTooling/Sources/**' +# - '.github/workflows/zip.yml' +# - 'scripts/build_non_firebase_sdks.sh' +# - 'Gemfile*' +# # Don't run based on any markdown only changes. +# - '!ReleaseTooling/*.md' +# schedule: +# # Run every day at 8pm(PST) - cron uses UTC times +# - cron: '0 4 * * *' - workflow_dispatch: - inputs: - custom_spec_repos: - description: 'Custom Podspec repos' - required: true - default: 'https://github.com/firebase/SpecsStaging.git' +# workflow_dispatch: +# inputs: +# custom_spec_repos: +# description: 'Custom Podspec repos' +# required: true +# default: 'https://github.com/firebase/SpecsStaging.git' -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} +# cancel-in-progress: true -jobs: - package-release: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - name: Xcode 14.1 - run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: ZipBuildingTest - run: | - mkdir -p release_zip_dir - sh -x scripts/build_zip.sh release_zip_dir \ - "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}" - - uses: actions/upload-artifact@v1 - with: - name: Firebase-release-zip-zip - # Zip the entire output directory since the builder adds subdirectories we don't know the - # name of. - path: release_zip_dir +# jobs: +# package-release: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - name: Xcode 14.1 +# run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: ZipBuildingTest +# run: | +# mkdir -p release_zip_dir +# sh -x scripts/build_zip.sh release_zip_dir \ +# "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}" +# - uses: actions/upload-artifact@v1 +# with: +# name: Firebase-release-zip-zip +# # Zip the entire output directory since the builder adds subdirectories we don't know the +# # name of. +# path: release_zip_dir - build: - # 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-12 - steps: - - uses: actions/checkout@v3 - - name: Xcode 14.1 - run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer - - name: Build - run: | - cd ReleaseTooling - swift build -v +# build: +# # 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-12 +# steps: +# - uses: actions/checkout@v3 +# - name: Xcode 14.1 +# run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer +# - name: Build +# run: | +# cd ReleaseTooling +# swift build -v - package-head: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: build - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - with: - cache_key: ${{ matrix.os }} - - name: Xcode 14.1 - run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: ZipBuildingTest - run: | - mkdir -p zip_output_dir - sh -x scripts/build_zip.sh \ - zip_output_dir "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git,https://github.com/firebase/SpecsDev.git' }}" \ - build-head - - uses: actions/upload-artifact@v1 - with: - name: Firebase-actions-dir - # Zip the entire output directory since the builder adds subdirectories we don't know the - # name of. - path: zip_output_dir +# package-head: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: build +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 +# with: +# cache_key: ${{ matrix.os }} +# - name: Xcode 14.1 +# run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: ZipBuildingTest +# run: | +# mkdir -p zip_output_dir +# sh -x scripts/build_zip.sh \ +# zip_output_dir "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git,https://github.com/firebase/SpecsDev.git' }}" \ +# build-head +# - uses: actions/upload-artifact@v1 +# with: +# name: Firebase-actions-dir +# # Zip the entire output directory since the builder adds subdirectories we don't know the +# # name of. +# path: zip_output_dir - quickstart_framework_abtesting: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FRAMEWORK_DIR: "Firebase-actions-dir" - SDK: "ABTesting" - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Get framework dir - uses: actions/download-artifact@v1 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v3 - - name: Setup quickstart - env: - LEGACY: true - run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FBLPromises.xcframework \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \ - quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret" - - name: Test Quickstart - env: - LEGACY: true - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Remove data before upload - env: - LEGACY: true - if: ${{ failure() }} - run: scripts/remove_data.sh abtesting - - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: quickstart_artifacts_abtesting - path: quickstart-ios/ +# quickstart_framework_abtesting: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: package-head +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# FRAMEWORK_DIR: "Firebase-actions-dir" +# SDK: "ABTesting" +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - name: Get framework dir +# uses: actions/download-artifact@v1 +# with: +# name: Firebase-actions-dir +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: Move frameworks +# run: | +# mkdir -p "${HOME}"/ios_frameworks/ +# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + +# - uses: actions/checkout@v3 +# - name: Setup quickstart +# env: +# LEGACY: true +# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FBLPromises.xcframework \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \ +# quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret" +# - name: Test Quickstart +# env: +# LEGACY: true +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") +# - name: Remove data before upload +# env: +# LEGACY: true +# if: ${{ failure() }} +# run: scripts/remove_data.sh abtesting +# - uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: quickstart_artifacts_abtesting +# path: quickstart-ios/ - quickstart_framework_auth: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FRAMEWORK_DIR: "Firebase-actions-dir" - SDK: "Authentication" - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Get framework dir - uses: actions/download-artifact@v1 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup Swift Quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FBSDKLoginKit FBSDKCoreKit FBSDKCoreKit_Basics FBAEMKit" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ - "${HOME}"/ios_frameworks/Firebase/GoogleSignIn/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \ - quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret" - - name: Test Swift Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh authentiation - - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: quickstart_artifacts_auth - path: quickstart-ios/ +# quickstart_framework_auth: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: package-head +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# FRAMEWORK_DIR: "Firebase-actions-dir" +# SDK: "Authentication" +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - name: Get framework dir +# uses: actions/download-artifact@v1 +# with: +# name: Firebase-actions-dir +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: Move frameworks +# run: | +# mkdir -p "${HOME}"/ios_frameworks/ +# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + +# - name: Setup Swift Quickstart +# run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FBSDKLoginKit FBSDKCoreKit FBSDKCoreKit_Basics FBAEMKit" scripts/setup_quickstart_framework.sh \ +# "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ +# "${HOME}"/ios_frameworks/Firebase/GoogleSignIn/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \ +# quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret" +# - name: Test Swift Quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") +# - name: Remove data before upload +# if: ${{ failure() }} +# run: scripts/remove_data.sh authentiation +# - uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: quickstart_artifacts_auth +# path: quickstart-ios/ - quickstart_framework_config: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FRAMEWORK_DIR: "Firebase-actions-dir" - SDK: "Config" - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Get framework dir - uses: actions/download-artifact@v1 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup Swift Quickstart +# quickstart_framework_config: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: package-head +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# FRAMEWORK_DIR: "Firebase-actions-dir" +# SDK: "Config" +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - name: Get framework dir +# uses: actions/download-artifact@v1 +# with: +# name: Firebase-actions-dir +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: Move frameworks +# run: | +# mkdir -p "${HOME}"/ios_frameworks/ +# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + +# - name: Setup Swift Quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \ - quickstart-ios/config/GoogleService-Info.plist "$plist_secret" - - name: Test Swift Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh config - - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: quickstart_artifacts_config - path: quickstart-ios/ +# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \ +# quickstart-ios/config/GoogleService-Info.plist "$plist_secret" +# - name: Test Swift Quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") +# - name: Remove data before upload +# if: ${{ failure() }} +# run: scripts/remove_data.sh config +# - uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: quickstart_artifacts_config +# path: quickstart-ios/ - quickstart_framework_crashlytics: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FRAMEWORK_DIR: "Firebase-actions-dir" - SDK: "Crashlytics" - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Get framework dir - uses: actions/download-artifact@v1 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v3 - - name: Setup quickstart - env: - LEGACY: true - run: | - SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart - cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart - chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/run - chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/upload-symbols - # TODO(#8057): Restore Swift Quickstart - # - name: Setup swift quickstart - # env: - # LEGACY: true - # run: | - # SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" NON_FIREBASE_SDKS="ReachabilitySwift" scripts/setup_quickstart_framework.sh \ - # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \ - quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret" - - name: Test Quickstart - env: - LEGACY: true - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - # TODO(#8057): Restore Swift Quickstart - # - name: Test Swift Quickstart - # env: - # LEGACY: true - # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - - name: Remove data before upload - env: - LEGACY: true - if: ${{ failure() }} - run: scripts/remove_data.sh crashlytics - - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: quickstart_artifacts_crashlytics - path: quickstart-ios/ +# quickstart_framework_crashlytics: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: package-head +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# FRAMEWORK_DIR: "Firebase-actions-dir" +# SDK: "Crashlytics" +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - name: Get framework dir +# uses: actions/download-artifact@v1 +# with: +# name: Firebase-actions-dir +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: Move frameworks +# run: | +# mkdir -p "${HOME}"/ios_frameworks/ +# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + +# - uses: actions/checkout@v3 +# - name: Setup quickstart +# env: +# LEGACY: true +# run: | +# SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* +# cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart +# cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart +# chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/run +# chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/upload-symbols +# # TODO(#8057): Restore Swift Quickstart +# # - name: Setup swift quickstart +# # env: +# # LEGACY: true +# # run: | +# # SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" NON_FIREBASE_SDKS="ReachabilitySwift" scripts/setup_quickstart_framework.sh \ +# # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \ +# quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret" +# - name: Test Quickstart +# env: +# LEGACY: true +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") +# # TODO(#8057): Restore Swift Quickstart +# # - name: Test Swift Quickstart +# # env: +# # LEGACY: true +# # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) +# - name: Remove data before upload +# env: +# LEGACY: true +# if: ${{ failure() }} +# run: scripts/remove_data.sh crashlytics +# - uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: quickstart_artifacts_crashlytics +# path: quickstart-ios/ - quickstart_framework_database: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FRAMEWORK_DIR: "Firebase-actions-dir" - SDK: "Database" - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Get framework dir - uses: actions/download-artifact@v1 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v3 - - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \ - quickstart-ios/database/GoogleService-Info.plist "$plist_secret" - - name: Test Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh database - - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: quickstart_artifacts database - path: quickstart-ios/ +# quickstart_framework_database: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: package-head +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# FRAMEWORK_DIR: "Firebase-actions-dir" +# SDK: "Database" +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - name: Get framework dir +# uses: actions/download-artifact@v1 +# with: +# name: Firebase-actions-dir +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: Move frameworks +# run: | +# mkdir -p "${HOME}"/ios_frameworks/ +# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + +# - uses: actions/checkout@v3 +# - name: Setup quickstart +# run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ +# "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \ +# quickstart-ios/database/GoogleService-Info.plist "$plist_secret" +# - name: Test Quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") +# - name: Remove data before upload +# if: ${{ failure() }} +# run: scripts/remove_data.sh database +# - uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: quickstart_artifacts database +# path: quickstart-ios/ - quickstart_framework_dynamiclinks: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FRAMEWORK_DIR: "Firebase-actions-dir" - SDK: "DynamicLinks" - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Get framework dir - uses: actions/download-artifact@v1 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - name: Setup Objc Quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Setup Swift Quickstart - run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh - - name: Update Environment Variable For DynamicLinks - run: | - sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements - sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m - sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \ - quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret" - - name: Test Objc Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Test Swift Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh dynamiclinks - - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: quickstart_artifacts_dynamiclinks - path: quickstart-ios/ +# quickstart_framework_dynamiclinks: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: package-head +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# FRAMEWORK_DIR: "Firebase-actions-dir" +# SDK: "DynamicLinks" +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - name: Get framework dir +# uses: actions/download-artifact@v1 +# with: +# name: Firebase-actions-dir +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: Move frameworks +# run: | +# mkdir -p "${HOME}"/ios_frameworks/ +# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + +# - name: Setup Objc Quickstart +# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* +# - name: Setup Swift Quickstart +# run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh +# - name: Update Environment Variable For DynamicLinks +# run: | +# sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements +# sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m +# sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \ +# quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret" +# - name: Test Objc Quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") +# - name: Test Swift Quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) +# - name: Remove data before upload +# if: ${{ failure() }} +# run: scripts/remove_data.sh dynamiclinks +# - uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: quickstart_artifacts_dynamiclinks +# path: quickstart-ios/ - quickstart_framework_firestore: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FRAMEWORK_DIR: "Firebase-actions-dir" - SDK: "Firestore" - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Get framework dir - uses: actions/download-artifact@v1 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v3 - - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \ - quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret" - - name: Test Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh firestore - - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: quickstart_artifacts_firestore - path: quickstart-ios/ +# quickstart_framework_firestore: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: package-head +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# FRAMEWORK_DIR: "Firebase-actions-dir" +# SDK: "Firestore" +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - name: Get framework dir +# uses: actions/download-artifact@v1 +# with: +# name: Firebase-actions-dir +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: Move frameworks +# run: | +# mkdir -p "${HOME}"/ios_frameworks/ +# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + +# - uses: actions/checkout@v3 +# - name: Setup quickstart +# run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \ +# "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \ +# quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret" +# - name: Test Quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") +# - name: Remove data before upload +# if: ${{ failure() }} +# run: scripts/remove_data.sh firestore +# - uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: quickstart_artifacts_firestore +# path: quickstart-ios/ - check_framework_firestore_symbols: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - FRAMEWORK_DIR: "Firebase-actions-dir" - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - runs-on: macos-12 - steps: - - name: Xcode 14.1 - run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer - - uses: actions/checkout@v3 - - name: Get framework dir - uses: actions/download-artifact@v1 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Install xcpretty - run: gem install xcpretty - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v3 - - name: Check linked Firestore.xcframework for unlinked symbols. - run: | - scripts/check_firestore_symbols.sh \ - $(pwd) \ - "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestore.xcframework +# check_framework_firestore_symbols: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: package-head +# env: +# FRAMEWORK_DIR: "Firebase-actions-dir" +# FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 +# runs-on: macos-12 +# steps: +# - name: Xcode 14.1 +# run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer +# - uses: actions/checkout@v3 +# - name: Get framework dir +# uses: actions/download-artifact@v1 +# with: +# name: Firebase-actions-dir +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: Install xcpretty +# run: gem install xcpretty +# - name: Move frameworks +# run: | +# mkdir -p "${HOME}"/ios_frameworks/ +# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + +# - uses: actions/checkout@v3 +# - name: Check linked Firestore.xcframework for unlinked symbols. +# run: | +# scripts/check_firestore_symbols.sh \ +# $(pwd) \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestore.xcframework - quickstart_framework_inappmessaging: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FRAMEWORK_DIR: "Firebase-actions-dir" - SDK: "InAppMessaging" - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Get framework dir - uses: actions/download-artifact@v1 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v3 - - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Setup swift quickstart - run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \ - quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret" - - name: Test Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Test Swift Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh inappmessaging - - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: quickstart_artifacts_ihappmessaging - path: quickstart-ios/ +# quickstart_framework_inappmessaging: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: package-head +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# FRAMEWORK_DIR: "Firebase-actions-dir" +# SDK: "InAppMessaging" +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - name: Get framework dir +# uses: actions/download-artifact@v1 +# with: +# name: Firebase-actions-dir +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: Move frameworks +# run: | +# mkdir -p "${HOME}"/ios_frameworks/ +# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + +# - uses: actions/checkout@v3 +# - name: Setup quickstart +# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* +# - name: Setup swift quickstart +# run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \ +# quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret" +# - name: Test Quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") +# - name: Test Swift Quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) +# - name: Remove data before upload +# if: ${{ failure() }} +# run: scripts/remove_data.sh inappmessaging +# - uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: quickstart_artifacts_ihappmessaging +# path: quickstart-ios/ - quickstart_framework_messaging: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FRAMEWORK_DIR: "Firebase-actions-dir" - SDK: "Messaging" - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Get framework dir - uses: actions/download-artifact@v1 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v3 - - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Setup swift quickstart - run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ - quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" - - name: Test Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Test Swift Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh messaging - - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: quickstart_artifacts_messaging - path: quickstart-ios/ +# quickstart_framework_messaging: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: package-head +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# FRAMEWORK_DIR: "Firebase-actions-dir" +# SDK: "Messaging" +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - name: Get framework dir +# uses: actions/download-artifact@v1 +# with: +# name: Firebase-actions-dir +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: Move frameworks +# run: | +# mkdir -p "${HOME}"/ios_frameworks/ +# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + +# - uses: actions/checkout@v3 +# - name: Setup quickstart +# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* +# - name: Setup swift quickstart +# run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ +# quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" +# - name: Test Quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") +# - name: Test Swift Quickstart +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) +# - name: Remove data before upload +# if: ${{ failure() }} +# run: scripts/remove_data.sh messaging +# - uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: quickstart_artifacts_messaging +# path: quickstart-ios/ - quickstart_framework_storage: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - FRAMEWORK_DIR: "Firebase-actions-dir" - SDK: "Storage" - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Get framework dir - uses: actions/download-artifact@v1 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v3 - - name: Setup quickstart - env: - LEGACY: true - run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Setup swift quickstart - env: - LEGACY: true - run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ - quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" - - name: Test Quickstart - env: - LEGACY: true - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Test Swift Quickstart - env: - LEGACY: true - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) - - name: Remove data before upload - env: - LEGACY: true - if: ${{ failure() }} - run: scripts/remove_data.sh storage - - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: quickstart_artifacts_storage - path: quickstart-ios/ +# quickstart_framework_storage: +# # Don't run on private repo. +# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' +# needs: package-head +# env: +# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} +# FRAMEWORK_DIR: "Firebase-actions-dir" +# SDK: "Storage" +# runs-on: macos-12 +# steps: +# - uses: actions/checkout@v3 +# - name: Get framework dir +# uses: actions/download-artifact@v1 +# with: +# name: Firebase-actions-dir +# - uses: ruby/setup-ruby@v1 +# - name: Setup Bundler +# run: ./scripts/setup_bundler.sh +# - name: Move frameworks +# run: | +# mkdir -p "${HOME}"/ios_frameworks/ +# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + +# - uses: actions/checkout@v3 +# - name: Setup quickstart +# env: +# LEGACY: true +# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ +# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* +# - name: Setup swift quickstart +# env: +# LEGACY: true +# run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh +# - name: Install Secret GoogleService-Info.plist +# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ +# quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" +# - name: Test Quickstart +# env: +# LEGACY: true +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") +# - name: Test Swift Quickstart +# env: +# LEGACY: true +# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) +# - name: Remove data before upload +# env: +# LEGACY: true +# if: ${{ failure() }} +# run: scripts/remove_data.sh storage +# - uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: quickstart_artifacts_storage +# path: quickstart-ios/ From a54862d64a78619af484c9a934db541e63203214 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 15 Sep 2023 11:52:19 -0400 Subject: [PATCH 12/20] Disable xcpretty --- scripts/build.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 61470f453b7..6808f9f486a 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -109,10 +109,8 @@ source scripts/check_secrets.sh function RunXcodebuild() { echo xcodebuild "$@" - xcpretty_cmd=(xcpretty) - result=0 - xcodebuild "$@" | tee xcodebuild.log | "${xcpretty_cmd[@]}" || result=$? + xcodebuild "$@" | tee xcodebuild.log || result=$? if [[ $result == 65 ]]; then ExportLogs "$@" @@ -121,7 +119,7 @@ function RunXcodebuild() { sleep 5 result=0 - xcodebuild "$@" | tee xcodebuild.log | "${xcpretty_cmd[@]}" || result=$? + xcodebuild "$@" | tee xcodebuild.log || result=$? fi if [[ $result != 0 ]]; then From 06652480ef88d0159c2b1311c4209a327a6cc118 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 15 Sep 2023 12:44:49 -0400 Subject: [PATCH 13/20] Break up steps into separate jobs to reduce build artifact collisions --- .github/workflows/firestore.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 31673f889d5..09a38ade24b 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -351,12 +351,8 @@ jobs: cache_key: ${{ matrix.os }} - name: Initialize xcodebuild run: scripts/setup_spm_tests.sh - # - name: iOS Build Test – Binary - # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly - # - name: iOS Build Test – Source - # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly - # env: - # FIREBASE_SOURCE_FIRESTORE: 1 + - name: iOS Build Test + run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly - name: Swift Build run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift iOS spmbuildonly From 863b4c31a28bec0354f0421bb23ea504fbca7714 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 15 Sep 2023 13:29:09 -0400 Subject: [PATCH 14/20] Revert build.sh changes --- scripts/build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 6808f9f486a..61470f453b7 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -109,8 +109,10 @@ source scripts/check_secrets.sh function RunXcodebuild() { echo xcodebuild "$@" + xcpretty_cmd=(xcpretty) + result=0 - xcodebuild "$@" | tee xcodebuild.log || result=$? + xcodebuild "$@" | tee xcodebuild.log | "${xcpretty_cmd[@]}" || result=$? if [[ $result == 65 ]]; then ExportLogs "$@" @@ -119,7 +121,7 @@ function RunXcodebuild() { sleep 5 result=0 - xcodebuild "$@" | tee xcodebuild.log || result=$? + xcodebuild "$@" | tee xcodebuild.log | "${xcpretty_cmd[@]}" || result=$? fi if [[ $result != 0 ]]; then From e411261cc6959f2efea23052f1d388323f136f7a Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 15 Sep 2023 13:29:31 -0400 Subject: [PATCH 15/20] Break up SPM cron steps into jobs --- .github/workflows/firestore.yml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 09a38ade24b..b8a7d14fcd7 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -356,13 +356,16 @@ jobs: - name: Swift Build run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift iOS spmbuildonly - # spm-cron: + # TODO: Re-enable either in or after #11706. + # spm-source-cron: # # Don't run on private repo. # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' # runs-on: macos-12 # strategy: # matrix: # target: [tvOS, macOS, catalyst] + # env: + # FIREBASE_SOURCE_FIRESTORE: 1 # steps: # - uses: actions/checkout@v3 # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 @@ -372,14 +375,28 @@ jobs: # run: scripts/setup_spm_tests.sh # - name: Build Test - Binary # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly - # # TODO: Re-enable either in or after #11706. - # # - name: Build Test – Source - # # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly - # # env: - # # FIREBASE_SOURCE_FIRESTORE: 1 # - name: Swift Build # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift ${{ matrix.target }} spmbuildonly +spm-binary-cron: + # Don't run on private repo. + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + runs-on: macos-12 + strategy: + matrix: + target: [tvOS, macOS, catalyst] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - name: Initialize xcodebuild + run: scripts/setup_spm_tests.sh + - name: Build Test - Binary + run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly + - name: Swift Build + run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift ${{ matrix.target }} spmbuildonly + # # A job that fails if any required job in the test matrix fails, # # to be used as a required check for merging. # check-required-tests: From 67bf7de1bb12215f631f1950ae2cc0795f09c629 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Fri, 15 Sep 2023 13:32:22 -0400 Subject: [PATCH 16/20] Revert CI changes made to narrow down problem --- .github/workflows/api_diff_report.yml | 180 +-- .github/workflows/client_app.yml | 102 +- .github/workflows/firebasepod.yml | 64 +- .github/workflows/firestore.yml | 378 +++--- .../workflows/health-metrics-presubmit.yml | 812 +++++------ .github/workflows/spectesting.yml | 130 +- .github/workflows/spm.yml | 144 +- .github/workflows/zip.yml | 1200 ++++++++--------- 8 files changed, 1505 insertions(+), 1505 deletions(-) diff --git a/.github/workflows/api_diff_report.yml b/.github/workflows/api_diff_report.yml index 7a22477bcf4..8dfc5cc7616 100644 --- a/.github/workflows/api_diff_report.yml +++ b/.github/workflows/api_diff_report.yml @@ -1,90 +1,90 @@ -# name: API Diff Report - -# on: [pull_request] - -# concurrency: -# group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} -# cancel-in-progress: true - -# env: -# STAGE_PROGRESS: progress -# STAGE_END: end -# PR_API_OUTPUT: ci_outputs/pr_branch_api -# BASE_API_OUTPUT: ci_outputs/base_branch_api -# DIFF_REPORT_OUTPUT: ci_outputs/diff_report - -# jobs: -# diff_report: -# runs-on: macos-latest -# env: -# FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 - -# steps: -# - name: Checkout PR branch -# uses: actions/checkout@v3 -# with: -# fetch-depth: 2 - -# - name: Copy diff report tools -# run: cp -a scripts/api_diff_report/. ~/api_diff_report - -# - id: get_changed_files -# name: Get changed file list -# run: | -# echo "file_list=$(git diff --name-only -r HEAD^1 HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT - -# - name: Setup python -# uses: actions/setup-python@v4 -# with: -# python-version: 3.7 - -# - name: Install Prerequisites -# run: ~/api_diff_report/prerequisite.sh - -# - name: Clean Diff Report Comment in PR -# run: | -# python ~/api_diff_report/pr_commenter.py \ -# --stage ${{ env.STAGE_PROGRESS }} \ -# --token ${{github.token}} \ -# --pr_number ${{github.event.pull_request.number}} \ -# --commit $GITHUB_SHA \ -# --run_id ${{github.run_id}} - -# - name: Generate API files for PR branch -# run: | -# python ~/api_diff_report/api_info.py \ -# --file_list ${{ steps.get_changed_files.outputs.file_list }} \ -# --output_dir ${{ env.PR_API_OUTPUT }} - -# - name: Checkout Base branch -# run: git checkout HEAD^ - -# - name: Generate API files for Base branch -# run: | -# python ~/api_diff_report/api_info.py \ -# --file_list ${{ steps.get_changed_files.outputs.file_list }} \ -# --output_dir ${{ env.BASE_API_OUTPUT }} - -# - name: Generate API Diff Report -# run: | -# python ~/api_diff_report/api_diff_report.py \ -# --pr_branch ${{ env.PR_API_OUTPUT }} \ -# --base_branch ${{ env.BASE_API_OUTPUT }} \ -# --output_dir ${{ env.DIFF_REPORT_OUTPUT }} - -# - name: Update Diff Report Comment in PR -# run: | -# python ~/api_diff_report/pr_commenter.py \ -# --stage ${{ env.STAGE_END }} \ -# --report ${{ env.DIFF_REPORT_OUTPUT }} \ -# --token ${{github.token}} \ -# --pr_number ${{github.event.pull_request.number}} \ -# --commit $GITHUB_SHA \ -# --run_id ${{github.run_id}} - -# - uses: actions/upload-artifact@v3 -# if: ${{ !cancelled() }} -# with: -# name: api_info_and_report -# path: ci_outputs -# retention-days: 1 +name: API Diff Report + +on: [pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +env: + STAGE_PROGRESS: progress + STAGE_END: end + PR_API_OUTPUT: ci_outputs/pr_branch_api + BASE_API_OUTPUT: ci_outputs/base_branch_api + DIFF_REPORT_OUTPUT: ci_outputs/diff_report + +jobs: + diff_report: + runs-on: macos-latest + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + + steps: + - name: Checkout PR branch + uses: actions/checkout@v3 + with: + fetch-depth: 2 + + - name: Copy diff report tools + run: cp -a scripts/api_diff_report/. ~/api_diff_report + + - id: get_changed_files + name: Get changed file list + run: | + echo "file_list=$(git diff --name-only -r HEAD^1 HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: 3.7 + + - name: Install Prerequisites + run: ~/api_diff_report/prerequisite.sh + + - name: Clean Diff Report Comment in PR + run: | + python ~/api_diff_report/pr_commenter.py \ + --stage ${{ env.STAGE_PROGRESS }} \ + --token ${{github.token}} \ + --pr_number ${{github.event.pull_request.number}} \ + --commit $GITHUB_SHA \ + --run_id ${{github.run_id}} + + - name: Generate API files for PR branch + run: | + python ~/api_diff_report/api_info.py \ + --file_list ${{ steps.get_changed_files.outputs.file_list }} \ + --output_dir ${{ env.PR_API_OUTPUT }} + + - name: Checkout Base branch + run: git checkout HEAD^ + + - name: Generate API files for Base branch + run: | + python ~/api_diff_report/api_info.py \ + --file_list ${{ steps.get_changed_files.outputs.file_list }} \ + --output_dir ${{ env.BASE_API_OUTPUT }} + + - name: Generate API Diff Report + run: | + python ~/api_diff_report/api_diff_report.py \ + --pr_branch ${{ env.PR_API_OUTPUT }} \ + --base_branch ${{ env.BASE_API_OUTPUT }} \ + --output_dir ${{ env.DIFF_REPORT_OUTPUT }} + + - name: Update Diff Report Comment in PR + run: | + python ~/api_diff_report/pr_commenter.py \ + --stage ${{ env.STAGE_END }} \ + --report ${{ env.DIFF_REPORT_OUTPUT }} \ + --token ${{github.token}} \ + --pr_number ${{github.event.pull_request.number}} \ + --commit $GITHUB_SHA \ + --run_id ${{github.run_id}} + + - uses: actions/upload-artifact@v3 + if: ${{ !cancelled() }} + with: + name: api_info_and_report + path: ci_outputs + retention-days: 1 diff --git a/.github/workflows/client_app.yml b/.github/workflows/client_app.yml index d737c5b6b48..92fcb132860 100644 --- a/.github/workflows/client_app.yml +++ b/.github/workflows/client_app.yml @@ -1,55 +1,55 @@ -# name: client_app +name: client_app -# on: -# pull_request: -# paths: -# - ".github/workflows/client_app.yml" -# - "Package.swift" -# - ".swiftpm/*" -# - "*.podspec" -# - "scripts/install_prereqs.sh" -# - "scripts/build.sh" -# - "ClientApp/**" -# - "Gemfile*" -# schedule: -# # Run every day at 12am (PST) - cron uses UTC times -# - cron: "0 8 * * *" +on: + pull_request: + paths: + - ".github/workflows/client_app.yml" + - "Package.swift" + - ".swiftpm/*" + - "*.podspec" + - "scripts/install_prereqs.sh" + - "scripts/build.sh" + - "ClientApp/**" + - "Gemfile*" + schedule: + # Run every day at 12am (PST) - cron uses UTC times + - cron: "0 8 * * *" -# concurrency: -# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} -# cancel-in-progress: true +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true -# jobs: -# client-app-spm: -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' -# env: -# FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 -# runs-on: macos-12 -# strategy: -# matrix: -# #TODO(ncooke3): Add multi-platform support: tvOS, macOS, catalyst -# platform: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - name: Build Client App –– ${{ matrix.platform }} -# run: scripts/third_party/travis/retry.sh ./scripts/build.sh SwiftPMClientApp ${{ matrix.platform }} xcodebuild +jobs: + client-app-spm: + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' + env: + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + runs-on: macos-12 + strategy: + matrix: + #TODO(ncooke3): Add multi-platform support: tvOS, macOS, catalyst + platform: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - name: Build Client App –– ${{ matrix.platform }} + run: scripts/third_party/travis/retry.sh ./scripts/build.sh SwiftPMClientApp ${{ matrix.platform }} xcodebuild -# client-app-cocoapods: -# # 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' -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Prereqs -# run: scripts/install_prereqs.sh ClientApp iOS xcodebuild -# - name: Build -# run: scripts/build.sh CocoaPodsClientApp iOS xcodebuild + client-app-cocoapods: + # 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' + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Prereqs + run: scripts/install_prereqs.sh ClientApp iOS xcodebuild + - name: Build + run: scripts/build.sh CocoaPodsClientApp iOS xcodebuild diff --git a/.github/workflows/firebasepod.yml b/.github/workflows/firebasepod.yml index 9694d472294..ecc59185800 100644 --- a/.github/workflows/firebasepod.yml +++ b/.github/workflows/firebasepod.yml @@ -1,38 +1,38 @@ -# name: firebasepod +name: firebasepod -# # Verify that the Firebase.podspec will successfully `pod install`. +# Verify that the Firebase.podspec will successfully `pod install`. -# on: -# pull_request: -# paths: -# - '*.podspec' -# - 'CoreOnly/**' -# - '.github/workflows/firebasepod.yml' -# - 'Gemfile*' -# schedule: -# # Run every day at 1am (PST) - cron uses UTC times -# - cron: '0 9 * * *' +on: + pull_request: + paths: + - '*.podspec' + - 'CoreOnly/**' + - '.github/workflows/firebasepod.yml' + - 'Gemfile*' + schedule: + # Run every day at 1am (PST) - cron uses UTC times + - cron: '0 9 * * *' -# concurrency: -# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} -# cancel-in-progress: true +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true -# jobs: -# installation-test: -# # 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' +jobs: + installation-test: + # 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' -# runs-on: macos-12 + runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Prereqs -# run: scripts/install_prereqs.sh FirebasePod iOS -# - name: Build -# run: scripts/build.sh FirebasePod iOS + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Prereqs + run: scripts/install_prereqs.sh FirebasePod iOS + - name: Build + run: scripts/build.sh FirebasePod iOS diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index b8a7d14fcd7..c0a332c2161 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -96,225 +96,225 @@ jobs: run: scripts/check.sh --test-only - # cmake: - # needs: check - # # Either a scheduled run from public repo, or a pull request with firestore changes. - # if: | - # (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || - # (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - # strategy: - # matrix: - # os: [macos-12, ubuntu-latest] + cmake: + needs: check + # Either a scheduled run from public repo, or a pull request with firestore changes. + if: | + (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || + (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + strategy: + matrix: + os: [macos-12, ubuntu-latest] - # env: - # MINT_PATH: ${{ github.workspace }}/mint + env: + MINT_PATH: ${{ github.workspace }}/mint - # runs-on: ${{ matrix.os }} - # steps: - # - uses: actions/checkout@v3 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 - # - name: Prepare ccache - # uses: actions/cache@v3 - # with: - # path: ${{ runner.temp }}/ccache - # key: firestore-ccache-${{ runner.os }}-${{ github.sha }} - # restore-keys: | - # firestore-ccache-${{ runner.os }}- + - name: Prepare ccache + uses: actions/cache@v3 + with: + path: ${{ runner.temp }}/ccache + key: firestore-ccache-${{ runner.os }}-${{ github.sha }} + restore-keys: | + firestore-ccache-${{ runner.os }}- - # - name: Cache Mint packages - # uses: actions/cache@v3 - # with: - # path: ${{ env.MINT_PATH }} - # key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} - # restore-keys: ${{ runner.os }}-mint- + - name: Cache Mint packages + uses: actions/cache@v3 + with: + path: ${{ env.MINT_PATH }} + key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} + restore-keys: ${{ runner.os }}-mint- - # - name: Setup build - # run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake + - name: Setup build + run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake - # - name: Build and test - # run: | - # export CCACHE_DIR=${{ runner.temp }}/ccache - # scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake + - name: Build and test + run: | + export CCACHE_DIR=${{ runner.temp }}/ccache + scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake - # cmake-prod-db: - # # Either a scheduled run from public repo, or a pull request with firestore changes. - # if: | - # (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || - # (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - # needs: check + cmake-prod-db: + # Either a scheduled run from public repo, or a pull request with firestore changes. + if: | + (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || + (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + needs: check - # strategy: - # matrix: - # os: [macos-12] - # databaseId: [(default), test-db] + strategy: + matrix: + os: [macos-12] + databaseId: [(default), test-db] - # env: - # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - # MINT_PATH: ${{ github.workspace }}/mint - # TARGET_DATABASE_ID: ${{ matrix.databaseId }} + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + MINT_PATH: ${{ github.workspace }}/mint + TARGET_DATABASE_ID: ${{ matrix.databaseId }} - # runs-on: ${{ matrix.os }} - # steps: - # - uses: actions/checkout@v3 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 - # - name: Prepare ccache - # uses: actions/cache@v3 - # with: - # path: ${{ runner.temp }}/ccache - # key: firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}-${{ github.sha }} - # restore-keys: | - # firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}- + - name: Prepare ccache + uses: actions/cache@v3 + with: + path: ${{ runner.temp }}/ccache + key: firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}-${{ github.sha }} + restore-keys: | + firestore-ccache-${{ matrix.databaseId }}-${{ runner.os }}- - # - name: Cache Mint packages - # uses: actions/cache@v3 - # with: - # path: ${{ env.MINT_PATH }} - # key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} - # restore-keys: ${{ runner.os }}-mint- + - name: Cache Mint packages + uses: actions/cache@v3 + with: + path: ${{ env.MINT_PATH }} + key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} + restore-keys: ${{ runner.os }}-mint- - # - name: Install Secret GoogleService-Info.plist - # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/firestore.plist.gpg \ - # Firestore/Example/App/GoogleService-Info.plist "$plist_secret" + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/firestore.plist.gpg \ + Firestore/Example/App/GoogleService-Info.plist "$plist_secret" - # - name: Setup build - # run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake + - name: Setup build + run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake - # - name: Build and test - # run: | - # export CCACHE_DIR=${{ runner.temp }}/ccache - # scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake + - name: Build and test + run: | + export CCACHE_DIR=${{ runner.temp }}/ccache + scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake - # sanitizers: - # # Either a scheduled run from public repo, or a pull request with firestore changes. - # if: | - # (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || - # (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - # needs: check + sanitizers: + # Either a scheduled run from public repo, or a pull request with firestore changes. + if: | + (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || + (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + needs: check - # strategy: - # matrix: - # # TODO(b/260248007): Re-enable this once tsan passes on Linux - # os: [macos-12] - # sanitizer: [asan, tsan] + strategy: + matrix: + # TODO(b/260248007): Re-enable this once tsan passes on Linux + os: [macos-12] + sanitizer: [asan, tsan] - # runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os }} - # env: - # SANITIZERS: ${{ matrix.sanitizer }} + env: + SANITIZERS: ${{ matrix.sanitizer }} - # steps: - # - uses: actions/checkout@v3 + steps: + - uses: actions/checkout@v3 - # - name: Prepare ccache - # uses: actions/cache@v3 - # with: - # path: ${{ runner.temp }}/ccache - # key: ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-${{ github.sha }} - # restore-keys: | - # ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}- + - name: Prepare ccache + uses: actions/cache@v3 + with: + path: ${{ runner.temp }}/ccache + key: ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}-${{ github.sha }} + restore-keys: | + ${{ matrix.sanitizer }}-firestore-ccache-${{ runner.os }}- - # - name: Setup build - # run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake + - name: Setup build + run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake - # - name: Build and test - # run: | - # export CCACHE_DIR=${{ runner.temp }}/ccache - # scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake + - name: Build and test + run: | + export CCACHE_DIR=${{ runner.temp }}/ccache + scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ runner.os }} cmake - # xcodebuild: - # # Either a scheduled run from public repo, or a pull request with firestore changes. - # if: | - # (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || - # (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - # runs-on: macos-12 - # needs: check + xcodebuild: + # Either a scheduled run from public repo, or a pull request with firestore changes. + if: | + (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || + (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + runs-on: macos-12 + needs: check - # strategy: - # matrix: - # target: [iOS, tvOS, macOS] + strategy: + matrix: + target: [iOS, tvOS, macOS] - # steps: - # - uses: actions/checkout@v3 - # - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 - # with: - # cache_key: ${{ matrix.target }} + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.target }} - # - uses: ruby/setup-ruby@v1 + - uses: ruby/setup-ruby@v1 - # - name: Setup build - # run: scripts/install_prereqs.sh Firestore ${{ matrix.target }} xcodebuild + - name: Setup build + run: scripts/install_prereqs.sh Firestore ${{ matrix.target }} xcodebuild - # - name: Build and test - # run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild + - name: Build and test + run: scripts/third_party/travis/retry.sh scripts/build.sh Firestore ${{ matrix.target }} xcodebuild - # pod-lib-lint: - # # Either a scheduled run from public repo, or a pull request with firestore changes. - # if: | - # (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || - # (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') - # runs-on: macos-12 - # needs: check - # strategy: - # matrix: - # podspec: [ - # 'FirebaseFirestore.podspec', - # 'FirebaseFirestoreSwift.podspec', - # ] + pod-lib-lint: + # Either a scheduled run from public repo, or a pull request with firestore changes. + if: | + (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || + (github.event_name == 'pull_request' && needs.changes.outputs.changed == 'true') + runs-on: macos-12 + needs: check + strategy: + matrix: + podspec: [ + 'FirebaseFirestore.podspec', + 'FirebaseFirestoreSwift.podspec', + ] - # steps: - # - uses: actions/checkout@v3 + steps: + - uses: actions/checkout@v3 - # - uses: ruby/setup-ruby@v1 - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh - # - name: Pod lib lint - # # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed. - # run: | - # scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} \ - # --platforms=ios \ - # --allow-warnings \ - # --no-analyze + - name: Pod lib lint + # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed. + run: | + scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} \ + --platforms=ios \ + --allow-warnings \ + --no-analyze - # # `pod lib lint` takes a long time so only run the other platforms and static frameworks build in the cron. - # pod-lib-lint-cron: - # if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' - # runs-on: macos-12 - # needs: check - # strategy: - # matrix: - # podspec: [ - # 'FirebaseFirestore.podspec', - # 'FirebaseFirestoreSwift.podspec', - # ] - # platforms: [ - # 'macos', - # 'tvos', - # ] - # flags: [ - # '--use-static-frameworks', - # '', - # ] + # `pod lib lint` takes a long time so only run the other platforms and static frameworks build in the cron. + pod-lib-lint-cron: + if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + runs-on: macos-12 + needs: check + strategy: + matrix: + podspec: [ + 'FirebaseFirestore.podspec', + 'FirebaseFirestoreSwift.podspec', + ] + platforms: [ + 'macos', + 'tvos', + ] + flags: [ + '--use-static-frameworks', + '', + ] - # steps: - # - uses: actions/checkout@v3 + steps: + - uses: actions/checkout@v3 - # - uses: ruby/setup-ruby@v1 - # - name: Setup Bundler - # run: ./scripts/setup_bundler.sh + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh - # - name: Pod lib lint - # # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed. - # run: | - # scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }}\ - # ${{ matrix.flags }} \ - # --platforms=${{ matrix.platforms }} \ - # --allow-warnings \ - # --no-analyze + - name: Pod lib lint + # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed. + run: | + scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }}\ + ${{ matrix.flags }} \ + --platforms=${{ matrix.platforms }} \ + --allow-warnings \ + --no-analyze spm-source: # Either a scheduled run from public repo, or a pull request with firestore changes. @@ -397,17 +397,17 @@ spm-binary-cron: - name: Swift Build run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift ${{ matrix.target }} spmbuildonly - # # A job that fails if any required job in the test matrix fails, - # # to be used as a required check for merging. - # check-required-tests: - # runs-on: ubuntu-latest - # if: always() - # name: Check all required Firestore tests results - # needs: [cmake, cmake-prod-db, xcodebuild, spm-source, spm-binary] - # steps: - # - name: Check test matrix - # if: needs.cmake.result == 'failure' || needs.cmake-prod-db.result == 'failure' || needs.xcodebuild.result == 'failure' || needs.spm.result == 'failure' - # run: exit 1 + # A job that fails if any required job in the test matrix fails, + # to be used as a required check for merging. + check-required-tests: + runs-on: ubuntu-latest + if: always() + name: Check all required Firestore tests results + needs: [cmake, cmake-prod-db, xcodebuild, spm-source, spm-binary] + steps: + - name: Check test matrix + if: needs.cmake.result == 'failure' || needs.cmake-prod-db.result == 'failure' || needs.xcodebuild.result == 'failure' || needs.spm.result == 'failure' + run: exit 1 # Disable until FirebaseUI is updated to accept Firebase 9 and quickstart is updated to accept diff --git a/.github/workflows/health-metrics-presubmit.yml b/.github/workflows/health-metrics-presubmit.yml index 44f0bf3cdb7..fa0a15b4b66 100644 --- a/.github/workflows/health-metrics-presubmit.yml +++ b/.github/workflows/health-metrics-presubmit.yml @@ -1,426 +1,426 @@ -# name: health-metrics-presubmit +name: health-metrics-presubmit -# on: -# pull_request: -# # open will be triggered when a pull request is created. -# # synchronize will be triggered when a pull request has new commits. -# # closed will be triggered when a pull request is closed. -# types: [opened, synchronize, closed] +on: + pull_request: + # open will be triggered when a pull request is created. + # synchronize will be triggered when a pull request has new commits. + # closed will be triggered when a pull request is closed. + types: [opened, synchronize, closed] -# env: -# METRICS_SERVICE_SECRET: ${{ secrets.GHASecretsGPGPassphrase1 }} +env: + METRICS_SERVICE_SECRET: ${{ secrets.GHASecretsGPGPassphrase1 }} -# concurrency: -# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} -# cancel-in-progress: true +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true -# jobs: -# # Check all the modified SDKs, the flags will be true if changed files match patterns in the file -# # scripts/health_metrics/file_patterns.json -# check: -# if: github.repository == 'Firebase/firebase-ios-sdk' && (github.event.action == 'opened' || github.event.action == 'synchronize') -# name: Check changed files -# outputs: -# abtesting_run_job: ${{ steps.check_files.outputs.abtesting_run_job }} -# analytics_run_job: ${{ steps.check_files.outputs.analytics_run_job }} -# appcheck_run_job: ${{ steps.check_files.outputs.appcheck_run_job }} -# appdistribution_run_job: ${{ steps.check_files.outputs.appdistribution_run_job }} -# auth_run_job: ${{ steps.check_files.outputs.auth_run_job }} -# crashlytics_run_job: ${{ steps.check_files.outputs.crashlytics_run_job }} -# database_run_job: ${{ steps.check_files.outputs.database_run_job }} -# dynamiclinks_run_job: ${{ steps.check_files.outputs.dynamiclinks_run_job }} -# firestore_run_job: ${{ steps.check_files.outputs.firestore_run_job }} -# functions_run_job: ${{ steps.check_files.outputs.functions_run_job }} -# inappmessaging_run_job: ${{ steps.check_files.outputs.inappmessaging_run_job }} -# installations_run_job: ${{ steps.check_files.outputs.installations_run_job }} -# messaging_run_job: ${{ steps.check_files.outputs.messaging_run_job }} -# performance_run_job: ${{ steps.check_files.outputs.performance_run_job }} -# remoteconfig_run_job: ${{ steps.check_files.outputs.remoteconfig_run_job }} -# storage_run_job: ${{ steps.check_files.outputs.storage_run_job }} -# target_branch_head: ${{ steps.check_files.outputs.target_branch_head }} -# runs-on: ubuntu-latest -# steps: -# - name: Checkout code -# uses: actions/checkout@v3 -# with: -# fetch-depth: 0 -# - name: check files -# id: check_files -# env: -# pr_branch: ${{ github.event.pull_request.head.ref }} -# run: | -# if [ ! -z "${{ env.METRICS_SERVICE_SECRET }}" ]; then -# ./scripts/health_metrics/get_updated_files.sh -# fi +jobs: + # Check all the modified SDKs, the flags will be true if changed files match patterns in the file + # scripts/health_metrics/file_patterns.json + check: + if: github.repository == 'Firebase/firebase-ios-sdk' && (github.event.action == 'opened' || github.event.action == 'synchronize') + name: Check changed files + outputs: + abtesting_run_job: ${{ steps.check_files.outputs.abtesting_run_job }} + analytics_run_job: ${{ steps.check_files.outputs.analytics_run_job }} + appcheck_run_job: ${{ steps.check_files.outputs.appcheck_run_job }} + appdistribution_run_job: ${{ steps.check_files.outputs.appdistribution_run_job }} + auth_run_job: ${{ steps.check_files.outputs.auth_run_job }} + crashlytics_run_job: ${{ steps.check_files.outputs.crashlytics_run_job }} + database_run_job: ${{ steps.check_files.outputs.database_run_job }} + dynamiclinks_run_job: ${{ steps.check_files.outputs.dynamiclinks_run_job }} + firestore_run_job: ${{ steps.check_files.outputs.firestore_run_job }} + functions_run_job: ${{ steps.check_files.outputs.functions_run_job }} + inappmessaging_run_job: ${{ steps.check_files.outputs.inappmessaging_run_job }} + installations_run_job: ${{ steps.check_files.outputs.installations_run_job }} + messaging_run_job: ${{ steps.check_files.outputs.messaging_run_job }} + performance_run_job: ${{ steps.check_files.outputs.performance_run_job }} + remoteconfig_run_job: ${{ steps.check_files.outputs.remoteconfig_run_job }} + storage_run_job: ${{ steps.check_files.outputs.storage_run_job }} + target_branch_head: ${{ steps.check_files.outputs.target_branch_head }} + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: check files + id: check_files + env: + pr_branch: ${{ github.event.pull_request.head.ref }} + run: | + if [ ! -z "${{ env.METRICS_SERVICE_SECRET }}" ]; then + ./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 == 'master') || github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - 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}" + 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 == 'master') || github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - 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 }} + # 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. -# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.abtesting_run_job == 'true'|| github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Build and test -# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseABTesting --platform=${{ matrix.target }} -# - uses: actions/upload-artifact@v2 -# with: -# name: codecoverage -# path: /Users/runner/*.xcresult + pod-lib-lint-abtesting: + needs: check + # Don't run on private repo unless it is a PR. + if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.abtesting_run_job == 'true'|| github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Build and test + run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseABTesting --platform=${{ matrix.target }} + - uses: actions/upload-artifact@v2 + with: + name: codecoverage + path: /Users/runner/*.xcresult -# pod-lib-lint-auth: -# needs: check -# # Don't run on private repo unless it is a PR. -# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.auth_run_job == 'true'|| github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Build and test -# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseAuth --platform=${{ matrix.target }} -# - uses: actions/upload-artifact@v2 -# with: -# name: codecoverage -# path: /Users/runner/*.xcresult + pod-lib-lint-auth: + needs: check + # Don't run on private repo unless it is a PR. + if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.auth_run_job == 'true'|| github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Build and test + run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseAuth --platform=${{ matrix.target }} + - uses: actions/upload-artifact@v2 + with: + name: codecoverage + path: /Users/runner/*.xcresult -# pod-lib-lint-database: -# needs: check -# # Don't run on private repo unless it is a PR. -# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.database_run_job == 'true' || github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Build and test -# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseDatabase --platform=${{ matrix.target }} -# - uses: actions/upload-artifact@v2 -# with: -# name: codecoverage -# path: /Users/runner/*.xcresult + pod-lib-lint-database: + needs: check + # Don't run on private repo unless it is a PR. + if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.database_run_job == 'true' || github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Build and test + run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseDatabase --platform=${{ matrix.target }} + - uses: actions/upload-artifact@v2 + with: + name: codecoverage + path: /Users/runner/*.xcresult -# pod-lib-lint-dynamiclinks: -# needs: check -# # Don't run on private repo unless it is a PR. -# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.dynamiclinks_run_job == 'true'|| github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Build and test -# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseDynamicLinks --platform=${{ matrix.target }} -# - uses: actions/upload-artifact@v2 -# with: -# name: codecoverage -# path: /Users/runner/*.xcresult + pod-lib-lint-dynamiclinks: + needs: check + # Don't run on private repo unless it is a PR. + if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.dynamiclinks_run_job == 'true'|| github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Build and test + run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseDynamicLinks --platform=${{ matrix.target }} + - uses: actions/upload-artifact@v2 + with: + name: codecoverage + path: /Users/runner/*.xcresult -# pod-lib-lint-firestore: -# needs: check -# # Don't run on private repo unless it is a PR. -# # Disable Firestore for now since Firestore currently does not have unit tests in podspecs. -# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.firestore_run_job == 'true'|| github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Build and test -# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseFirestore --platform=${{ matrix.target }} -# - uses: actions/upload-artifact@v2 -# with: -# name: codecoverage -# path: /Users/runner/*.xcresult + pod-lib-lint-firestore: + needs: check + # Don't run on private repo unless it is a PR. + # Disable Firestore for now since Firestore currently does not have unit tests in podspecs. + if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.firestore_run_job == 'true'|| github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Build and test + run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseFirestore --platform=${{ matrix.target }} + - uses: actions/upload-artifact@v2 + with: + name: codecoverage + path: /Users/runner/*.xcresult -# pod-lib-lint-functions: -# needs: check -# # Don't run on private repo unless it is a PR. -# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.functions_run_job == 'true'|| github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Build and test -# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseFunctions --platform=${{ matrix.target }} -# - uses: actions/upload-artifact@v2 -# with: -# name: codecoverage -# path: /Users/runner/*.xcresult + pod-lib-lint-functions: + needs: check + # Don't run on private repo unless it is a PR. + if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.functions_run_job == 'true'|| github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Build and test + run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseFunctions --platform=${{ matrix.target }} + - uses: actions/upload-artifact@v2 + with: + name: codecoverage + path: /Users/runner/*.xcresult -# pod-lib-lint-inappmessaging: -# needs: check -# # Don't run on private repo unless it is a PR. -# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.inappmessaging_run_job == 'true'|| github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Build and test -# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseInAppMessaging --platform=${{ matrix.target }} -# - uses: actions/upload-artifact@v2 -# with: -# name: codecoverage -# path: /Users/runner/*.xcresult + pod-lib-lint-inappmessaging: + needs: check + # Don't run on private repo unless it is a PR. + if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.inappmessaging_run_job == 'true'|| github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Build and test + run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseInAppMessaging --platform=${{ matrix.target }} + - uses: actions/upload-artifact@v2 + with: + name: codecoverage + path: /Users/runner/*.xcresult -# pod-lib-lint-messaging: -# needs: check -# # Don't run on private repo unless it is a PR. -# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.messaging_run_job == 'true'|| github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Build and test -# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseMessaging --platform=${{ matrix.target }} -# - uses: actions/upload-artifact@v2 -# with: -# name: codecoverage -# path: /Users/runner/*.xcresult + pod-lib-lint-messaging: + needs: check + # Don't run on private repo unless it is a PR. + if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.messaging_run_job == 'true'|| github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Build and test + run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseMessaging --platform=${{ matrix.target }} + - uses: actions/upload-artifact@v2 + with: + name: codecoverage + path: /Users/runner/*.xcresult -# pod-lib-lint-performance: -# needs: check -# # Don't run on private repo unless it is a PR. -# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.performance_run_job == 'true'|| github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Install xcpretty -# run: gem install xcpretty -# - name: Build and test -# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebasePerformance --platform=${{ matrix.target }} -# - uses: actions/upload-artifact@v2 -# with: -# name: codecoverage -# path: /Users/runner/*.xcresult + pod-lib-lint-performance: + needs: check + # Don't run on private repo unless it is a PR. + if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.performance_run_job == 'true'|| github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Install xcpretty + run: gem install xcpretty + - name: Build and test + run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebasePerformance --platform=${{ matrix.target }} + - uses: actions/upload-artifact@v2 + with: + name: codecoverage + path: /Users/runner/*.xcresult -# pod-lib-lint-remoteconfig: -# needs: check -# # Don't run on private repo unless it is a PR. -# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.remoteconfig_run_job == 'true'|| github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Build and test -# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseRemoteConfig --platform=${{ matrix.target }} -# - uses: actions/upload-artifact@v2 -# with: -# name: codecoverage -# path: /Users/runner/*.xcresult + pod-lib-lint-remoteconfig: + needs: check + # Don't run on private repo unless it is a PR. + if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.remoteconfig_run_job == 'true'|| github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Build and test + run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseRemoteConfig --platform=${{ matrix.target }} + - uses: actions/upload-artifact@v2 + with: + name: codecoverage + path: /Users/runner/*.xcresult -# pod-lib-lint-storage: -# needs: check -# # Don't run on private repo unless it is a PR. -# if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.storage_run_job == 'true'|| github.event.pull_request.merged) -# runs-on: macos-12 -# strategy: -# matrix: -# target: [iOS] -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: scripts/setup_bundler.sh -# - name: Build and test -# run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseStorage --platform=${{ matrix.target }} -# - uses: actions/upload-artifact@v2 -# with: -# name: codecoverage -# path: /Users/runner/*.xcresult + pod-lib-lint-storage: + needs: check + # Don't run on private repo unless it is a PR. + if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.storage_run_job == 'true'|| github.event.pull_request.merged) + runs-on: macos-12 + strategy: + matrix: + target: [iOS] + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: scripts/setup_bundler.sh + - name: Build and test + run: ./scripts/health_metrics/pod_test_code_coverage_report.sh --sdk=FirebaseStorage --platform=${{ matrix.target }} + - uses: actions/upload-artifact@v2 + with: + name: codecoverage + path: /Users/runner/*.xcresult -# create_report: -# needs: [check, pod-lib-lint-abtesting, pod-lib-lint-auth, pod-lib-lint-database, pod-lib-lint-dynamiclinks, pod-lib-lint-firestore, pod-lib-lint-functions, pod-lib-lint-inappmessaging, pod-lib-lint-messaging, pod-lib-lint-performance, pod-lib-lint-remoteconfig, pod-lib-lint-storage] -# if: always() -# runs-on: macos-12 -# steps: -# - name: Checkout code -# uses: actions/checkout@v3 -# with: -# fetch-depth: 0 -# - name: Access to Metrics Service -# if: github.event.pull_request.head.repo.full_name == github.repository && (github.event.action != 'closed' || github.event.pull_request.merged) -# 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}" + create_report: + needs: [check, pod-lib-lint-abtesting, pod-lib-lint-auth, pod-lib-lint-database, pod-lib-lint-dynamiclinks, pod-lib-lint-firestore, pod-lib-lint-functions, pod-lib-lint-inappmessaging, pod-lib-lint-messaging, pod-lib-lint-performance, pod-lib-lint-remoteconfig, pod-lib-lint-storage] + if: always() + runs-on: macos-12 + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Access to Metrics Service + if: github.event.pull_request.head.repo.full_name == github.repository && (github.event.action != 'closed' || github.event.pull_request.merged) + 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 -# - uses: actions/download-artifact@v2 -# id: download -# with: -# path: /Users/runner/test -# - name: Compare Diff and Post a Report -# if: github.event.pull_request.merged != true && github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'master' -# env: -# base_commit: ${{ needs.check.outputs.target_branch_head }} -# run: | -# # Get Head commit of the branch, instead of a merge commit created by actions/checkout. -# if [ -d "${{steps.download.outputs.download-path}}" ]; then -# cd scripts/health_metrics/generate_code_coverage_report -# swift run CoverageReportGenerator --presubmit "firebase/firebase-ios-sdk" --head-commit "${GITHUB_SHA}" --token $(gcloud auth print-identity-token) --xcresult-dir "/Users/runner/test/codecoverage" --log-link "https://github.com/firebase/firebase-ios-sdk/actions/runs/${GITHUB_RUN_ID}" --pull-request-num ${{github.event.pull_request.number}} --base-commit "$base_commit" -# fi -# # Will reactivate the job after the issue #8305 is resovled. -# # - name: Incremental Code Coverage -# # if: github.event.pull_request.merged != true && github.event.action != 'closed' -# # env: -# # base_commit: ${{ needs.check.outputs.base_commit }} -# # run: | -# # # Get Head commit of the branch, instead of a merge commit created by actions/checkout. -# # GITHUB_SHA=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.head.sha) -# # # Get a JSON of `git diff` from the base commit. -# # git diff -U0 ${base_commit} "${GITHUB_SHA}" | scripts/health_metrics/git_diff_to_json.sh > scripts/health_metrics/generate_code_coverage_report/git_diff.json -# # cat "scripts/health_metrics/generate_code_coverage_report/git_diff.json" -# # if [ -d "${{steps.download.outputs.download-path}}" ]; then -# # # Create an uncovered_file_lines.json including code lines not covered by tests. -# # cd scripts/health_metrics/generate_code_coverage_report -# # swift run IncrementalCoverageReportGenerator --changed-files "git_diff.json" --file-archive-root-path "${GITHUB_WORKSPACE}" --xcresult-dir "${{steps.download.outputs.download-path}}" --uncovered-line-file-json "uncovered_file_lines.json" -# # # Post uncovered lines to PRs. -# # pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") -# # cd .. -# # bundle install -# # INPUT_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }} \ -# # GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" \ -# # UNCOVERED_LINE_FILE="generate_code_coverage_report/uncovered_file_lines.json" \ -# # TESTING_COMMIT="${GITHUB_SHA}" \ -# # PULL_REQUEST="${pull_number}" \ -# # bundle exec ruby post_incremental_coverage_in_pr.rb -# # fi -# - name: Update New Coverage Data -# if: github.event.pull_request.merged && github.event.pull_request.head.repo.full_name == github.repository -# run: | -# if [ -d "${{steps.download.outputs.download-path}}" ]; then -# cd scripts/health_metrics/generate_code_coverage_report -# swift run CoverageReportGenerator --merge "firebase/firebase-ios-sdk" --head-commit "${GITHUB_SHA}" --token $(gcloud auth print-identity-token) --xcresult-dir "/Users/runner/test/codecoverage" --log-link "https://github.com/firebase/firebase-ios-sdk/actions/runs/${GITHUB_RUN_ID}" --source-branch "${{ github.base_ref }}" -# fi + # 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 + - uses: actions/download-artifact@v2 + id: download + with: + path: /Users/runner/test + - name: Compare Diff and Post a Report + if: github.event.pull_request.merged != true && github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'master' + env: + base_commit: ${{ needs.check.outputs.target_branch_head }} + run: | + # Get Head commit of the branch, instead of a merge commit created by actions/checkout. + if [ -d "${{steps.download.outputs.download-path}}" ]; then + cd scripts/health_metrics/generate_code_coverage_report + swift run CoverageReportGenerator --presubmit "firebase/firebase-ios-sdk" --head-commit "${GITHUB_SHA}" --token $(gcloud auth print-identity-token) --xcresult-dir "/Users/runner/test/codecoverage" --log-link "https://github.com/firebase/firebase-ios-sdk/actions/runs/${GITHUB_RUN_ID}" --pull-request-num ${{github.event.pull_request.number}} --base-commit "$base_commit" + fi + # Will reactivate the job after the issue #8305 is resovled. + # - name: Incremental Code Coverage + # if: github.event.pull_request.merged != true && github.event.action != 'closed' + # env: + # base_commit: ${{ needs.check.outputs.base_commit }} + # run: | + # # Get Head commit of the branch, instead of a merge commit created by actions/checkout. + # GITHUB_SHA=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.head.sha) + # # Get a JSON of `git diff` from the base commit. + # git diff -U0 ${base_commit} "${GITHUB_SHA}" | scripts/health_metrics/git_diff_to_json.sh > scripts/health_metrics/generate_code_coverage_report/git_diff.json + # cat "scripts/health_metrics/generate_code_coverage_report/git_diff.json" + # if [ -d "${{steps.download.outputs.download-path}}" ]; then + # # Create an uncovered_file_lines.json including code lines not covered by tests. + # cd scripts/health_metrics/generate_code_coverage_report + # swift run IncrementalCoverageReportGenerator --changed-files "git_diff.json" --file-archive-root-path "${GITHUB_WORKSPACE}" --xcresult-dir "${{steps.download.outputs.download-path}}" --uncovered-line-file-json "uncovered_file_lines.json" + # # Post uncovered lines to PRs. + # pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") + # cd .. + # bundle install + # INPUT_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }} \ + # GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" \ + # UNCOVERED_LINE_FILE="generate_code_coverage_report/uncovered_file_lines.json" \ + # TESTING_COMMIT="${GITHUB_SHA}" \ + # PULL_REQUEST="${pull_number}" \ + # bundle exec ruby post_incremental_coverage_in_pr.rb + # fi + - name: Update New Coverage Data + if: github.event.pull_request.merged && github.event.pull_request.head.repo.full_name == github.repository + run: | + if [ -d "${{steps.download.outputs.download-path}}" ]; then + cd scripts/health_metrics/generate_code_coverage_report + swift run CoverageReportGenerator --merge "firebase/firebase-ios-sdk" --head-commit "${GITHUB_SHA}" --token $(gcloud auth print-identity-token) --xcresult-dir "/Users/runner/test/codecoverage" --log-link "https://github.com/firebase/firebase-ios-sdk/actions/runs/${GITHUB_RUN_ID}" --source-branch "${{ github.base_ref }}" + fi diff --git a/.github/workflows/spectesting.yml b/.github/workflows/spectesting.yml index 3c6d465ddab..55388cb15f9 100644 --- a/.github/workflows/spectesting.yml +++ b/.github/workflows/spectesting.yml @@ -1,68 +1,68 @@ -# name: spectesting +name: spectesting -# on: -# pull_request +on: + pull_request -# concurrency: -# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} -# cancel-in-progress: true +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true -# jobs: -# specs_checking: -# # Don't run on private repo unless it is a PR. -# if: github.repository == 'Firebase/firebase-ios-sdk' -# runs-on: macos-12 -# outputs: -# matrix: ${{ steps.check_files.outputs.matrix }} -# podspecs: ${{ steps.check_files.outputs.podspecs }} -# steps: -# - name: Checkout code -# uses: actions/checkout@v3 -# with: -# fetch-depth: 0 -# - name: check files -# id: check_files -# env: -# pr_branch: ${{ github.event.pull_request.head.ref }} -# run: | -# # The output.json will have podspecs that will be tested. -# # ``` output.json -# # [{"podspec":"FirebaseABTesting.podspec"},{"podspec":"FirebaseAnalytics.podspec"}] -# # ``` -# # This array will help generate a matrix for jobs in GHA, taking -# # advantage of `include`. -# # https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-including-additional-values-into-combinations -# # The final matrix will be set as an env var in the GHA workflow, -# # This env var, matrix, will be passed as a matrix in the next job of -# # the workflow. -# # If multiple podspecs need to be excluded, escaping space is required -# # to split podspecs, e.g. get_updated_files.sh ... -e Firebase.podspec\ FirebaseABTesting.podspec -# ./scripts/health_metrics/get_updated_files.sh -p output.json -e Firebase.podspec\ FirebaseFunctions.podspec -# echo "::set-output name=matrix::{\"include\":$( cat output.json )}" -# # `podspecs` is to help determine if specs_testing job should be run. -# echo "::set-output name=podspecs::$(cat output.json)" -# specs_testing: -# needs: specs_checking -# if: ${{ needs.specs_checking.outputs.podspecs != '[]' }} -# runs-on: macos-12 -# strategy: -# fail-fast: false -# matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}} -# env: -# PODSPEC: ${{ matrix.podspec }} -# steps: -# - name: Checkout code -# uses: actions/checkout@v3 -# with: -# fetch-depth: 0 -# - name: Init podspecs and source -# run: | -# mkdir specTestingLogs -# cd ReleaseTooling -# swift run podspecs-tester --git-root "${GITHUB_WORKSPACE}" --podspec ${PODSPEC} --skip-tests --temp-log-dir "${GITHUB_WORKSPACE}/specTestingLogs" -# - name: Upload Failed Testing Logs -# if: failure() -# uses: actions/upload-artifact@v2 -# with: -# name: specTestingLogs -# path: specTestingLogs/*.txt +jobs: + specs_checking: + # Don't run on private repo unless it is a PR. + if: github.repository == 'Firebase/firebase-ios-sdk' + runs-on: macos-12 + outputs: + matrix: ${{ steps.check_files.outputs.matrix }} + podspecs: ${{ steps.check_files.outputs.podspecs }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: check files + id: check_files + env: + pr_branch: ${{ github.event.pull_request.head.ref }} + run: | + # The output.json will have podspecs that will be tested. + # ``` output.json + # [{"podspec":"FirebaseABTesting.podspec"},{"podspec":"FirebaseAnalytics.podspec"}] + # ``` + # This array will help generate a matrix for jobs in GHA, taking + # advantage of `include`. + # https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-including-additional-values-into-combinations + # The final matrix will be set as an env var in the GHA workflow, + # This env var, matrix, will be passed as a matrix in the next job of + # the workflow. + # If multiple podspecs need to be excluded, escaping space is required + # to split podspecs, e.g. get_updated_files.sh ... -e Firebase.podspec\ FirebaseABTesting.podspec + ./scripts/health_metrics/get_updated_files.sh -p output.json -e Firebase.podspec\ FirebaseFunctions.podspec + echo "::set-output name=matrix::{\"include\":$( cat output.json )}" + # `podspecs` is to help determine if specs_testing job should be run. + echo "::set-output name=podspecs::$(cat output.json)" + specs_testing: + needs: specs_checking + if: ${{ needs.specs_checking.outputs.podspecs != '[]' }} + runs-on: macos-12 + strategy: + fail-fast: false + matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}} + env: + PODSPEC: ${{ matrix.podspec }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Init podspecs and source + run: | + mkdir specTestingLogs + cd ReleaseTooling + swift run podspecs-tester --git-root "${GITHUB_WORKSPACE}" --podspec ${PODSPEC} --skip-tests --temp-log-dir "${GITHUB_WORKSPACE}/specTestingLogs" + - name: Upload Failed Testing Logs + if: failure() + uses: actions/upload-artifact@v2 + with: + name: specTestingLogs + path: specTestingLogs/*.txt diff --git a/.github/workflows/spm.yml b/.github/workflows/spm.yml index 5da8877b549..b9d6d7c1af1 100644 --- a/.github/workflows/spm.yml +++ b/.github/workflows/spm.yml @@ -1,79 +1,79 @@ -# name: spm +name: spm -# on: -# pull_request: -# paths: -# - '.github/workflows/spm.yml' -# - 'Package.swift' -# - '.swiftpm/*' -# - 'scripts/build.sh' -# - 'SwiftPMTests/*' -# - 'SwiftPM-PlatformExclude' -# - 'Gemfile*' -# schedule: -# # Run every day at 12am (PST) - cron uses UTC times -# - cron: '0 8 * * *' +on: + pull_request: + paths: + - '.github/workflows/spm.yml' + - 'Package.swift' + - '.swiftpm/*' + - 'scripts/build.sh' + - 'SwiftPMTests/*' + - 'SwiftPM-PlatformExclude' + - 'Gemfile*' + schedule: + # Run every day at 12am (PST) - cron uses UTC times + - cron: '0 8 * * *' -# # This workflow builds and tests the Swift Package Manager. Only iOS runs on PRs -# # because each platform takes 15-20 minutes after adding Firestore. +# This workflow builds and tests the Swift Package Manager. Only iOS runs on PRs +# because each platform takes 15-20 minutes after adding Firestore. -# concurrency: -# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} -# cancel-in-progress: true +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true -# jobs: -# swift-build-run: -# # 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' -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - name: Initialize xcodebuild -# run: scripts/setup_spm_tests.sh -# - name: Functions Integration Test Server -# run: FirebaseFunctions/Backend/start.sh synchronous -# - name: iOS Unit Tests -# run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS spm +jobs: + swift-build-run: + # 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' + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - name: Initialize xcodebuild + run: scripts/setup_spm_tests.sh + - name: Functions Integration Test Server + run: FirebaseFunctions/Backend/start.sh synchronous + - name: iOS Unit Tests + run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS spm -# # Test iOS Device build since some Firestore dependencies build different files. -# iOS-Device: -# # 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' -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - name: Initialize xcodebuild -# run: scripts/setup_spm_tests.sh -# - name: iOS Device and Test Build -# run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS-device spmbuildonly + # Test iOS Device build since some Firestore dependencies build different files. + iOS-Device: + # 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' + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - name: Initialize xcodebuild + run: scripts/setup_spm_tests.sh + - name: iOS Device and Test Build + run: scripts/third_party/travis/retry.sh ./scripts/build.sh Firebase-Package iOS-device spmbuildonly -# platforms: -# # 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' + platforms: + # 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' -# runs-on: macos-12 -# strategy: -# matrix: -# target: [tvOS, macOS, catalyst] -# # Full set of Firebase-Package tests only run on iOS. -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - name: Initialize xcodebuild -# run: scripts/setup_spm_tests.sh -# - name: Objc Import Tests -# run: scripts/third_party/travis/retry.sh ./scripts/build.sh objc-import-test ${{ matrix.target }} spm -# - name: Swift Tests -# run: scripts/third_party/travis/retry.sh ./scripts/build.sh swift-test ${{ matrix.target }} spm -# - name: Version Tests -# run: scripts/third_party/travis/retry.sh ./scripts/build.sh version-test ${{ matrix.target }} spm -# - name: Analytics Build Tests -# run: scripts/third_party/travis/retry.sh ./scripts/build.sh analytics-import-test ${{ matrix.target }} spm + runs-on: macos-12 + strategy: + matrix: + target: [tvOS, macOS, catalyst] + # Full set of Firebase-Package tests only run on iOS. + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - name: Initialize xcodebuild + run: scripts/setup_spm_tests.sh + - name: Objc Import Tests + run: scripts/third_party/travis/retry.sh ./scripts/build.sh objc-import-test ${{ matrix.target }} spm + - name: Swift Tests + run: scripts/third_party/travis/retry.sh ./scripts/build.sh swift-test ${{ matrix.target }} spm + - name: Version Tests + run: scripts/third_party/travis/retry.sh ./scripts/build.sh version-test ${{ matrix.target }} spm + - name: Analytics Build Tests + run: scripts/third_party/travis/retry.sh ./scripts/build.sh analytics-import-test ${{ matrix.target }} spm diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index da6ff9f3927..abc585c387c 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -1,618 +1,618 @@ -# name: zip +name: zip -# on: -# pull_request: -# paths: -# - 'ReleaseTooling/Sources/**' -# - '.github/workflows/zip.yml' -# - 'scripts/build_non_firebase_sdks.sh' -# - 'Gemfile*' -# # Don't run based on any markdown only changes. -# - '!ReleaseTooling/*.md' -# schedule: -# # Run every day at 8pm(PST) - cron uses UTC times -# - cron: '0 4 * * *' +on: + pull_request: + paths: + - 'ReleaseTooling/Sources/**' + - '.github/workflows/zip.yml' + - 'scripts/build_non_firebase_sdks.sh' + - 'Gemfile*' + # Don't run based on any markdown only changes. + - '!ReleaseTooling/*.md' + schedule: + # Run every day at 8pm(PST) - cron uses UTC times + - cron: '0 4 * * *' -# workflow_dispatch: -# inputs: -# custom_spec_repos: -# description: 'Custom Podspec repos' -# required: true -# default: 'https://github.com/firebase/SpecsStaging.git' + workflow_dispatch: + inputs: + custom_spec_repos: + description: 'Custom Podspec repos' + required: true + default: 'https://github.com/firebase/SpecsStaging.git' -# concurrency: -# group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} -# cancel-in-progress: true +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true -# jobs: -# package-release: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - name: Xcode 14.1 -# run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: ZipBuildingTest -# run: | -# mkdir -p release_zip_dir -# sh -x scripts/build_zip.sh release_zip_dir \ -# "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}" -# - uses: actions/upload-artifact@v1 -# with: -# name: Firebase-release-zip-zip -# # Zip the entire output directory since the builder adds subdirectories we don't know the -# # name of. -# path: release_zip_dir +jobs: + package-release: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - name: Xcode 14.1 + run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: ZipBuildingTest + run: | + mkdir -p release_zip_dir + sh -x scripts/build_zip.sh release_zip_dir \ + "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}" + - uses: actions/upload-artifact@v1 + with: + name: Firebase-release-zip-zip + # Zip the entire output directory since the builder adds subdirectories we don't know the + # name of. + path: release_zip_dir -# build: -# # 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-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Xcode 14.1 -# run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer -# - name: Build -# run: | -# cd ReleaseTooling -# swift build -v + build: + # 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-12 + steps: + - uses: actions/checkout@v3 + - name: Xcode 14.1 + run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer + - name: Build + run: | + cd ReleaseTooling + swift build -v -# package-head: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: build -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 -# with: -# cache_key: ${{ matrix.os }} -# - name: Xcode 14.1 -# run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: ZipBuildingTest -# run: | -# mkdir -p zip_output_dir -# sh -x scripts/build_zip.sh \ -# zip_output_dir "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git,https://github.com/firebase/SpecsDev.git' }}" \ -# build-head -# - uses: actions/upload-artifact@v1 -# with: -# name: Firebase-actions-dir -# # Zip the entire output directory since the builder adds subdirectories we don't know the -# # name of. -# path: zip_output_dir + package-head: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: build + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 + with: + cache_key: ${{ matrix.os }} + - name: Xcode 14.1 + run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: ZipBuildingTest + run: | + mkdir -p zip_output_dir + sh -x scripts/build_zip.sh \ + zip_output_dir "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git,https://github.com/firebase/SpecsDev.git' }}" \ + build-head + - uses: actions/upload-artifact@v1 + with: + name: Firebase-actions-dir + # Zip the entire output directory since the builder adds subdirectories we don't know the + # name of. + path: zip_output_dir -# quickstart_framework_abtesting: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: package-head -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# FRAMEWORK_DIR: "Firebase-actions-dir" -# SDK: "ABTesting" -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Get framework dir -# uses: actions/download-artifact@v1 -# with: -# name: Firebase-actions-dir -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: Move frameworks -# run: | -# mkdir -p "${HOME}"/ios_frameworks/ -# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + -# - uses: actions/checkout@v3 -# - name: Setup quickstart -# env: -# LEGACY: true -# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FBLPromises.xcframework \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \ -# quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret" -# - name: Test Quickstart -# env: -# LEGACY: true -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") -# - name: Remove data before upload -# env: -# LEGACY: true -# if: ${{ failure() }} -# run: scripts/remove_data.sh abtesting -# - uses: actions/upload-artifact@v2 -# if: ${{ failure() }} -# with: -# name: quickstart_artifacts_abtesting -# path: quickstart-ios/ + quickstart_framework_abtesting: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: package-head + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FRAMEWORK_DIR: "Firebase-actions-dir" + SDK: "ABTesting" + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Get framework dir + uses: actions/download-artifact@v1 + with: + name: Firebase-actions-dir + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - uses: actions/checkout@v3 + - name: Setup quickstart + env: + LEGACY: true + run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FBLPromises.xcframework \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \ + quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret" + - name: Test Quickstart + env: + LEGACY: true + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - name: Remove data before upload + env: + LEGACY: true + if: ${{ failure() }} + run: scripts/remove_data.sh abtesting + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: quickstart_artifacts_abtesting + path: quickstart-ios/ -# quickstart_framework_auth: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: package-head -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# FRAMEWORK_DIR: "Firebase-actions-dir" -# SDK: "Authentication" -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Get framework dir -# uses: actions/download-artifact@v1 -# with: -# name: Firebase-actions-dir -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: Move frameworks -# run: | -# mkdir -p "${HOME}"/ios_frameworks/ -# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + -# - name: Setup Swift Quickstart -# run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FBSDKLoginKit FBSDKCoreKit FBSDKCoreKit_Basics FBAEMKit" scripts/setup_quickstart_framework.sh \ -# "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ -# "${HOME}"/ios_frameworks/Firebase/GoogleSignIn/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \ -# quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret" -# - name: Test Swift Quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") -# - name: Remove data before upload -# if: ${{ failure() }} -# run: scripts/remove_data.sh authentiation -# - uses: actions/upload-artifact@v2 -# if: ${{ failure() }} -# with: -# name: quickstart_artifacts_auth -# path: quickstart-ios/ + quickstart_framework_auth: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: package-head + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FRAMEWORK_DIR: "Firebase-actions-dir" + SDK: "Authentication" + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Get framework dir + uses: actions/download-artifact@v1 + with: + name: Firebase-actions-dir + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup Swift Quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FBSDKLoginKit FBSDKCoreKit FBSDKCoreKit_Basics FBAEMKit" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ + "${HOME}"/ios_frameworks/Firebase/GoogleSignIn/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-auth.plist.gpg \ + quickstart-ios/authentication/GoogleService-Info.plist "$plist_secret" + - name: Test Swift Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - name: Remove data before upload + if: ${{ failure() }} + run: scripts/remove_data.sh authentiation + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: quickstart_artifacts_auth + path: quickstart-ios/ -# quickstart_framework_config: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: package-head -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# FRAMEWORK_DIR: "Firebase-actions-dir" -# SDK: "Config" -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Get framework dir -# uses: actions/download-artifact@v1 -# with: -# name: Firebase-actions-dir -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: Move frameworks -# run: | -# mkdir -p "${HOME}"/ios_frameworks/ -# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + -# - name: Setup Swift Quickstart + quickstart_framework_config: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: package-head + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FRAMEWORK_DIR: "Firebase-actions-dir" + SDK: "Config" + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Get framework dir + uses: actions/download-artifact@v1 + with: + name: Firebase-actions-dir + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup Swift Quickstart -# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \ -# quickstart-ios/config/GoogleService-Info.plist "$plist_secret" -# - name: Test Swift Quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") -# - name: Remove data before upload -# if: ${{ failure() }} -# run: scripts/remove_data.sh config -# - uses: actions/upload-artifact@v2 -# if: ${{ failure() }} -# with: -# name: quickstart_artifacts_config -# path: quickstart-ios/ + run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \ + quickstart-ios/config/GoogleService-Info.plist "$plist_secret" + - name: Test Swift Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - name: Remove data before upload + if: ${{ failure() }} + run: scripts/remove_data.sh config + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: quickstart_artifacts_config + path: quickstart-ios/ -# quickstart_framework_crashlytics: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: package-head -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# FRAMEWORK_DIR: "Firebase-actions-dir" -# SDK: "Crashlytics" -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Get framework dir -# uses: actions/download-artifact@v1 -# with: -# name: Firebase-actions-dir -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: Move frameworks -# run: | -# mkdir -p "${HOME}"/ios_frameworks/ -# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + -# - uses: actions/checkout@v3 -# - name: Setup quickstart -# env: -# LEGACY: true -# run: | -# SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* -# cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart -# cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart -# chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/run -# chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/upload-symbols -# # TODO(#8057): Restore Swift Quickstart -# # - name: Setup swift quickstart -# # env: -# # LEGACY: true -# # run: | -# # SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" NON_FIREBASE_SDKS="ReachabilitySwift" scripts/setup_quickstart_framework.sh \ -# # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \ -# quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret" -# - name: Test Quickstart -# env: -# LEGACY: true -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") -# # TODO(#8057): Restore Swift Quickstart -# # - name: Test Swift Quickstart -# # env: -# # LEGACY: true -# # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) -# - name: Remove data before upload -# env: -# LEGACY: true -# if: ${{ failure() }} -# run: scripts/remove_data.sh crashlytics -# - uses: actions/upload-artifact@v2 -# if: ${{ failure() }} -# with: -# name: quickstart_artifacts_crashlytics -# path: quickstart-ios/ + quickstart_framework_crashlytics: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: package-head + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FRAMEWORK_DIR: "Firebase-actions-dir" + SDK: "Crashlytics" + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Get framework dir + uses: actions/download-artifact@v1 + with: + name: Firebase-actions-dir + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - uses: actions/checkout@v3 + - name: Setup quickstart + env: + LEGACY: true + run: | + SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseCrashlytics/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/run quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart + cp quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/Firebase/upload-symbols quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart + chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/run + chmod +x quickstart-ios/crashlytics/LegacyCrashlyticsQuickstart/upload-symbols + # TODO(#8057): Restore Swift Quickstart + # - name: Setup swift quickstart + # env: + # LEGACY: true + # run: | + # SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" NON_FIREBASE_SDKS="ReachabilitySwift" scripts/setup_quickstart_framework.sh \ + # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-crashlytics.plist.gpg \ + quickstart-ios/crashlytics/GoogleService-Info.plist "$plist_secret" + - name: Test Quickstart + env: + LEGACY: true + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + # TODO(#8057): Restore Swift Quickstart + # - name: Test Swift Quickstart + # env: + # LEGACY: true + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) + - name: Remove data before upload + env: + LEGACY: true + if: ${{ failure() }} + run: scripts/remove_data.sh crashlytics + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: quickstart_artifacts_crashlytics + path: quickstart-ios/ -# quickstart_framework_database: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: package-head -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# FRAMEWORK_DIR: "Firebase-actions-dir" -# SDK: "Database" -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Get framework dir -# uses: actions/download-artifact@v1 -# with: -# name: Firebase-actions-dir -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: Move frameworks -# run: | -# mkdir -p "${HOME}"/ios_frameworks/ -# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + -# - uses: actions/checkout@v3 -# - name: Setup quickstart -# run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ -# "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \ -# quickstart-ios/database/GoogleService-Info.plist "$plist_secret" -# - name: Test Quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") -# - name: Remove data before upload -# if: ${{ failure() }} -# run: scripts/remove_data.sh database -# - uses: actions/upload-artifact@v2 -# if: ${{ failure() }} -# with: -# name: quickstart_artifacts database -# path: quickstart-ios/ + quickstart_framework_database: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: package-head + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FRAMEWORK_DIR: "Firebase-actions-dir" + SDK: "Database" + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Get framework dir + uses: actions/download-artifact@v1 + with: + name: Firebase-actions-dir + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - uses: actions/checkout@v3 + - name: Setup quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="FirebaseDatabaseUI" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseDatabase/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-database.plist.gpg \ + quickstart-ios/database/GoogleService-Info.plist "$plist_secret" + - name: Test Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - name: Remove data before upload + if: ${{ failure() }} + run: scripts/remove_data.sh database + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: quickstart_artifacts database + path: quickstart-ios/ -# quickstart_framework_dynamiclinks: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: package-head -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# FRAMEWORK_DIR: "Firebase-actions-dir" -# SDK: "DynamicLinks" -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Get framework dir -# uses: actions/download-artifact@v1 -# with: -# name: Firebase-actions-dir -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: Move frameworks -# run: | -# mkdir -p "${HOME}"/ios_frameworks/ -# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + -# - name: Setup Objc Quickstart -# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* -# - name: Setup Swift Quickstart -# run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh -# - name: Update Environment Variable For DynamicLinks -# run: | -# sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements -# sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m -# sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \ -# quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret" -# - name: Test Objc Quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") -# - name: Test Swift Quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) -# - name: Remove data before upload -# if: ${{ failure() }} -# run: scripts/remove_data.sh dynamiclinks -# - uses: actions/upload-artifact@v2 -# if: ${{ failure() }} -# with: -# name: quickstart_artifacts_dynamiclinks -# path: quickstart-ios/ + quickstart_framework_dynamiclinks: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: package-head + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FRAMEWORK_DIR: "Firebase-actions-dir" + SDK: "DynamicLinks" + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Get framework dir + uses: actions/download-artifact@v1 + with: + name: Firebase-actions-dir + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - name: Setup Objc Quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Setup Swift Quickstart + run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh + - name: Update Environment Variable For DynamicLinks + run: | + sed -i '' 's#DYNAMIC_LINK_DOMAIN#https://qpf6m.app.goo.gl#' quickstart-ios/dynamiclinks/DynamicLinksExample/DynamicLinksExample.entitlements + sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExample/ViewController.m + sed -i '' 's#YOUR_DOMAIN_URI_PREFIX";#https://qpf6m.app.goo.gl";#' quickstart-ios/dynamiclinks/DynamicLinksExampleSwift/ViewController.swift + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-dynamiclinks.plist.gpg \ + quickstart-ios/dynamiclinks/GoogleService-Info.plist "$plist_secret" + - name: Test Objc Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - name: Test Swift Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) + - name: Remove data before upload + if: ${{ failure() }} + run: scripts/remove_data.sh dynamiclinks + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: quickstart_artifacts_dynamiclinks + path: quickstart-ios/ -# quickstart_framework_firestore: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: package-head -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# FRAMEWORK_DIR: "Firebase-actions-dir" -# SDK: "Firestore" -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Get framework dir -# uses: actions/download-artifact@v1 -# with: -# name: Firebase-actions-dir -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: Move frameworks -# run: | -# mkdir -p "${HOME}"/ios_frameworks/ -# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + -# - uses: actions/checkout@v3 -# - name: Setup quickstart -# run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \ -# "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \ -# quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret" -# - name: Test Quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") -# - name: Remove data before upload -# if: ${{ failure() }} -# run: scripts/remove_data.sh firestore -# - uses: actions/upload-artifact@v2 -# if: ${{ failure() }} -# with: -# name: quickstart_artifacts_firestore -# path: quickstart-ios/ + quickstart_framework_firestore: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: package-head + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FRAMEWORK_DIR: "Firebase-actions-dir" + SDK: "Firestore" + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Get framework dir + uses: actions/download-artifact@v1 + with: + name: Firebase-actions-dir + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - uses: actions/checkout@v3 + - name: Setup quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \ + quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret" + - name: Test Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - name: Remove data before upload + if: ${{ failure() }} + run: scripts/remove_data.sh firestore + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: quickstart_artifacts_firestore + path: quickstart-ios/ -# check_framework_firestore_symbols: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: package-head -# env: -# FRAMEWORK_DIR: "Firebase-actions-dir" -# FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 -# runs-on: macos-12 -# steps: -# - name: Xcode 14.1 -# run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer -# - uses: actions/checkout@v3 -# - name: Get framework dir -# uses: actions/download-artifact@v1 -# with: -# name: Firebase-actions-dir -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: Install xcpretty -# run: gem install xcpretty -# - name: Move frameworks -# run: | -# mkdir -p "${HOME}"/ios_frameworks/ -# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + -# - uses: actions/checkout@v3 -# - name: Check linked Firestore.xcframework for unlinked symbols. -# run: | -# scripts/check_firestore_symbols.sh \ -# $(pwd) \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestore.xcframework + check_framework_firestore_symbols: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: package-head + env: + FRAMEWORK_DIR: "Firebase-actions-dir" + FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 + runs-on: macos-12 + steps: + - name: Xcode 14.1 + run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer + - uses: actions/checkout@v3 + - name: Get framework dir + uses: actions/download-artifact@v1 + with: + name: Firebase-actions-dir + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Install xcpretty + run: gem install xcpretty + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - uses: actions/checkout@v3 + - name: Check linked Firestore.xcframework for unlinked symbols. + run: | + scripts/check_firestore_symbols.sh \ + $(pwd) \ + "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestore.xcframework -# quickstart_framework_inappmessaging: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: package-head -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# FRAMEWORK_DIR: "Firebase-actions-dir" -# SDK: "InAppMessaging" -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Get framework dir -# uses: actions/download-artifact@v1 -# with: -# name: Firebase-actions-dir -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: Move frameworks -# run: | -# mkdir -p "${HOME}"/ios_frameworks/ -# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + -# - uses: actions/checkout@v3 -# - name: Setup quickstart -# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* -# - name: Setup swift quickstart -# run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \ -# quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret" -# - name: Test Quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") -# - name: Test Swift Quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) -# - name: Remove data before upload -# if: ${{ failure() }} -# run: scripts/remove_data.sh inappmessaging -# - uses: actions/upload-artifact@v2 -# if: ${{ failure() }} -# with: -# name: quickstart_artifacts_ihappmessaging -# path: quickstart-ios/ + quickstart_framework_inappmessaging: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: package-head + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FRAMEWORK_DIR: "Firebase-actions-dir" + SDK: "InAppMessaging" + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Get framework dir + uses: actions/download-artifact@v1 + with: + name: Firebase-actions-dir + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - uses: actions/checkout@v3 + - name: Setup quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseDynamicLinks/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseInAppMessaging/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Setup swift quickstart + run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-inappmessaging.plist.gpg \ + quickstart-ios/inappmessaging/GoogleService-Info.plist "$plist_secret" + - name: Test Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - name: Test Swift Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) + - name: Remove data before upload + if: ${{ failure() }} + run: scripts/remove_data.sh inappmessaging + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: quickstart_artifacts_ihappmessaging + path: quickstart-ios/ -# quickstart_framework_messaging: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: package-head -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# FRAMEWORK_DIR: "Firebase-actions-dir" -# SDK: "Messaging" -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Get framework dir -# uses: actions/download-artifact@v1 -# with: -# name: Firebase-actions-dir -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: Move frameworks -# run: | -# mkdir -p "${HOME}"/ios_frameworks/ -# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + -# - uses: actions/checkout@v3 -# - name: Setup quickstart -# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* -# - name: Setup swift quickstart -# run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ -# quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" -# - name: Test Quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") -# - name: Test Swift Quickstart -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) -# - name: Remove data before upload -# if: ${{ failure() }} -# run: scripts/remove_data.sh messaging -# - uses: actions/upload-artifact@v2 -# if: ${{ failure() }} -# with: -# name: quickstart_artifacts_messaging -# path: quickstart-ios/ + quickstart_framework_messaging: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: package-head + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FRAMEWORK_DIR: "Firebase-actions-dir" + SDK: "Messaging" + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Get framework dir + uses: actions/download-artifact@v1 + with: + name: Firebase-actions-dir + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - uses: actions/checkout@v3 + - name: Setup quickstart + run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseMessaging/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Setup swift quickstart + run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-messaging.plist.gpg \ + quickstart-ios/messaging/GoogleService-Info.plist "$plist_secret" + - name: Test Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - name: Test Swift Quickstart + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) + - name: Remove data before upload + if: ${{ failure() }} + run: scripts/remove_data.sh messaging + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: quickstart_artifacts_messaging + path: quickstart-ios/ -# quickstart_framework_storage: -# # Don't run on private repo. -# if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' -# needs: package-head -# env: -# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} -# FRAMEWORK_DIR: "Firebase-actions-dir" -# SDK: "Storage" -# runs-on: macos-12 -# steps: -# - uses: actions/checkout@v3 -# - name: Get framework dir -# uses: actions/download-artifact@v1 -# with: -# name: Firebase-actions-dir -# - uses: ruby/setup-ruby@v1 -# - name: Setup Bundler -# run: ./scripts/setup_bundler.sh -# - name: Move frameworks -# run: | -# mkdir -p "${HOME}"/ios_frameworks/ -# find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + -# - uses: actions/checkout@v3 -# - name: Setup quickstart -# env: -# LEGACY: true -# run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ -# "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* -# - name: Setup swift quickstart -# env: -# LEGACY: true -# run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh -# - name: Install Secret GoogleService-Info.plist -# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ -# quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" -# - name: Test Quickstart -# env: -# LEGACY: true -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") -# - name: Test Swift Quickstart -# env: -# LEGACY: true -# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) -# - name: Remove data before upload -# env: -# LEGACY: true -# if: ${{ failure() }} -# run: scripts/remove_data.sh storage -# - uses: actions/upload-artifact@v2 -# if: ${{ failure() }} -# with: -# name: quickstart_artifacts_storage -# path: quickstart-ios/ + quickstart_framework_storage: + # Don't run on private repo. + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: package-head + env: + plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + FRAMEWORK_DIR: "Firebase-actions-dir" + SDK: "Storage" + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Get framework dir + uses: actions/download-artifact@v1 + with: + name: Firebase-actions-dir + - uses: ruby/setup-ruby@v1 + - name: Setup Bundler + run: ./scripts/setup_bundler.sh + - name: Move frameworks + run: | + mkdir -p "${HOME}"/ios_frameworks/ + find "${GITHUB_WORKSPACE}/${FRAMEWORK_DIR}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + - uses: actions/checkout@v3 + - name: Setup quickstart + env: + LEGACY: true + run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \ + "${HOME}"/ios_frameworks/Firebase/FirebaseStorage/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + - name: Setup swift quickstart + env: + LEGACY: true + run: SAMPLE="$SDK" TARGET="${SDK}ExampleSwift" scripts/setup_quickstart_framework.sh + - name: Install Secret GoogleService-Info.plist + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \ + quickstart-ios/storage/GoogleService-Info.plist "$plist_secret" + - name: Test Quickstart + env: + LEGACY: true + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + - name: Test Swift Quickstart + env: + LEGACY: true + run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}" swift) + - name: Remove data before upload + env: + LEGACY: true + if: ${{ failure() }} + run: scripts/remove_data.sh storage + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: quickstart_artifacts_storage + path: quickstart-ios/ From 81792a78bd9d32f7e097a8b2b1dd383e193198d1 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Fri, 15 Sep 2023 13:43:10 -0400 Subject: [PATCH 17/20] Fix spacing --- .github/workflows/firestore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index c0a332c2161..14ca76163ba 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -378,7 +378,7 @@ jobs: # - name: Swift Build # run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift ${{ matrix.target }} spmbuildonly -spm-binary-cron: + spm-binary-cron: # Don't run on private repo. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' runs-on: macos-12 From e55ea308098a22cb126d2147315d7f9e59cb9bb3 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Tue, 10 Oct 2023 14:29:57 -0400 Subject: [PATCH 18/20] Update deprecation/documentation messages --- .../Sources/FirebaseFirestoreSwift.swift | 2 +- Firestore/Swift/CHANGELOG.md | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift b/FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift index 17d758d276d..9918633f67b 100644 --- a/FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift +++ b/FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift @@ -13,7 +13,7 @@ // limitations under the License. #warning( - "The `FirebaseFirestoreSwift` module is deprecated and will be removed in the future. All of the public API from `FirebaseFirestoreSwift` can now be accessed through the `FirebaseFirestore` module. To migrate, delete imports of `FirebaseFirestoreSwift` and remove the module as a dependency to your project. If applicable, any APIs namespaced with `FirebaseFirestoreSwift` can now be namespaced with `FirebaseFirestore`. Additionally, if applicable, `@testable import FirebaseFirestoreSwift` should be replaced with `@testable import FirebaseFirestore`." + "All of the public API from `FirebaseFirestoreSwift` can now be accessed through the `FirebaseFirestore` module. Therefore, the `FirebaseFirestoreSwift` module is deprecated and will be removed in the future. See https://firebase.google.com/docs/ios/swift-migration for migration instructions." ) // The `@_exported` is needed to prevent breaking clients that are using diff --git a/Firestore/Swift/CHANGELOG.md b/Firestore/Swift/CHANGELOG.md index 729384881c6..3ffebb7bb27 100644 --- a/Firestore/Swift/CHANGELOG.md +++ b/Firestore/Swift/CHANGELOG.md @@ -1,14 +1,9 @@ # Unreleased -- [deprecated] `FirebaseFirestoreSwift` has been deprecated, and will be - removed in a future release. All of the public API from - `FirebaseFirestoreSwift` can now be accessed through the - `FirebaseFirestore` module. To migrate, delete imports of - `FirebaseFirestoreSwift` and remove the module as a dependency to your - project. If applicable, any APIs namespaced with - `FirebaseFirestoreSwift` can now be namespaced with - `FirebaseFirestore`. Additionally, if applicable, - `@testable import FirebaseFirestoreSwift` should be replaced with - `@testable import FirebaseFirestore`. +- [deprecated] All of the public API from `FirebaseFirestoreSwift` can now + be accessed through the `FirebaseFirestore` module. Therefore, + `FirebaseFirestoreSwift` has been deprecated, and will be removed in a + future release. See https://firebase.google.com/docs/ios/swift-migration for + migration instructions. # 10.12.0 - [added] Added support animations on the `@FirestoreQuery` property wrapper. From 2488dfc6c22406abc440dd0ec805d043081de9f2 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Tue, 10 Oct 2023 17:26:45 -0400 Subject: [PATCH 19/20] Use abseil that 'master' is using --- Package.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Package.swift b/Package.swift index 5b5dbcbcc23..7c5555b95e9 100644 --- a/Package.swift +++ b/Package.swift @@ -1298,9 +1298,7 @@ func abseilDependency() -> Package.Dependency { if ProcessInfo.processInfo.environment["FIREBASE_SOURCE_FIRESTORE"] != nil { packageInfo = ( "https://github.com/firebase/abseil-cpp-SwiftPM.git", -// "0.20220623.0" ..< "0.20220624.0" - // Use older version because above newer version is broken. See #11788. - "0.20220203.1" ..< "0.20220204.0" + "0.20220623.0" ..< "0.20220624.0" ) } else { packageInfo = ( From b0be43cf63977c12796d41de6da9e1559bf00b30 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Thu, 12 Oct 2023 09:35:56 -0400 Subject: [PATCH 20/20] Update dependency version in podspec --- FirebaseFirestoreSwift.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FirebaseFirestoreSwift.podspec b/FirebaseFirestoreSwift.podspec index ef0afa3ceb2..7920a59fbd3 100644 --- a/FirebaseFirestoreSwift.podspec +++ b/FirebaseFirestoreSwift.podspec @@ -34,6 +34,6 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, 'FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift' ] - s.dependency 'FirebaseFirestore', '~> 10.16' + s.dependency 'FirebaseFirestore', '~> 10.17' end