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] Test new main branch #12182

Merged
merged 4 commits into from
Dec 15, 2023
Merged
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
4 changes: 2 additions & 2 deletions Carthage.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseStorageBinary.jso

- For Crashlytics, do the following steps to automatically upload your app's symbols so your app's crashes are symbolicated:
- Download
[upload-symbols](https://github.com/firebase/firebase-ios-sdk/raw/master/Crashlytics/upload-symbols)
and [run](https://github.com/firebase/firebase-ios-sdk/raw/master/Crashlytics/run).
[upload-symbols](https://github.com/firebase/firebase-ios-sdk/raw/main/Crashlytics/upload-symbols)
and [run](https://github.com/firebase/firebase-ios-sdk/raw/main/Crashlytics/run).
Note: please see the [discussion](https://github.com/firebase/firebase-ios-sdk/issues/4720#issuecomment-577213858)
for details why it has to be done manually.
- Put these in the directory where your `.xcodeproj` file lives, eg. `scripts/run` and `scripts/upload-symbols`
Expand Down
8 changes: 4 additions & 4 deletions FirebaseAppDistributionInternal/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
This library currently contains upcoming changes, and isn't meant to be used in production.

It exists in `master` for CI purposes.
It exists in `main` for CI purposes.

## Steps to copy over changes in FirebaseAppDistributionInternal to master
## Steps to copy over changes in FirebaseAppDistributionInternal to main

For CI builds, this pod needs to be in master. To copy over changes, do the following:
For CI builds, this pod needs to be in main. To copy over changes, do the following:

1. `git checkout -b fad/appdistributioninternal`
1. `git checkout fad/in-app-feedback FirebaseAppDistributionInternal/`

Then open a PR to merge these changes to master. This won't affect the public version of `FirebaseAppDistribution`.
Then open a PR to merge these changes to main. This won't affect the public version of `FirebaseAppDistribution`.
24 changes: 12 additions & 12 deletions Firestore/core/test/unit/FSTGoogleTestTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,11 @@ Class CreateXCTestCaseClass(const testing::TestCase* testCase,
[allTestsSuite
addTest:[XCTestSuite testSuiteForTestCaseClass:[GoogleTests class]]];

const testing::UnitTest* master = testing::UnitTest::GetInstance();
const testing::UnitTest* main = testing::UnitTest::GetInstance();

int testCases = master->total_test_case_count();
int testCases = main->total_test_case_count();
for (int i = 0; i < testCases; i++) {
const testing::TestCase* testCase = master->GetTestCase(i);
const testing::TestCase* testCase = main->GetTestCase(i);
NSString* testCaseName = ClassNameForTestCase(testCase);
Class testClass = objc_getClass([testCaseName UTF8String]);
[allTestsSuite addTest:[XCTestSuite testSuiteForTestCaseClass:testClass]];
Expand All @@ -351,19 +351,19 @@ Class CreateXCTestCaseClass(const testing::TestCase* testCase,
* current test invocation.
*/
void CreateGoogleTestTests() {
NSString* masterTestCaseName = NSStringFromClass([GoogleTests class]);
NSString* mainTestCaseName = NSStringFromClass([GoogleTests class]);

// Initialize GoogleTest but don't run the tests yet.
int argc = 1;
const char* argv[] = {[masterTestCaseName UTF8String]};
const char* argv[] = {[mainTestCaseName UTF8String]};
testing::InitGoogleTest(&argc, const_cast<char**>(argv));

// Convert XCTest's testToRun set to the equivalent --gtest_filter flag.
//
// Note that we only set forceAllTests to true if the user specifically
// focused on GoogleTests. This prevents XCTest double-counting test cases
// (and failures) when a user asks for all tests.
NSSet<NSString*>* allTests = [NSSet setWithObject:masterTestCaseName];
NSSet<NSString*>* allTests = [NSSet setWithObject:mainTestCaseName];
NSSet<NSString*>* testsToRun = LoadXCTestConfigurationTestsToRun();
if (testsToRun) {
if ([allTests isEqual:testsToRun]) {
Expand All @@ -379,13 +379,13 @@ void CreateGoogleTestTests() {
}

// Create XCTestCases and populate the testInfosByKey map
const testing::UnitTest* master = testing::UnitTest::GetInstance();
const testing::UnitTest* main = testing::UnitTest::GetInstance();
NSMutableDictionary<NSString*, NSValue*>* infoMap =
[NSMutableDictionary dictionaryWithCapacity:master->total_test_count()];
[NSMutableDictionary dictionaryWithCapacity:main->total_test_count()];

int testCases = master->total_test_case_count();
int testCases = main->total_test_case_count();
for (int i = 0; i < testCases; i++) {
const testing::TestCase* testCase = master->GetTestCase(i);
const testing::TestCase* testCase = main->GetTestCase(i);
CreateXCTestCaseClass(testCase, infoMap);
}
testInfosByKey = infoMap;
Expand Down Expand Up @@ -425,8 +425,8 @@ + (XCTestSuite*)defaultTestSuite {
- (void)testGoogleTestsActuallyRun {
// This whole mechanism is sufficiently tricky that we should verify that the
// build actually plumbed this together correctly.
const testing::UnitTest* master = testing::UnitTest::GetInstance();
XCTAssertGreaterThan(master->total_test_case_count(), 0);
const testing::UnitTest* main = testing::UnitTest::GetInstance();
XCTAssertGreaterThan(main->total_test_case_count(), 0);
}

@end
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ source snapshot or unreleased branch, use Podfile directives like the following:

To access FirebaseFirestore via a branch:
```ruby
pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'main'
pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'main'
```

To access FirebaseMessaging via a checked-out version of the firebase-ios-sdk repo:
Expand Down
6 changes: 3 additions & 3 deletions docs/ContinuousIntegration.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Build and run Firebase-wide tests with Swift Package Manager.
### Zip Distribution Testing
[zip.yml](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/workflows/zip.yml)

Builds the zip distribution both from the tip of `master` and the current staged release distribution.
Builds the zip distribution both from the tip of `main` and the current staged release distribution.
The resulting distribution is then used to build and test several Firebase
[QuickStarts](https://github.com/firebase/quickstart-ios).

Expand All @@ -81,7 +81,7 @@ will have tags `Cocoapods-X.Y.Z`. This is to mimic a real released candidate.
#### Prerelease workflow
[prerelease.yml](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/workflows/prerelease.yml)

The prerelease workflow is to test podspecs on the `master` branch, and create a testing repo. This is
The prerelease workflow is to test podspecs on the `main` branch, and create a testing repo. This is
to make sure podspecs are releasable, which means podspecs in the head can pass all tests and build
up a candidate.

Expand All @@ -100,7 +100,7 @@ in the SDK repo. A job to run `pod spec lint` is added to SDK testing workflows,
Analytics, Auth, Core, Crashlytics, Database, DynamicLinks, Firestore, Functions, GoogleUtilities,
InAppMessaging, Installations, Messaging, MLModelDownloader, Performance, RemoteConfig and Storage.
These jobs will be triggered in presubmit and run pod spec lint with a source of
Firebase/SpecsTesting repo, which is updated to the head of master nightly in the prerelease
Firebase/SpecsTesting repo, which is updated to the head of main nightly in the prerelease
workflow.

When these PRs are merged, then changed podspecs will be pod repo push to the Firebase/SpecsTesting
Expand Down
Loading