mirror of
https://github.com/flutter/packages.git
synced 2025-08-06 17:28:42 +08:00
Update CI config for Flutter 2 (#3674)
Includes cleanup to simplify our setup. Major changes: - Eliminate the NNBD plugin filtering for stable. - Remove the temporarily-added beta branch testing. - Enable Linux, macOS, and web on stable (Windows is LUCI-based) - Combine the two different macOS matrix configurations now that they are the same. - Combine the two different Linux matrix configurations by using a single Dockerfile (which now also includes clang-format) - The web integration smoke test temporarily still uses the old Dockerfile, now renamed, because the driver installer script doesn't support Chrome 89 yet. - Move most of the Linux tasks to lower-CPU machines to allow more tasks to run in parallel without hitting the community limit. - Reorder the tasks slightly and give them comments to identify platform groupings - Enabled web "build all plugins together" and "build all examples" tests
This commit is contained in:
@ -201,7 +201,7 @@ void main() {
|
||||
output,
|
||||
orderedEquals(<String>[
|
||||
'\nBUILDING macOS for $packageName',
|
||||
'\macOS is not supported by this plugin',
|
||||
'macOS is not supported by this plugin',
|
||||
'\n\n',
|
||||
'All builds successful!',
|
||||
]),
|
||||
@ -213,6 +213,7 @@ void main() {
|
||||
expect(processRunner.recordedCalls, orderedEquals(<ProcessCall>[]));
|
||||
cleanupPackages();
|
||||
});
|
||||
|
||||
test('building for macos', () async {
|
||||
createFakePlugin('plugin',
|
||||
withExtraFiles: <List<String>>[
|
||||
@ -244,14 +245,81 @@ void main() {
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
orderedEquals(<ProcessCall>[
|
||||
ProcessCall(flutterCommand, <String>['pub', 'get'],
|
||||
pluginExampleDirectory.path),
|
||||
ProcessCall(flutterCommand, <String>['build', 'macos'],
|
||||
pluginExampleDirectory.path),
|
||||
]));
|
||||
cleanupPackages();
|
||||
});
|
||||
|
||||
test('building for web with no implementation results in no-op', () async {
|
||||
createFakePlugin('plugin', withExtraFiles: <List<String>>[
|
||||
<String>['example', 'test'],
|
||||
]);
|
||||
|
||||
final Directory pluginExampleDirectory =
|
||||
mockPackagesDir.childDirectory('plugin').childDirectory('example');
|
||||
|
||||
createFakePubspec(pluginExampleDirectory, isFlutter: true);
|
||||
|
||||
final List<String> output = await runCapturingPrint(
|
||||
runner, <String>['build-examples', '--no-ipa', '--web']);
|
||||
final String packageName =
|
||||
p.relative(pluginExampleDirectory.path, from: mockPackagesDir.path);
|
||||
|
||||
expect(
|
||||
output,
|
||||
orderedEquals(<String>[
|
||||
'\nBUILDING web for $packageName',
|
||||
'Web is not supported by this plugin',
|
||||
'\n\n',
|
||||
'All builds successful!',
|
||||
]),
|
||||
);
|
||||
|
||||
print(processRunner.recordedCalls);
|
||||
// Output should be empty since running build-examples --macos with no macos
|
||||
// implementation is a no-op.
|
||||
expect(processRunner.recordedCalls, orderedEquals(<ProcessCall>[]));
|
||||
cleanupPackages();
|
||||
});
|
||||
|
||||
test('building for web', () async {
|
||||
createFakePlugin('plugin',
|
||||
withExtraFiles: <List<String>>[
|
||||
<String>['example', 'test'],
|
||||
<String>['example', 'web', 'index.html'],
|
||||
],
|
||||
isWebPlugin: true);
|
||||
|
||||
final Directory pluginExampleDirectory =
|
||||
mockPackagesDir.childDirectory('plugin').childDirectory('example');
|
||||
|
||||
createFakePubspec(pluginExampleDirectory, isFlutter: true);
|
||||
|
||||
final List<String> output = await runCapturingPrint(
|
||||
runner, <String>['build-examples', '--no-ipa', '--web']);
|
||||
final String packageName =
|
||||
p.relative(pluginExampleDirectory.path, from: mockPackagesDir.path);
|
||||
|
||||
expect(
|
||||
output,
|
||||
orderedEquals(<String>[
|
||||
'\nBUILDING web for $packageName',
|
||||
'\n\n',
|
||||
'All builds successful!',
|
||||
]),
|
||||
);
|
||||
|
||||
print(processRunner.recordedCalls);
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
orderedEquals(<ProcessCall>[
|
||||
ProcessCall(flutterCommand, <String>['build', 'web'],
|
||||
pluginExampleDirectory.path),
|
||||
]));
|
||||
cleanupPackages();
|
||||
});
|
||||
|
||||
test(
|
||||
'building for Windows when plugin is not set up for Windows results in no-op',
|
||||
() async {
|
||||
|
Reference in New Issue
Block a user