Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Infra] Update Package.swift for Firebase 11 #13301

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/spm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,8 @@ jobs:
- 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
run: scripts/third_party/travis/retry.sh ./scripts/build.sh objc-import-test ${{ matrix.target }} spmbuildonly
- name: Swift Tests
run: scripts/third_party/travis/retry.sh ./scripts/build.sh swift-test ${{ matrix.target }} spm
run: scripts/third_party/travis/retry.sh ./scripts/build.sh swift-test ${{ matrix.target }} spmbuildonly
- 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
5 changes: 5 additions & 0 deletions FirebaseAnalytics/Tests/ObjCAPI/ObjCAPITests.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ @interface ObjCAPICoverage : XCTestCase
@end

@implementation ObjCAPICoverage

- (void)testFoo {
XCTAssert(YES);
}

- (NSString *)analyticsTests {
[FIRAnalytics logEventWithName:@"event_name" parameters:@{@"param" : @1}];
[FIRAnalytics setUserPropertyString:@"value" forName:@"name"];
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Touch all ci
# To update, change version below, run bundle install, test,
# commit Gemfile and Gemfile.lock.
source 'https://rubygems.org'
Expand Down
27 changes: 9 additions & 18 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1172,14 +1172,6 @@ let package = Package(
],
path: "SwiftPMTests/swift-test"
),
.testTarget(
name: "analytics-import-test",
dependencies: [
"FirebaseAnalyticsWrapper",
"Firebase",
],
path: "SwiftPMTests/analytics-import-test"
),
.testTarget(
name: "objc-import-test",
dependencies: [
Expand Down Expand Up @@ -1357,14 +1349,13 @@ func abseilDependency() -> Package.Dependency {
"https://github.com/firebase/abseil-cpp-SwiftPM.git",
"0.20240116.1" ..< "0.20240117.0"
)
return .package(url: packageInfo.url, packageInfo.range)
} else {
packageInfo = (
"https://github.com/google/abseil-cpp-binary.git",
"1.2024011601.1" ..< "1.2024011700.0"
return .package(
url: "https://github.com/google/abseil-cpp-binary.git",
branch: "ncooke3-patch-2"
)
}

return .package(url: packageInfo.url, packageInfo.range)
}

func grpcDependency() -> Package.Dependency {
Expand All @@ -1374,11 +1365,11 @@ func grpcDependency() -> Package.Dependency {
// as the headers in the binary version of abseil are unusable.
if ProcessInfo.processInfo.environment["FIREBASE_SOURCE_FIRESTORE"] != nil {
packageInfo = ("https://github.com/grpc/grpc-ios.git", "1.65.0" ..< "1.66.0")
return .package(url: packageInfo.url, packageInfo.range)
} else {
packageInfo = ("https://github.com/google/grpc-binary.git", "1.62.2" ..< "1.63.0")
// packageInfo = ("https://github.com/google/grpc-binary.git", "1.62.2" ..< "1.63.0")
return .package(url: "https://github.com/google/grpc-binary.git", branch: "ncooke3-patch-2")
}

return .package(url: packageInfo.url, packageInfo.range)
}

func firestoreWrapperTarget() -> Target {
Expand Down Expand Up @@ -1513,8 +1504,8 @@ func firestoreTargets() -> [Target] {
} else {
return .binaryTarget(
name: "FirebaseFirestoreInternal",
url: "https://dl.google.com/firebase/ios/bin/firestore/10.27.0/rc0/FirebaseFirestoreInternal.zip",
checksum: "38f6d1bb13fabca97f53c0ef5bf283b2fbbbf460eac8fa875cd3faab597097b8"
url: "https://dl.google.com/firebase/ios/bin/firestore/11.0.0/pre_rc0/FirebaseFirestoreInternal.zip",
checksum: "8d8acb255491852589f40e8a7ed67e9de2f3e43e3ff81ecdae0474b1141e97f6"
)
}
}()
Expand Down
35 changes: 0 additions & 35 deletions SwiftPMTests/analytics-import-test/analytics-import.swift

This file was deleted.

23 changes: 0 additions & 23 deletions SwiftPMTests/analytics-import-test/firebase-import.swift

This file was deleted.

80 changes: 0 additions & 80 deletions SwiftPMTests/swift-test/all-imports.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,83 +46,3 @@ import GoogleUtilities_NSData
import GoogleUtilities_Reachability
import GoogleUtilities_UserDefaults
import nanopb

import XCTest

@available(iOSApplicationExtension, unavailable)
@available(tvOSApplicationExtension, unavailable)
class importTest: XCTestCase {
func testImports() throws {
XCTAssertFalse(GULAppEnvironmentUtil.isAppStoreReceiptSandbox())
XCTAssertFalse(GULAppEnvironmentUtil.isFromAppStore())
#if targetEnvironment(simulator)
XCTAssertTrue(GULAppEnvironmentUtil.isSimulator())
#else
XCTAssertFalse(GULAppEnvironmentUtil.isSimulator())
#endif
XCTAssertFalse(GULAppEnvironmentUtil.isAppExtension())
XCTAssertNil(FirebaseApp.app())
#if os(macOS) || targetEnvironment(macCatalyst)
// Device model should now return the appropriate hardware model on macOS.
XCTAssertNotEqual(GULAppEnvironmentUtil.deviceModel(), "x86_64")
#else
// Device model should show up as x86_64 for iOS, tvOS, and watchOS
// simulators.
let model = GULAppEnvironmentUtil.deviceModel()
XCTAssertTrue(model == "x86_64" || model == "arm64")
#endif

let versionParts = FirebaseVersion().split(separator: ".")
XCTAssert(versionParts.count == 3)
XCTAssertNotNil(Int(versionParts[0]))
XCTAssertNotNil(Int(versionParts[1]))

print("System version? Answer: \(GULAppEnvironmentUtil.systemVersion())")
}

#if (os(iOS) || os(tvOS)) && !targetEnvironment(macCatalyst)
func testSwiftUI() {
if #available(iOS 13, tvOS 13, *) {
_ = ImageOnlyInAppMessageDisplayViewModifier { _, _ in
EmptyView()
}

_ = BannerInAppMessageDisplayViewModifier { _, _ in
EmptyView()
}

_ = CardInAppMessageDisplayViewModifier { _, _ in
EmptyView()
}

_ = ModalInAppMessageDisplayViewModifier { _, _ in
EmptyView()
}

XCTAssertNotNil(
EmptyView().imageOnlyInAppMessage { _, _ in
EmptyView()
}
)

XCTAssertNotNil(
EmptyView().bannerInAppMessage { _, _ in
EmptyView()
}
)

XCTAssertNotNil(
EmptyView().cardInAppMessage { _, _ in
EmptyView()
}
)

XCTAssertNotNil(
EmptyView().modalInAppMessage { _, _ in
EmptyView()
}
)
}
}
#endif
}
52 changes: 0 additions & 52 deletions scripts/spm_test_schemes/analytics-import-test.xcscheme

This file was deleted.

Loading