From 82622c5d1a75375ed0cec50ce46e7139cee7b241 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 8 Oct 2020 11:10:25 -0700 Subject: [PATCH 01/30] fix --- packages/share/CHANGELOG.md | 4 ++ .../ios/share_exampleUITests/Info.plist | 22 ++++++++++ packages/share/example/lib/main.dart | 13 ++++++ packages/share/ios/Classes/FLTSharePlugin.m | 4 +- .../ios/UITests/FLTShareExampleUITests.m | 42 +++++++++++++++++++ packages/share/pubspec.yaml | 2 +- 6 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 packages/share/example/ios/share_exampleUITests/Info.plist create mode 100644 packages/share/ios/UITests/FLTShareExampleUITests.m diff --git a/packages/share/CHANGELOG.md b/packages/share/CHANGELOG.md index f13e819b8b74..4c9d364066f7 100644 --- a/packages/share/CHANGELOG.md +++ b/packages/share/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.5+3 + +* Fix iPad share window not showing when `origin` is null. + ## 0.6.5+2 * Keep handling deprecated Android v1 classes for backward compatibility. diff --git a/packages/share/example/ios/share_exampleUITests/Info.plist b/packages/share/example/ios/share_exampleUITests/Info.plist new file mode 100644 index 000000000000..64d65ca49577 --- /dev/null +++ b/packages/share/example/ios/share_exampleUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/packages/share/example/lib/main.dart b/packages/share/example/lib/main.dart index d6f1a1622b3c..7ebce3ce5591 100644 --- a/packages/share/example/lib/main.dart +++ b/packages/share/example/lib/main.dart @@ -86,6 +86,15 @@ class DemoAppState extends State { ); }, ), + const Padding(padding: EdgeInsets.only(top: 12.0)), + Builder( + builder: (BuildContext context) { + return RaisedButton( + child: const Text('Share With Empty Origin'), + onPressed: () => _onShareWithEmptyOrigin(context), + ); + }, + ), ], ), ), @@ -120,4 +129,8 @@ class DemoAppState extends State { sharePositionOrigin: box.localToGlobal(Offset.zero) & box.size); } } + + _onShareWithEmptyOrigin(BuildContext context) async { + await Share.share("text"); + } } diff --git a/packages/share/ios/Classes/FLTSharePlugin.m b/packages/share/ios/Classes/FLTSharePlugin.m index 837623a0119a..571f00bbb165 100644 --- a/packages/share/ios/Classes/FLTSharePlugin.m +++ b/packages/share/ios/Classes/FLTSharePlugin.m @@ -168,9 +168,7 @@ + (void)share:(NSArray *)shareItems UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:shareItems applicationActivities:nil]; activityViewController.popoverPresentationController.sourceView = controller.view; - if (!CGRectIsEmpty(origin)) { - activityViewController.popoverPresentationController.sourceRect = origin; - } + activityViewController.popoverPresentationController.sourceRect = origin; [controller presentViewController:activityViewController animated:YES completion:nil]; } diff --git a/packages/share/ios/UITests/FLTShareExampleUITests.m b/packages/share/ios/UITests/FLTShareExampleUITests.m new file mode 100644 index 000000000000..e84b86eafc1b --- /dev/null +++ b/packages/share/ios/UITests/FLTShareExampleUITests.m @@ -0,0 +1,42 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +@interface FLTShareExampleUITests : XCTestCase + +@end + +@implementation FLTShareExampleUITests + +- (void)setUp { + self.continueAfterFailure = NO; +} + + +- (void)testShareWithEmptyOrigin { + XCUIApplication *app = [[XCUIApplication alloc] init]; + [app launch]; + + XCUIElement* shareWithEmptyOriginButton = + [app.buttons elementMatchingPredicate:[NSPredicate predicateWithFormat:@"label == %@", @"Share With Empty Origin"]]; + if (![shareWithEmptyOriginButton waitForExistenceWithTimeout:30]) { + NSLog(@"%@", app.debugDescription); + XCTFail(@"Failed due to not able to find shareWithEmptyOriginButton with %@ seconds", @(30)); + } + + XCTAssertNotNil(shareWithEmptyOriginButton); + [shareWithEmptyOriginButton tap]; + + // Find the copy button indicates the share sheet is up + XCUIElement* copyButtonOnShareSheet = + [app.cells elementMatchingPredicate:[NSPredicate predicateWithFormat:@"label == %@", @"Copy"]]; + if (![copyButtonOnShareSheet waitForExistenceWithTimeout:30]) { + NSLog(@"%@", app.debugDescription); + XCTFail(@"Failed due to not able to find copyButtonOnShareSheet with %@ seconds", @(30)); + } + XCTAssertNotNil(copyButtonOnShareSheet); +} + +@end diff --git a/packages/share/pubspec.yaml b/packages/share/pubspec.yaml index dc55ed765453..5a659019bda4 100644 --- a/packages/share/pubspec.yaml +++ b/packages/share/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/share # 0.6.y+z is compatible with 1.0.0, if you land a breaking change bump # the version to 2.0.0. # See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0 -version: 0.6.5+2 +version: 0.6.5+3 flutter: plugin: From a9c4a0dc42442732c211394e65c2e8bc2c626267 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 8 Oct 2020 11:22:43 -0700 Subject: [PATCH 02/30] tests --- packages/share/ios/UITests/FLTShareExampleUITests.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/share/ios/UITests/FLTShareExampleUITests.m b/packages/share/ios/UITests/FLTShareExampleUITests.m index e84b86eafc1b..0aee5525dce9 100644 --- a/packages/share/ios/UITests/FLTShareExampleUITests.m +++ b/packages/share/ios/UITests/FLTShareExampleUITests.m @@ -29,14 +29,14 @@ - (void)testShareWithEmptyOrigin { XCTAssertNotNil(shareWithEmptyOriginButton); [shareWithEmptyOriginButton tap]; - // Find the copy button indicates the share sheet is up - XCUIElement* copyButtonOnShareSheet = - [app.cells elementMatchingPredicate:[NSPredicate predicateWithFormat:@"label == %@", @"Copy"]]; - if (![copyButtonOnShareSheet waitForExistenceWithTimeout:30]) { + // Find the share popup. + XCUIElement* activityListView = + [app.otherElements elementMatchingPredicate:[NSPredicate predicateWithFormat:@"identifier == %@", @"ActivityListView"]]; + if (![activityListView waitForExistenceWithTimeout:30]) { NSLog(@"%@", app.debugDescription); - XCTFail(@"Failed due to not able to find copyButtonOnShareSheet with %@ seconds", @(30)); + XCTFail(@"Failed due to not able to find activityListView with %@ seconds", @(30)); } - XCTAssertNotNil(copyButtonOnShareSheet); + XCTAssertNotNil(activityListView); } @end From 1184e36bef8acfc19498e5490f8e73da4e1af693 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 8 Oct 2020 13:00:22 -0700 Subject: [PATCH 03/30] podspec for uitests --- packages/share/ios/share.podspec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/share/ios/share.podspec b/packages/share/ios/share.podspec index 73d6030c68cb..4fd35cc2d365 100644 --- a/packages/share/ios/share.podspec +++ b/packages/share/ios/share.podspec @@ -20,5 +20,11 @@ Downloaded by pub (not CocoaPods). s.platform = :ios, '8.0' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } + + s.test_spec 'UITests' do |test_spec| + test_spec.source_files = 'UITests/**/*' + test_spec.test_type = :ui + test_spec.requires_app_host = true + end end From c5858a9703d8535e1c36f41b49c8938f686ad4b3 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 8 Oct 2020 13:06:32 -0700 Subject: [PATCH 04/30] fix --- packages/share/ios/Classes/FLTSharePlugin.m | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/share/ios/Classes/FLTSharePlugin.m b/packages/share/ios/Classes/FLTSharePlugin.m index 571f00bbb165..72027996c9dc 100644 --- a/packages/share/ios/Classes/FLTSharePlugin.m +++ b/packages/share/ios/Classes/FLTSharePlugin.m @@ -168,7 +168,17 @@ + (void)share:(NSArray *)shareItems UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:shareItems applicationActivities:nil]; activityViewController.popoverPresentationController.sourceView = controller.view; - activityViewController.popoverPresentationController.sourceRect = origin; + if (!CGRectIsEmpty(origin)) { + activityViewController.popoverPresentationController.sourceRect = origin; + } else { + // Explicitly set the sourceRect to their default values based on iOS version. + // This is to fix a bug on iPad: https://github.com/flutter/flutter/issues/66485 + if (@available(iOS 13.2, *)) { + activityViewController.popoverPresentationController.sourceRect = CGRectNull; + } else { + activityViewController.popoverPresentationController.sourceRect = CGRectZero; + } + } [controller presentViewController:activityViewController animated:YES completion:nil]; } From 8b5cc16fb4626b9759e5d5544fb250a375276284 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 8 Oct 2020 13:11:19 -0700 Subject: [PATCH 05/30] revert last --- packages/share/ios/Classes/FLTSharePlugin.m | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/share/ios/Classes/FLTSharePlugin.m b/packages/share/ios/Classes/FLTSharePlugin.m index 72027996c9dc..024ede9cb2f3 100644 --- a/packages/share/ios/Classes/FLTSharePlugin.m +++ b/packages/share/ios/Classes/FLTSharePlugin.m @@ -168,17 +168,8 @@ + (void)share:(NSArray *)shareItems UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:shareItems applicationActivities:nil]; activityViewController.popoverPresentationController.sourceView = controller.view; - if (!CGRectIsEmpty(origin)) { - activityViewController.popoverPresentationController.sourceRect = origin; - } else { - // Explicitly set the sourceRect to their default values based on iOS version. - // This is to fix a bug on iPad: https://github.com/flutter/flutter/issues/66485 - if (@available(iOS 13.2, *)) { - activityViewController.popoverPresentationController.sourceRect = CGRectNull; - } else { - activityViewController.popoverPresentationController.sourceRect = CGRectZero; - } - } + activityViewController.popoverPresentationController.sourceRect = origin; + [controller presentViewController:activityViewController animated:YES completion:nil]; } From 0f1017e2a7113a66a5b67b6ca8cc4c4310080bdb Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 8 Oct 2020 13:43:14 -0700 Subject: [PATCH 06/30] foprmat --- .../ios/UITests/FLTShareExampleUITests.m | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/packages/share/ios/UITests/FLTShareExampleUITests.m b/packages/share/ios/UITests/FLTShareExampleUITests.m index 0aee5525dce9..8c6f73ade116 100644 --- a/packages/share/ios/UITests/FLTShareExampleUITests.m +++ b/packages/share/ios/UITests/FLTShareExampleUITests.m @@ -11,32 +11,33 @@ @interface FLTShareExampleUITests : XCTestCase @implementation FLTShareExampleUITests - (void)setUp { - self.continueAfterFailure = NO; + self.continueAfterFailure = NO; } - - (void)testShareWithEmptyOrigin { - XCUIApplication *app = [[XCUIApplication alloc] init]; - [app launch]; - - XCUIElement* shareWithEmptyOriginButton = - [app.buttons elementMatchingPredicate:[NSPredicate predicateWithFormat:@"label == %@", @"Share With Empty Origin"]]; - if (![shareWithEmptyOriginButton waitForExistenceWithTimeout:30]) { - NSLog(@"%@", app.debugDescription); - XCTFail(@"Failed due to not able to find shareWithEmptyOriginButton with %@ seconds", @(30)); - } - - XCTAssertNotNil(shareWithEmptyOriginButton); - [shareWithEmptyOriginButton tap]; - - // Find the share popup. - XCUIElement* activityListView = - [app.otherElements elementMatchingPredicate:[NSPredicate predicateWithFormat:@"identifier == %@", @"ActivityListView"]]; - if (![activityListView waitForExistenceWithTimeout:30]) { - NSLog(@"%@", app.debugDescription); - XCTFail(@"Failed due to not able to find activityListView with %@ seconds", @(30)); - } - XCTAssertNotNil(activityListView); + XCUIApplication* app = [[XCUIApplication alloc] init]; + [app launch]; + + XCUIElement* shareWithEmptyOriginButton = [app.buttons + elementMatchingPredicate:[NSPredicate + predicateWithFormat:@"label == %@", @"Share With Empty Origin"]]; + if (![shareWithEmptyOriginButton waitForExistenceWithTimeout:30]) { + NSLog(@"%@", app.debugDescription); + XCTFail(@"Failed due to not able to find shareWithEmptyOriginButton with %@ seconds", @(30)); + } + + XCTAssertNotNil(shareWithEmptyOriginButton); + [shareWithEmptyOriginButton tap]; + + // Find the share popup. + XCUIElement* activityListView = [app.otherElements + elementMatchingPredicate:[NSPredicate + predicateWithFormat:@"identifier == %@", @"ActivityListView"]]; + if (![activityListView waitForExistenceWithTimeout:30]) { + NSLog(@"%@", app.debugDescription); + XCTFail(@"Failed due to not able to find activityListView with %@ seconds", @(30)); + } + XCTAssertNotNil(activityListView); } @end From c69ba2a1aee28598f1fc18f114f0dc1b6b108fcf Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 15 Oct 2020 13:46:37 -0700 Subject: [PATCH 07/30] add uitest scheme --- .../xcshareddata/xcschemes/Runner.xcscheme | 87 ------------------- .../RunnerUITests/FLTShareExampleUITests.m | 43 +++++++++ .../example/ios/RunnerUITests/Info.plist | 22 +++++ 3 files changed, 65 insertions(+), 87 deletions(-) delete mode 100644 packages/share/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m create mode 100644 packages/share/example/ios/RunnerUITests/Info.plist diff --git a/packages/share/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/share/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 3bb3697ef41c..000000000000 --- a/packages/share/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m b/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m new file mode 100644 index 000000000000..8c6f73ade116 --- /dev/null +++ b/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m @@ -0,0 +1,43 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +@interface FLTShareExampleUITests : XCTestCase + +@end + +@implementation FLTShareExampleUITests + +- (void)setUp { + self.continueAfterFailure = NO; +} + +- (void)testShareWithEmptyOrigin { + XCUIApplication* app = [[XCUIApplication alloc] init]; + [app launch]; + + XCUIElement* shareWithEmptyOriginButton = [app.buttons + elementMatchingPredicate:[NSPredicate + predicateWithFormat:@"label == %@", @"Share With Empty Origin"]]; + if (![shareWithEmptyOriginButton waitForExistenceWithTimeout:30]) { + NSLog(@"%@", app.debugDescription); + XCTFail(@"Failed due to not able to find shareWithEmptyOriginButton with %@ seconds", @(30)); + } + + XCTAssertNotNil(shareWithEmptyOriginButton); + [shareWithEmptyOriginButton tap]; + + // Find the share popup. + XCUIElement* activityListView = [app.otherElements + elementMatchingPredicate:[NSPredicate + predicateWithFormat:@"identifier == %@", @"ActivityListView"]]; + if (![activityListView waitForExistenceWithTimeout:30]) { + NSLog(@"%@", app.debugDescription); + XCTFail(@"Failed due to not able to find activityListView with %@ seconds", @(30)); + } + XCTAssertNotNil(activityListView); +} + +@end diff --git a/packages/share/example/ios/RunnerUITests/Info.plist b/packages/share/example/ios/RunnerUITests/Info.plist new file mode 100644 index 000000000000..64d65ca49577 --- /dev/null +++ b/packages/share/example/ios/RunnerUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + From 3056a465024c4c33b23ec0354d8e08535a65666d Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 15 Oct 2020 13:46:55 -0700 Subject: [PATCH 08/30] add scheme --- .../ios/Runner.xcodeproj/project.pbxproj | 153 ++++++++++++++++-- 1 file changed, 138 insertions(+), 15 deletions(-) diff --git a/packages/share/example/ios/Runner.xcodeproj/project.pbxproj b/packages/share/example/ios/Runner.xcodeproj/project.pbxproj index 730c0d437d27..bdf81926be52 100644 --- a/packages/share/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/share/example/ios/Runner.xcodeproj/project.pbxproj @@ -10,10 +10,7 @@ 28918A213BCB94C5470742D8 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 85392794417D70A970945C83 /* libPods-Runner.a */; }; 2D9222511EC45DE6007564B0 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D9222501EC45DE6007564B0 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 683426AE2538D314009B194C /* FLTShareExampleUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 683426AD2538D314009B194C /* FLTShareExampleUITests.m */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -21,6 +18,16 @@ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 683426B02538D314009B194C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 9705A1C41CF9048500538489 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -28,8 +35,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -42,14 +47,15 @@ 2D92224F1EC45DE6007564B0 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 2D9222501EC45DE6007564B0 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; + 683426AB2538D314009B194C /* RunnerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 683426AD2538D314009B194C /* FLTShareExampleUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FLTShareExampleUITests.m; sourceTree = ""; }; + 683426AF2538D314009B194C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 85392794417D70A970945C83 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; @@ -59,12 +65,17 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 683426A82538D314009B194C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 28918A213BCB94C5470742D8 /* libPods-Runner.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -81,6 +92,15 @@ name = Pods; sourceTree = ""; }; + 683426AC2538D314009B194C /* RunnerUITests */ = { + isa = PBXGroup; + children = ( + 683426AD2538D314009B194C /* FLTShareExampleUITests.m */, + 683426AF2538D314009B194C /* Info.plist */, + ); + path = RunnerUITests; + sourceTree = ""; + }; 8CA31EF57239BF20619316D9 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -92,9 +112,7 @@ 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 3B80C3931E831B6300D905FE /* App.framework */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEBA1CF902C7004384FC /* Flutter.framework */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */, @@ -107,6 +125,7 @@ children = ( 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, + 683426AC2538D314009B194C /* RunnerUITests */, 97C146EF1CF9000F007C117D /* Products */, 16DDF472245BCC3E62219493 /* Pods */, 8CA31EF57239BF20619316D9 /* Frameworks */, @@ -117,6 +136,7 @@ isa = PBXGroup; children = ( 97C146EE1CF9000F007C117D /* Runner.app */, + 683426AB2538D314009B194C /* RunnerUITests.xctest */, ); name = Products; sourceTree = ""; @@ -148,6 +168,24 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 683426AA2538D314009B194C /* RunnerUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 683426B42538D314009B194C /* Build configuration list for PBXNativeTarget "RunnerUITests" */; + buildPhases = ( + 683426A72538D314009B194C /* Sources */, + 683426A82538D314009B194C /* Frameworks */, + 683426A92538D314009B194C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 683426B12538D314009B194C /* PBXTargetDependency */, + ); + name = RunnerUITests; + productName = RunnerUITests; + productReference = 683426AB2538D314009B194C /* RunnerUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; 97C146ED1CF9000F007C117D /* Runner */ = { isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; @@ -179,6 +217,12 @@ LastUpgradeCheck = 1100; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { + 683426AA2538D314009B194C = { + CreatedOnToolsVersion = 11.7; + DevelopmentTeam = S8QB4VV633; + ProvisioningStyle = Automatic; + TestTargetID = 97C146ED1CF9000F007C117D; + }; 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; }; @@ -198,11 +242,19 @@ projectRoot = ""; targets = ( 97C146ED1CF9000F007C117D /* Runner */, + 683426AA2538D314009B194C /* RunnerUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 683426A92538D314009B194C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EC1CF9000F007C117D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -223,9 +275,12 @@ files = ( ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${PODS_ROOT}/../Flutter/Flutter.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -244,7 +299,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; 5F8AC0B5B699C537B657C107 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; @@ -281,6 +336,14 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 683426A72538D314009B194C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 683426AE2538D314009B194C /* FLTShareExampleUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EA1CF9000F007C117D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -293,6 +356,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 683426B12538D314009B194C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 683426B02538D314009B194C /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 97C146FA1CF9000F007C117D /* Main.storyboard */ = { isa = PBXVariantGroup; @@ -313,9 +384,53 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 683426B22538D314009B194C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = S8QB4VV633; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = RunnerUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.google.RunnerUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Runner; + }; + name = Debug; + }; + 683426B32538D314009B194C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = S8QB4VV633; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = RunnerUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.google.RunnerUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Runner; + }; + name = Release; + }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -372,7 +487,6 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -466,6 +580,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 683426B42538D314009B194C /* Build configuration list for PBXNativeTarget "RunnerUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 683426B22538D314009B194C /* Debug */, + 683426B32538D314009B194C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( From 417c1d9dc721d7d33efbf61325b609aca34a7153 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 21 Oct 2020 12:05:19 -0700 Subject: [PATCH 09/30] remove podspec test --- .../ios/UITests/FLTShareExampleUITests.m | 43 ------------------- packages/share/ios/share.podspec | 8 +--- 2 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 packages/share/ios/UITests/FLTShareExampleUITests.m diff --git a/packages/share/ios/UITests/FLTShareExampleUITests.m b/packages/share/ios/UITests/FLTShareExampleUITests.m deleted file mode 100644 index 8c6f73ade116..000000000000 --- a/packages/share/ios/UITests/FLTShareExampleUITests.m +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import - -@interface FLTShareExampleUITests : XCTestCase - -@end - -@implementation FLTShareExampleUITests - -- (void)setUp { - self.continueAfterFailure = NO; -} - -- (void)testShareWithEmptyOrigin { - XCUIApplication* app = [[XCUIApplication alloc] init]; - [app launch]; - - XCUIElement* shareWithEmptyOriginButton = [app.buttons - elementMatchingPredicate:[NSPredicate - predicateWithFormat:@"label == %@", @"Share With Empty Origin"]]; - if (![shareWithEmptyOriginButton waitForExistenceWithTimeout:30]) { - NSLog(@"%@", app.debugDescription); - XCTFail(@"Failed due to not able to find shareWithEmptyOriginButton with %@ seconds", @(30)); - } - - XCTAssertNotNil(shareWithEmptyOriginButton); - [shareWithEmptyOriginButton tap]; - - // Find the share popup. - XCUIElement* activityListView = [app.otherElements - elementMatchingPredicate:[NSPredicate - predicateWithFormat:@"identifier == %@", @"ActivityListView"]]; - if (![activityListView waitForExistenceWithTimeout:30]) { - NSLog(@"%@", app.debugDescription); - XCTFail(@"Failed due to not able to find activityListView with %@ seconds", @(30)); - } - XCTAssertNotNil(activityListView); -} - -@end diff --git a/packages/share/ios/share.podspec b/packages/share/ios/share.podspec index 4fd35cc2d365..33900faa545b 100644 --- a/packages/share/ios/share.podspec +++ b/packages/share/ios/share.podspec @@ -17,14 +17,8 @@ Downloaded by pub (not CocoaPods). s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' - + s.platform = :ios, '8.0' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } - - s.test_spec 'UITests' do |test_spec| - test_spec.source_files = 'UITests/**/*' - test_spec.test_type = :ui - test_spec.requires_app_host = true - end end From cef7ffec81c2ec248bfad65dabb74376c45ca370 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 09:54:53 -0700 Subject: [PATCH 10/30] update ci --- .cirrus.yml | 329 ++++++++++++++++++++++++++-------------------------- 1 file changed, 165 insertions(+), 164 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 872cfc2316fa..75cdcd843b61 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -38,169 +38,170 @@ task: - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - flutter channel $CHANNEL - ./script/incremental_build.sh test - - name: analyze - script: ./script/incremental_build.sh analyze - - name: build_all_plugins_apk - script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - - ./script/build_all_plugins_app.sh apk - - name: integration_web_smoke_test - # Tests integration example test in web. - only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" - install_script: - - flutter config --enable-web - - git clone https://github.com/flutter/web_installers.git - - cd web_installers/packages/web_drivers/ - - pub get - - dart lib/web_driver_installer.dart chromedriver --install-only - - ./chromedriver/chromedriver --port=4444 & - test_script: - - cd $INTEGRATION_TEST_PATH/example/ - - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome - - name: build-apks+java-test+firebase-test-lab - env: - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - matrix: - CHANNEL: "master" - CHANNEL: "stable" - MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] - script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they - # might include non-ASCII characters which makes Gradle crash. - # See: https://github.com/flutter/flutter/issues/24935 - # This is a temporary workaround until we figure how to properly configure - # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). - # TODO(amirh): Set the locale to UTF8. - - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt - - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt - - export CIRRUS_CHANGE_MESSAGE="" - - export CIRRUS_COMMIT_MESSAGE="" - - ./script/incremental_build.sh build-examples --apk - - ./script/incremental_build.sh java-test # must come after apk build - - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then - - echo "This user does not have permission to run Firebase Test Lab tests." - - else - - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json - - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 - - fi - - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` - - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` + - ./script/incremental_build.sh xctest --target RunnerUITests + # - name: analyze + # script: ./script/incremental_build.sh analyze + # - name: build_all_plugins_apk + # script: + # # TODO(jackson): Allow web plugins once supported on stable + # # https://github.com/flutter/flutter/issues/42864 + # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + # - flutter channel $CHANNEL + # - ./script/build_all_plugins_app.sh apk + # - name: integration_web_smoke_test + # # Tests integration example test in web. + # only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" + # install_script: + # - flutter config --enable-web + # - git clone https://github.com/flutter/web_installers.git + # - cd web_installers/packages/web_drivers/ + # - pub get + # - dart lib/web_driver_installer.dart chromedriver --install-only + # - ./chromedriver/chromedriver --port=4444 & + # test_script: + # - cd $INTEGRATION_TEST_PATH/example/ + # - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome + # - name: build-apks+java-test+firebase-test-lab + # env: + # matrix: + # PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + # PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + # PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + # PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + # matrix: + # CHANNEL: "master" + # CHANNEL: "stable" + # MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + # GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] + # script: + # # TODO(jackson): Allow web plugins once supported on stable + # # https://github.com/flutter/flutter/issues/42864 + # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + # - flutter channel $CHANNEL + # # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they + # # might include non-ASCII characters which makes Gradle crash. + # # See: https://github.com/flutter/flutter/issues/24935 + # # This is a temporary workaround until we figure how to properly configure + # # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). + # # TODO(amirh): Set the locale to UTF8. + # - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt + # - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt + # - export CIRRUS_CHANGE_MESSAGE="" + # - export CIRRUS_COMMIT_MESSAGE="" + # - ./script/incremental_build.sh build-examples --apk + # - ./script/incremental_build.sh java-test # must come after apk build + # - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then + # - echo "This user does not have permission to run Firebase Test Lab tests." + # - else + # - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json + # - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 + # - fi + # - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` + # - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` -task: - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' - container: - dockerfile: .ci/Dockerfile-LinuxDesktop - cpu: 8 - memory: 16G - env: - INTEGRATION_TEST_PATH: "./packages/integration_test" - upgrade_script: - - flutter channel stable - - flutter upgrade - - flutter channel master - - flutter upgrade - - git fetch origin master - activate_script: pub global activate flutter_plugin_tools - matrix: - - name: build-linux+drive-examples - install_script: - - flutter config --enable-linux-desktop - build_script: - # TODO(stuartmorgan): Include stable once Linux is supported on stable. - - flutter channel master - - ./script/incremental_build.sh build-examples --linux - - xvfb-run ./script/incremental_build.sh drive-examples --linux +# task: +# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins +# only_if: $CIRRUS_TAG == '' +# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' +# container: +# dockerfile: .ci/Dockerfile-LinuxDesktop +# cpu: 8 +# memory: 16G +# env: +# INTEGRATION_TEST_PATH: "./packages/integration_test" +# upgrade_script: +# - flutter channel stable +# - flutter upgrade +# - flutter channel master +# - flutter upgrade +# - git fetch origin master +# activate_script: pub global activate flutter_plugin_tools +# matrix: +# - name: build-linux+drive-examples +# install_script: +# - flutter config --enable-linux-desktop +# build_script: +# # TODO(stuartmorgan): Include stable once Linux is supported on stable. +# - flutter channel master +# - ./script/incremental_build.sh build-examples --linux +# - xvfb-run ./script/incremental_build.sh drive-examples --linux -task: - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' - osx_instance: - image: catalina-xcode-11.3.1-flutter - upgrade_script: - - flutter channel stable - - flutter upgrade - - flutter channel master - - flutter upgrade - - git fetch origin master - activate_script: pub global activate flutter_plugin_tools - create_simulator_script: - - xcrun simctl list - - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot - matrix: - - name: build_all_plugins_ipa - script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - - ./script/build_all_plugins_app.sh ios --no-codesign - - name: lint_darwin_plugins - env: - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" - script: - # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. - - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm - # Skip the dummy podspecs used to placate the tool. - - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm - - ./script/incremental_build.sh podspecs - - name: build-ipas+drive-examples - env: - PATH: $PATH:/usr/local/bin - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - matrix: - CHANNEL: "master" - CHANNEL: "stable" - SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - build_script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - - ./script/incremental_build.sh build-examples --ipa - - ./script/incremental_build.sh drive-examples -task: - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' - osx_instance: - image: catalina-xcode-11.3.1-flutter - setup_script: - - flutter config --enable-macos-desktop - upgrade_script: - - flutter channel master - - flutter upgrade - - git fetch origin master - activate_script: pub global activate flutter_plugin_tools - matrix: - - name: build_all_plugins_app - script: - - flutter channel master - - ./script/build_all_plugins_app.sh macos - - name: build-apps+drive-examples - env: - PATH: $PATH:/usr/local/bin - build_script: - - flutter channel master - - ./script/incremental_build.sh build-examples --macos --no-ipa - - ./script/incremental_build.sh drive-examples --macos +# task: +# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins +# only_if: $CIRRUS_TAG == '' +# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' +# osx_instance: +# image: catalina-xcode-11.3.1-flutter +# upgrade_script: +# - flutter channel stable +# - flutter upgrade +# - flutter channel master +# - flutter upgrade +# - git fetch origin master +# activate_script: pub global activate flutter_plugin_tools +# create_simulator_script: +# - xcrun simctl list +# - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot +# matrix: +# - name: build_all_plugins_ipa +# script: +# # TODO(jackson): Allow web plugins once supported on stable +# # https://github.com/flutter/flutter/issues/42864 +# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi +# - flutter channel $CHANNEL +# - ./script/build_all_plugins_app.sh ios --no-codesign +# - name: lint_darwin_plugins +# env: +# matrix: +# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" +# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" +# script: +# # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. +# - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm +# # Skip the dummy podspecs used to placate the tool. +# - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm +# - ./script/incremental_build.sh podspecs +# - name: build-ipas+drive-examples +# env: +# PATH: $PATH:/usr/local/bin +# matrix: +# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" +# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" +# PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" +# PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" +# matrix: +# CHANNEL: "master" +# CHANNEL: "stable" +# SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] +# build_script: +# # TODO(jackson): Allow web plugins once supported on stable +# # https://github.com/flutter/flutter/issues/42864 +# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi +# - flutter channel $CHANNEL +# - ./script/incremental_build.sh build-examples --ipa +# - ./script/incremental_build.sh drive-examples +# task: +# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins +# only_if: $CIRRUS_TAG == '' +# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' +# osx_instance: +# image: catalina-xcode-11.3.1-flutter +# setup_script: +# - flutter config --enable-macos-desktop +# upgrade_script: +# - flutter channel master +# - flutter upgrade +# - git fetch origin master +# activate_script: pub global activate flutter_plugin_tools +# matrix: +# - name: build_all_plugins_app +# script: +# - flutter channel master +# - ./script/build_all_plugins_app.sh macos +# - name: build-apps+drive-examples +# env: +# PATH: $PATH:/usr/local/bin +# build_script: +# - flutter channel master +# - ./script/incremental_build.sh build-examples --macos --no-ipa +# - ./script/incremental_build.sh drive-examples --macos From 6a9e475bd1f6f82b2f3f086651ae6712ef9a314b Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 09:58:02 -0700 Subject: [PATCH 11/30] remove dev team --- packages/share/example/ios/Runner.xcodeproj/project.pbxproj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/share/example/ios/Runner.xcodeproj/project.pbxproj b/packages/share/example/ios/Runner.xcodeproj/project.pbxproj index bdf81926be52..639666b2865c 100644 --- a/packages/share/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/share/example/ios/Runner.xcodeproj/project.pbxproj @@ -219,7 +219,6 @@ TargetAttributes = { 683426AA2538D314009B194C = { CreatedOnToolsVersion = 11.7; - DevelopmentTeam = S8QB4VV633; ProvisioningStyle = Automatic; TestTargetID = 97C146ED1CF9000F007C117D; }; @@ -393,7 +392,7 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = RunnerUITests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; @@ -416,7 +415,7 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = S8QB4VV633; + DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = RunnerUITests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; From 2a52dcee78412702fb348a54155b8f7587fea164 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 09:58:50 -0700 Subject: [PATCH 12/30] clean up --- packages/share/ios/share.podspec | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/share/ios/share.podspec b/packages/share/ios/share.podspec index 33900faa545b..786e1c7fb922 100644 --- a/packages/share/ios/share.podspec +++ b/packages/share/ios/share.podspec @@ -17,7 +17,6 @@ Downloaded by pub (not CocoaPods). s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' - s.platform = :ios, '8.0' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } end From 422d9ed3ac6d250936bf4cc6a25d40554f2d0087 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 10:04:12 -0700 Subject: [PATCH 13/30] remove other tasks --- .cirrus.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 75cdcd843b61..16c258f57636 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -16,17 +16,17 @@ task: - git fetch origin master activate_script: pub global activate flutter_plugin_tools matrix: - - name: publishable - script: - - flutter channel master - - ./script/check_publish.sh - - name: format - install_script: - - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" - - sudo apt-get update - - sudo apt-get install -y --allow-unauthenticated clang-format-7 - format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 + # - name: publishable + # script: + # - flutter channel master + # - ./script/check_publish.sh + # - name: format + # install_script: + # - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + # - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" + # - sudo apt-get update + # - sudo apt-get install -y --allow-unauthenticated clang-format-7 + # format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 - name: test env: matrix: From cac700ea7285780921e716b8de6760345778d7d5 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 10:08:16 -0700 Subject: [PATCH 14/30] cirrus update --- .cirrus.yml | 138 +++++++++++++++++++++++++++------------------------- 1 file changed, 72 insertions(+), 66 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 16c258f57636..cbc1961e2ade 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -27,18 +27,17 @@ task: # - sudo apt-get update # - sudo apt-get install -y --allow-unauthenticated clang-format-7 # format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 - - name: test - env: - matrix: - CHANNEL: "master" - CHANNEL: "stable" - test_script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - - ./script/incremental_build.sh test - - ./script/incremental_build.sh xctest --target RunnerUITests + # - name: test + # env: + # matrix: + # CHANNEL: "master" + # CHANNEL: "stable" + # test_script: + # # TODO(jackson): Allow web plugins once supported on stable + # # https://github.com/flutter/flutter/issues/42864 + # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + # - flutter channel $CHANNEL + # - ./script/incremental_build.sh test # - name: analyze # script: ./script/incremental_build.sh analyze # - name: build_all_plugins_apk @@ -126,60 +125,67 @@ task: # - ./script/incremental_build.sh build-examples --linux # - xvfb-run ./script/incremental_build.sh drive-examples --linux -# task: -# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins -# only_if: $CIRRUS_TAG == '' -# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' -# osx_instance: -# image: catalina-xcode-11.3.1-flutter -# upgrade_script: -# - flutter channel stable -# - flutter upgrade -# - flutter channel master -# - flutter upgrade -# - git fetch origin master -# activate_script: pub global activate flutter_plugin_tools -# create_simulator_script: -# - xcrun simctl list -# - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot -# matrix: -# - name: build_all_plugins_ipa -# script: -# # TODO(jackson): Allow web plugins once supported on stable -# # https://github.com/flutter/flutter/issues/42864 -# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi -# - flutter channel $CHANNEL -# - ./script/build_all_plugins_app.sh ios --no-codesign -# - name: lint_darwin_plugins -# env: -# matrix: -# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" -# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" -# script: -# # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. -# - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm -# # Skip the dummy podspecs used to placate the tool. -# - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm -# - ./script/incremental_build.sh podspecs -# - name: build-ipas+drive-examples -# env: -# PATH: $PATH:/usr/local/bin -# matrix: -# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" -# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" -# PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" -# PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" -# matrix: -# CHANNEL: "master" -# CHANNEL: "stable" -# SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] -# build_script: -# # TODO(jackson): Allow web plugins once supported on stable -# # https://github.com/flutter/flutter/issues/42864 -# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi -# - flutter channel $CHANNEL -# - ./script/incremental_build.sh build-examples --ipa -# - ./script/incremental_build.sh drive-examples +task: + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + osx_instance: + image: catalina-xcode-11.3.1-flutter + upgrade_script: + - flutter channel stable + - flutter upgrade + - flutter channel master + - flutter upgrade + - git fetch origin master + activate_script: pub global activate flutter_plugin_tools + create_simulator_script: + - xcrun simctl list + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot + matrix: + - name: xctests + script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + - ./script/incremental_build.sh xctest --target RunnerUITests + # - name: build_all_plugins_ipa + # script: + # # TODO(jackson): Allow web plugins once supported on stable + # # https://github.com/flutter/flutter/issues/42864 + # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + # - flutter channel $CHANNEL + # - ./script/build_all_plugins_app.sh ios --no-codesign + # - name: lint_darwin_plugins + # env: + # matrix: + # PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" + # PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" + # script: + # # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. + # - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm + # # Skip the dummy podspecs used to placate the tool. + # - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm + # - ./script/incremental_build.sh podspecs + # - name: build-ipas+drive-examples + # env: + # PATH: $PATH:/usr/local/bin + # matrix: + # PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + # PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + # PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + # PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + # matrix: + # CHANNEL: "master" + # CHANNEL: "stable" + # SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + # build_script: + # # TODO(jackson): Allow web plugins once supported on stable + # # https://github.com/flutter/flutter/issues/42864 + # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + # - flutter channel $CHANNEL + # - ./script/incremental_build.sh build-examples --ipa + # - ./script/incremental_build.sh drive-examples # task: # # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins # only_if: $CIRRUS_TAG == '' From 5d1c0024756f80e616d310af8c867fa836b383d6 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 10:08:36 -0700 Subject: [PATCH 15/30] update --- .cirrus.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index cbc1961e2ade..3fc7367f0321 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -146,7 +146,6 @@ task: script: # TODO(jackson): Allow web plugins once supported on stable # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - flutter channel $CHANNEL - ./script/incremental_build.sh xctest --target RunnerUITests # - name: build_all_plugins_ipa From 9a33e6e55100e50a191d1ec29c23791691313c43 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 10:10:11 -0700 Subject: [PATCH 16/30] update --- .cirrus.yml | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 3fc7367f0321..7d27e9c894da 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -142,12 +142,6 @@ task: - xcrun simctl list - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot matrix: - - name: xctests - script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - flutter channel $CHANNEL - - ./script/incremental_build.sh xctest --target RunnerUITests # - name: build_all_plugins_ipa # script: # # TODO(jackson): Allow web plugins once supported on stable @@ -166,25 +160,31 @@ task: # # Skip the dummy podspecs used to placate the tool. # - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm # - ./script/incremental_build.sh podspecs - # - name: build-ipas+drive-examples - # env: - # PATH: $PATH:/usr/local/bin - # matrix: - # PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - # PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - # PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - # PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - # matrix: - # CHANNEL: "master" - # CHANNEL: "stable" - # SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - # build_script: - # # TODO(jackson): Allow web plugins once supported on stable - # # https://github.com/flutter/flutter/issues/42864 - # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - # - flutter channel $CHANNEL - # - ./script/incremental_build.sh build-examples --ipa - # - ./script/incremental_build.sh drive-examples + - name: build-ipas+drive-examples + env: + PATH: $PATH:/usr/local/bin + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + matrix: + CHANNEL: "master" + CHANNEL: "stable" + SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + build_script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + - ./script/incremental_build.sh build-examples --ipa + - ./script/incremental_build.sh drive-examples + - name: xctests + script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - flutter channel $CHANNEL + - ./script/incremental_build.sh xctest --target RunnerUITests # task: # # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins # only_if: $CIRRUS_TAG == '' From 87616211e8d73f5ec539e7011b7273e85bbc5254 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 10:11:58 -0700 Subject: [PATCH 17/30] update --- .cirrus.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 7d27e9c894da..eb55d5489802 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -183,7 +183,6 @@ task: script: # TODO(jackson): Allow web plugins once supported on stable # https://github.com/flutter/flutter/issues/42864 - - flutter channel $CHANNEL - ./script/incremental_build.sh xctest --target RunnerUITests # task: # # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins From 70850c64190bb834ccfb88189ed99492015e3f81 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 10:12:56 -0700 Subject: [PATCH 18/30] fix --- .cirrus.yml | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index eb55d5489802..bf19a014810b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,21 +1,21 @@ -task: - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' - container: - dockerfile: .ci/Dockerfile - cpu: 8 - memory: 16G - env: - INTEGRATION_TEST_PATH: "./packages/integration_test" - upgrade_script: - - flutter channel stable - - flutter upgrade - - flutter channel master - - flutter upgrade - - git fetch origin master - activate_script: pub global activate flutter_plugin_tools - matrix: +# task: +# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins +# only_if: $CIRRUS_TAG == '' +# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' +# container: +# dockerfile: .ci/Dockerfile +# cpu: 8 +# memory: 16G +# env: +# INTEGRATION_TEST_PATH: "./packages/integration_test" +# upgrade_script: +# - flutter channel stable +# - flutter upgrade +# - flutter channel master +# - flutter upgrade +# - git fetch origin master +# activate_script: pub global activate flutter_plugin_tools +# matrix: # - name: publishable # script: # - flutter channel master @@ -181,8 +181,6 @@ task: - ./script/incremental_build.sh drive-examples - name: xctests script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - ./script/incremental_build.sh xctest --target RunnerUITests # task: # # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins From cc1b1136351185659739a0f0c9b39581ab1dcfd4 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 10:17:39 -0700 Subject: [PATCH 19/30] remove other tasks --- .cirrus.yml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index bf19a014810b..b8c3907b3696 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -160,25 +160,25 @@ task: # # Skip the dummy podspecs used to placate the tool. # - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm # - ./script/incremental_build.sh podspecs - - name: build-ipas+drive-examples - env: - PATH: $PATH:/usr/local/bin - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - matrix: - CHANNEL: "master" - CHANNEL: "stable" - SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - build_script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - - ./script/incremental_build.sh build-examples --ipa - - ./script/incremental_build.sh drive-examples + # - name: build-ipas+drive-examples + # env: + # PATH: $PATH:/usr/local/bin + # matrix: + # PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + # PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + # PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + # PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + # matrix: + # CHANNEL: "master" + # CHANNEL: "stable" + # SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + # build_script: + # # TODO(jackson): Allow web plugins once supported on stable + # # https://github.com/flutter/flutter/issues/42864 + # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + # - flutter channel $CHANNEL + # - ./script/incremental_build.sh build-examples --ipa + # - ./script/incremental_build.sh drive-examples - name: xctests script: - ./script/incremental_build.sh xctest --target RunnerUITests From dd5ed1784d70de5e5a8736deed93de03e4ea230f Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 10:20:55 -0700 Subject: [PATCH 20/30] fix --- .cirrus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.yml b/.cirrus.yml index b8c3907b3696..0434f3672788 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -181,6 +181,7 @@ task: # - ./script/incremental_build.sh drive-examples - name: xctests script: + - ./script/incremental_build.sh build-examples --ipa - ./script/incremental_build.sh xctest --target RunnerUITests # task: # # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins From 3346dd2c4839cf0adac557d9b3943da5c4b61694 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 10:35:55 -0700 Subject: [PATCH 21/30] skip --- .cirrus.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 0434f3672788..a5114b31c35c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -180,9 +180,10 @@ task: # - ./script/incremental_build.sh build-examples --ipa # - ./script/incremental_build.sh drive-examples - name: xctests + plugins_to_skip: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter" script: - ./script/incremental_build.sh build-examples --ipa - - ./script/incremental_build.sh xctest --target RunnerUITests + - ./script/incremental_build.sh xctest --target RunnerUITests --skip="{{plugins_to_skip}}" # task: # # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins # only_if: $CIRRUS_TAG == '' From e97548c77b6395be120b6cd457a6808517884dd3 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 22 Oct 2020 10:38:09 -0700 Subject: [PATCH 22/30] skip --- .cirrus.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index a5114b31c35c..6c4b9a882654 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -180,10 +180,11 @@ task: # - ./script/incremental_build.sh build-examples --ipa # - ./script/incremental_build.sh drive-examples - name: xctests - plugins_to_skip: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter" + env: + plugins_to_skip: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter" script: - ./script/incremental_build.sh build-examples --ipa - - ./script/incremental_build.sh xctest --target RunnerUITests --skip="{{plugins_to_skip}}" + - ./script/incremental_build.sh xctest --target RunnerUITests --skip=$plugins_to_skip # task: # # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins # only_if: $CIRRUS_TAG == '' From 19517dede8592761e998c888006053a99f605851 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 26 Oct 2020 09:01:56 -0700 Subject: [PATCH 23/30] enable xctest in .cirrus.yml (#3189) --- .cirrus.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 872cfc2316fa..6a49573f8efc 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -163,6 +163,7 @@ task: - name: build-ipas+drive-examples env: PATH: $PATH:/usr/local/bin + PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter,share" matrix: PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" @@ -179,6 +180,7 @@ task: - flutter channel $CHANNEL - ./script/incremental_build.sh build-examples --ipa - ./script/incremental_build.sh drive-examples + - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS task: # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins only_if: $CIRRUS_TAG == '' From 0f6917285848810b6e1cff3c488fbcdddbc9eb23 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 26 Oct 2020 09:11:59 -0700 Subject: [PATCH 24/30] merge cirrus file --- .cirrus.yml | 376 ++++++++++++++++++++++++++-------------------------- 1 file changed, 186 insertions(+), 190 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 6c4b9a882654..3c051548d686 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,129 +1,129 @@ -# task: -# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins -# only_if: $CIRRUS_TAG == '' -# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' -# container: -# dockerfile: .ci/Dockerfile -# cpu: 8 -# memory: 16G -# env: -# INTEGRATION_TEST_PATH: "./packages/integration_test" -# upgrade_script: -# - flutter channel stable -# - flutter upgrade -# - flutter channel master -# - flutter upgrade -# - git fetch origin master -# activate_script: pub global activate flutter_plugin_tools -# matrix: - # - name: publishable - # script: - # - flutter channel master - # - ./script/check_publish.sh - # - name: format - # install_script: - # - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - # - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" - # - sudo apt-get update - # - sudo apt-get install -y --allow-unauthenticated clang-format-7 - # format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 - # - name: test - # env: - # matrix: - # CHANNEL: "master" - # CHANNEL: "stable" - # test_script: - # # TODO(jackson): Allow web plugins once supported on stable - # # https://github.com/flutter/flutter/issues/42864 - # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - # - flutter channel $CHANNEL - # - ./script/incremental_build.sh test - # - name: analyze - # script: ./script/incremental_build.sh analyze - # - name: build_all_plugins_apk - # script: - # # TODO(jackson): Allow web plugins once supported on stable - # # https://github.com/flutter/flutter/issues/42864 - # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - # - flutter channel $CHANNEL - # - ./script/build_all_plugins_app.sh apk - # - name: integration_web_smoke_test - # # Tests integration example test in web. - # only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" - # install_script: - # - flutter config --enable-web - # - git clone https://github.com/flutter/web_installers.git - # - cd web_installers/packages/web_drivers/ - # - pub get - # - dart lib/web_driver_installer.dart chromedriver --install-only - # - ./chromedriver/chromedriver --port=4444 & - # test_script: - # - cd $INTEGRATION_TEST_PATH/example/ - # - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome - # - name: build-apks+java-test+firebase-test-lab - # env: - # matrix: - # PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - # PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - # PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - # PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - # matrix: - # CHANNEL: "master" - # CHANNEL: "stable" - # MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - # GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] - # script: - # # TODO(jackson): Allow web plugins once supported on stable - # # https://github.com/flutter/flutter/issues/42864 - # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - # - flutter channel $CHANNEL - # # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they - # # might include non-ASCII characters which makes Gradle crash. - # # See: https://github.com/flutter/flutter/issues/24935 - # # This is a temporary workaround until we figure how to properly configure - # # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). - # # TODO(amirh): Set the locale to UTF8. - # - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt - # - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt - # - export CIRRUS_CHANGE_MESSAGE="" - # - export CIRRUS_COMMIT_MESSAGE="" - # - ./script/incremental_build.sh build-examples --apk - # - ./script/incremental_build.sh java-test # must come after apk build - # - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then - # - echo "This user does not have permission to run Firebase Test Lab tests." - # - else - # - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json - # - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 - # - fi - # - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` - # - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` +task: + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' + container: + dockerfile: .ci/Dockerfile + cpu: 8 + memory: 16G + env: + INTEGRATION_TEST_PATH: "./packages/integration_test" + upgrade_script: + - flutter channel stable + - flutter upgrade + - flutter channel master + - flutter upgrade + - git fetch origin master + activate_script: pub global activate flutter_plugin_tools + matrix: + - name: publishable + script: + - flutter channel master + - ./script/check_publish.sh + - name: format + install_script: + - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" + - sudo apt-get update + - sudo apt-get install -y --allow-unauthenticated clang-format-7 + format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 + - name: test + env: + matrix: + CHANNEL: "master" + CHANNEL: "stable" + test_script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + - ./script/incremental_build.sh test + - name: analyze + script: ./script/incremental_build.sh analyze + - name: build_all_plugins_apk + script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + - ./script/build_all_plugins_app.sh apk + - name: integration_web_smoke_test + # Tests integration example test in web. + only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" + install_script: + - flutter config --enable-web + - git clone https://github.com/flutter/web_installers.git + - cd web_installers/packages/web_drivers/ + - pub get + - dart lib/web_driver_installer.dart chromedriver --install-only + - ./chromedriver/chromedriver --port=4444 & + test_script: + - cd $INTEGRATION_TEST_PATH/example/ + - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome + - name: build-apks+java-test+firebase-test-lab + env: + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + matrix: + CHANNEL: "master" + CHANNEL: "stable" + MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] + script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they + # might include non-ASCII characters which makes Gradle crash. + # See: https://github.com/flutter/flutter/issues/24935 + # This is a temporary workaround until we figure how to properly configure + # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). + # TODO(amirh): Set the locale to UTF8. + - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt + - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt + - export CIRRUS_CHANGE_MESSAGE="" + - export CIRRUS_COMMIT_MESSAGE="" + - ./script/incremental_build.sh build-examples --apk + - ./script/incremental_build.sh java-test # must come after apk build + - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then + - echo "This user does not have permission to run Firebase Test Lab tests." + - else + - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json + - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 + - fi + - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` + - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` -# task: -# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins -# only_if: $CIRRUS_TAG == '' -# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' -# container: -# dockerfile: .ci/Dockerfile-LinuxDesktop -# cpu: 8 -# memory: 16G -# env: -# INTEGRATION_TEST_PATH: "./packages/integration_test" -# upgrade_script: -# - flutter channel stable -# - flutter upgrade -# - flutter channel master -# - flutter upgrade -# - git fetch origin master -# activate_script: pub global activate flutter_plugin_tools -# matrix: -# - name: build-linux+drive-examples -# install_script: -# - flutter config --enable-linux-desktop -# build_script: -# # TODO(stuartmorgan): Include stable once Linux is supported on stable. -# - flutter channel master -# - ./script/incremental_build.sh build-examples --linux -# - xvfb-run ./script/incremental_build.sh drive-examples --linux +task: + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' + container: + dockerfile: .ci/Dockerfile-LinuxDesktop + cpu: 8 + memory: 16G + env: + INTEGRATION_TEST_PATH: "./packages/integration_test" + upgrade_script: + - flutter channel stable + - flutter upgrade + - flutter channel master + - flutter upgrade + - git fetch origin master + activate_script: pub global activate flutter_plugin_tools + matrix: + - name: build-linux+drive-examples + install_script: + - flutter config --enable-linux-desktop + build_script: + # TODO(stuartmorgan): Include stable once Linux is supported on stable. + - flutter channel master + - ./script/incremental_build.sh build-examples --linux + - xvfb-run ./script/incremental_build.sh drive-examples --linux task: # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins @@ -142,71 +142,67 @@ task: - xcrun simctl list - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot matrix: - # - name: build_all_plugins_ipa - # script: - # # TODO(jackson): Allow web plugins once supported on stable - # # https://github.com/flutter/flutter/issues/42864 - # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - # - flutter channel $CHANNEL - # - ./script/build_all_plugins_app.sh ios --no-codesign - # - name: lint_darwin_plugins - # env: - # matrix: - # PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" - # PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" - # script: - # # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. - # - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm - # # Skip the dummy podspecs used to placate the tool. - # - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm - # - ./script/incremental_build.sh podspecs - # - name: build-ipas+drive-examples - # env: - # PATH: $PATH:/usr/local/bin - # matrix: - # PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - # PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - # PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - # PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - # matrix: - # CHANNEL: "master" - # CHANNEL: "stable" - # SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - # build_script: - # # TODO(jackson): Allow web plugins once supported on stable - # # https://github.com/flutter/flutter/issues/42864 - # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - # - flutter channel $CHANNEL - # - ./script/incremental_build.sh build-examples --ipa - # - ./script/incremental_build.sh drive-examples - - name: xctests + - name: build_all_plugins_ipa + script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + - ./script/build_all_plugins_app.sh ios --no-codesign + - name: lint_darwin_plugins env: - plugins_to_skip: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter" + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" script: + # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. + - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm + # Skip the dummy podspecs used to placate the tool. + - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm + - ./script/incremental_build.sh podspecs + - name: build-ipas+drive-examples + env: + PATH: $PATH:/usr/local/bin + PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter,share" + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + matrix: + CHANNEL: "master" + CHANNEL: "stable" + SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + build_script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL - ./script/incremental_build.sh build-examples --ipa - - ./script/incremental_build.sh xctest --target RunnerUITests --skip=$plugins_to_skip -# task: -# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins -# only_if: $CIRRUS_TAG == '' -# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' -# osx_instance: -# image: catalina-xcode-11.3.1-flutter -# setup_script: -# - flutter config --enable-macos-desktop -# upgrade_script: -# - flutter channel master -# - flutter upgrade -# - git fetch origin master -# activate_script: pub global activate flutter_plugin_tools -# matrix: -# - name: build_all_plugins_app -# script: -# - flutter channel master -# - ./script/build_all_plugins_app.sh macos -# - name: build-apps+drive-examples -# env: -# PATH: $PATH:/usr/local/bin -# build_script: -# - flutter channel master -# - ./script/incremental_build.sh build-examples --macos --no-ipa -# - ./script/incremental_build.sh drive-examples --macos + - ./script/incremental_build.sh drive-examples + - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS +task: + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + osx_instance: + image: catalina-xcode-11.3.1-flutter + setup_script: + - flutter config --enable-macos-desktop + upgrade_script: + - flutter channel master + - flutter upgrade + - git fetch origin master + activate_script: pub global activate flutter_plugin_tools + matrix: + - name: build_all_plugins_app + script: + - flutter channel master + - ./script/build_all_plugins_app.sh macos + - name: build-apps+drive-examples + env: + PATH: $PATH:/usr/local/bin + build_script: + - flutter channel master + - ./script/incremental_build.sh build-examples --macos --no-ipa + - ./script/incremental_build.sh drive-examples --macos \ No newline at end of file From 9b8a67a50b1764da5f388a6ec131df9e03b641d1 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 26 Oct 2020 09:13:44 -0700 Subject: [PATCH 25/30] line EOF --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 3c051548d686..6a49573f8efc 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -205,4 +205,4 @@ task: build_script: - flutter channel master - ./script/incremental_build.sh build-examples --macos --no-ipa - - ./script/incremental_build.sh drive-examples --macos \ No newline at end of file + - ./script/incremental_build.sh drive-examples --macos From 9eea9c6b3a147aa8851a0768784667724f76b2bd Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 26 Oct 2020 09:35:02 -0700 Subject: [PATCH 26/30] un skip share --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 6a49573f8efc..8c632a076522 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -163,7 +163,7 @@ task: - name: build-ipas+drive-examples env: PATH: $PATH:/usr/local/bin - PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter,share" + PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter" matrix: PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" From dba083d1408353a4cc8f90a8314fe3811ad004c6 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 26 Oct 2020 10:29:01 -0700 Subject: [PATCH 27/30] review --- .../RunnerUITests/FLTShareExampleUITests.m | 10 +++++---- .../ios/share_exampleUITests/Info.plist | 22 ------------------- 2 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 packages/share/example/ios/share_exampleUITests/Info.plist diff --git a/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m b/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m index 8c6f73ade116..3803cd3e2d04 100644 --- a/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m +++ b/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m @@ -4,6 +4,8 @@ #import +static const NSInteger kSecondsToWaitWhenFindingElements = 30; + @interface FLTShareExampleUITests : XCTestCase @end @@ -21,9 +23,9 @@ - (void)testShareWithEmptyOrigin { XCUIElement* shareWithEmptyOriginButton = [app.buttons elementMatchingPredicate:[NSPredicate predicateWithFormat:@"label == %@", @"Share With Empty Origin"]]; - if (![shareWithEmptyOriginButton waitForExistenceWithTimeout:30]) { + if (![shareWithEmptyOriginButton waitForExistenceWithTimeout:kSecondsToWaitWhenFindingElements]) { NSLog(@"%@", app.debugDescription); - XCTFail(@"Failed due to not able to find shareWithEmptyOriginButton with %@ seconds", @(30)); + XCTFail(@"Failed due to not able to find shareWithEmptyOriginButton with %@ seconds", @(kSecondsToWaitWhenFindingElements)); } XCTAssertNotNil(shareWithEmptyOriginButton); @@ -33,9 +35,9 @@ - (void)testShareWithEmptyOrigin { XCUIElement* activityListView = [app.otherElements elementMatchingPredicate:[NSPredicate predicateWithFormat:@"identifier == %@", @"ActivityListView"]]; - if (![activityListView waitForExistenceWithTimeout:30]) { + if (![activityListView waitForExistenceWithTimeout:kSecondsToWaitWhenFindingElements]) { NSLog(@"%@", app.debugDescription); - XCTFail(@"Failed due to not able to find activityListView with %@ seconds", @(30)); + XCTFail(@"Failed due to not able to find activityListView with %@ seconds", @(kSecondsToWaitWhenFindingElements)); } XCTAssertNotNil(activityListView); } diff --git a/packages/share/example/ios/share_exampleUITests/Info.plist b/packages/share/example/ios/share_exampleUITests/Info.plist deleted file mode 100644 index 64d65ca49577..000000000000 --- a/packages/share/example/ios/share_exampleUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - From 4c9b8c70936eeb402158c5874bb28b11a2793275 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 26 Oct 2020 11:08:32 -0700 Subject: [PATCH 28/30] update to use os_log --- .../share/example/ios/RunnerUITests/FLTShareExampleUITests.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m b/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m index 3803cd3e2d04..53a93bffe5ae 100644 --- a/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m +++ b/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m @@ -3,6 +3,7 @@ // found in the LICENSE file. #import +#import static const NSInteger kSecondsToWaitWhenFindingElements = 30; @@ -24,7 +25,7 @@ - (void)testShareWithEmptyOrigin { elementMatchingPredicate:[NSPredicate predicateWithFormat:@"label == %@", @"Share With Empty Origin"]]; if (![shareWithEmptyOriginButton waitForExistenceWithTimeout:kSecondsToWaitWhenFindingElements]) { - NSLog(@"%@", app.debugDescription); + os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); XCTFail(@"Failed due to not able to find shareWithEmptyOriginButton with %@ seconds", @(kSecondsToWaitWhenFindingElements)); } @@ -36,7 +37,7 @@ - (void)testShareWithEmptyOrigin { elementMatchingPredicate:[NSPredicate predicateWithFormat:@"identifier == %@", @"ActivityListView"]]; if (![activityListView waitForExistenceWithTimeout:kSecondsToWaitWhenFindingElements]) { - NSLog(@"%@", app.debugDescription); + os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); XCTFail(@"Failed due to not able to find activityListView with %@ seconds", @(kSecondsToWaitWhenFindingElements)); } XCTAssertNotNil(activityListView); From 9558191d56e336615fa84e3ac13c48d9a179dfcf Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 26 Oct 2020 11:59:21 -0700 Subject: [PATCH 29/30] format --- .../example/ios/RunnerUITests/FLTShareExampleUITests.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m b/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m index 53a93bffe5ae..8e18d03ba354 100644 --- a/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m +++ b/packages/share/example/ios/RunnerUITests/FLTShareExampleUITests.m @@ -26,7 +26,8 @@ - (void)testShareWithEmptyOrigin { predicateWithFormat:@"label == %@", @"Share With Empty Origin"]]; if (![shareWithEmptyOriginButton waitForExistenceWithTimeout:kSecondsToWaitWhenFindingElements]) { os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); - XCTFail(@"Failed due to not able to find shareWithEmptyOriginButton with %@ seconds", @(kSecondsToWaitWhenFindingElements)); + XCTFail(@"Failed due to not able to find shareWithEmptyOriginButton with %@ seconds", + @(kSecondsToWaitWhenFindingElements)); } XCTAssertNotNil(shareWithEmptyOriginButton); @@ -38,7 +39,8 @@ - (void)testShareWithEmptyOrigin { predicateWithFormat:@"identifier == %@", @"ActivityListView"]]; if (![activityListView waitForExistenceWithTimeout:kSecondsToWaitWhenFindingElements]) { os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); - XCTFail(@"Failed due to not able to find activityListView with %@ seconds", @(kSecondsToWaitWhenFindingElements)); + XCTFail(@"Failed due to not able to find activityListView with %@ seconds", + @(kSecondsToWaitWhenFindingElements)); } XCTAssertNotNil(activityListView); } From 2fbaf5674dfaed12903bbcfca8698b7a441563e4 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 26 Oct 2020 15:40:29 -0700 Subject: [PATCH 30/30] rerun ci