-
Notifications
You must be signed in to change notification settings - Fork 6k
Add et run command #51037
Add et run command #51037
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,118 @@ | ||||||||||
| { | ||||||||||
| "builds": [ | ||||||||||
| { | ||||||||||
| "drone_dimensions": [ | ||||||||||
| "os=Mac-13", | ||||||||||
| "os=Linux" | ||||||||||
|
Comment on lines
+5
to
+6
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The LUCI recipes understand a
Hadn't added support for it since it wasn't needed, yet, but parsing that would go here: https://github.com/flutter/engine/blob/main/tools/pkg/engine_build_configs/lib/src/build_config.dart#L805.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do this in a follow on CL. |
||||||||||
| ], | ||||||||||
| "gn": [ | ||||||||||
| "--runtime-mode", | ||||||||||
| "debug", | ||||||||||
| "--android", | ||||||||||
| "--android-cpu=arm64", | ||||||||||
| "--no-stripped", | ||||||||||
| "--enable-impeller-vulkan", | ||||||||||
| "--no-lto" | ||||||||||
| ], | ||||||||||
| "name": "android_debug_arm64", | ||||||||||
| "ninja": { | ||||||||||
| "config": "android_debug_arm64", | ||||||||||
| "targets": [] | ||||||||||
| } | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "drone_dimensions": [ | ||||||||||
| "os=Mac-13", | ||||||||||
| "os=Linux" | ||||||||||
| ], | ||||||||||
| "gn": [ | ||||||||||
| "--runtime-mode", | ||||||||||
| "profile", | ||||||||||
| "--android", | ||||||||||
| "--android-cpu=arm64", | ||||||||||
| "--no-stripped", | ||||||||||
| "--enable-impeller-vulkan", | ||||||||||
| "--no-lto" | ||||||||||
| ], | ||||||||||
| "name": "android_profile_arm64", | ||||||||||
| "ninja": { | ||||||||||
| "config": "android_profile_arm64", | ||||||||||
| "targets": [] | ||||||||||
| } | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "drone_dimensions": [ | ||||||||||
| "os=Mac-13", | ||||||||||
| "os=Linux" | ||||||||||
| ], | ||||||||||
| "gn": [ | ||||||||||
| "--runtime-mode", | ||||||||||
| "release", | ||||||||||
| "--android", | ||||||||||
| "--android-cpu=arm64", | ||||||||||
| "--no-stripped", | ||||||||||
| "--enable-impeller-vulkan", | ||||||||||
| "--no-lto" | ||||||||||
| ], | ||||||||||
| "name": "android_release_arm64", | ||||||||||
| "ninja": { | ||||||||||
| "config": "android_release_arm64", | ||||||||||
| "targets": [] | ||||||||||
| } | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "drone_dimensions": [ | ||||||||||
| "os=Mac-13", | ||||||||||
| "os=Linux" | ||||||||||
| ], | ||||||||||
| "gn": [ | ||||||||||
| "--runtime-mode", | ||||||||||
| "debug", | ||||||||||
| "--no-stripped", | ||||||||||
| "--enable-impeller-vulkan", | ||||||||||
| "--no-lto" | ||||||||||
| ], | ||||||||||
| "name": "host_debug", | ||||||||||
| "ninja": { | ||||||||||
| "config": "host_debug", | ||||||||||
| "targets": [] | ||||||||||
| } | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "drone_dimensions": [ | ||||||||||
| "os=Mac-13", | ||||||||||
| "os=Linux" | ||||||||||
| ], | ||||||||||
| "gn": [ | ||||||||||
| "--runtime-mode", | ||||||||||
| "profile", | ||||||||||
| "--no-stripped", | ||||||||||
| "--enable-impeller-vulkan", | ||||||||||
| "--no-lto" | ||||||||||
| ], | ||||||||||
| "name": "host_profile", | ||||||||||
| "ninja": { | ||||||||||
| "config": "host_profile", | ||||||||||
| "targets": [] | ||||||||||
| } | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "drone_dimensions": [ | ||||||||||
| "os=Mac-13", | ||||||||||
| "os=Linux" | ||||||||||
| ], | ||||||||||
| "gn": [ | ||||||||||
| "--runtime-mode", | ||||||||||
| "release", | ||||||||||
| "--no-stripped", | ||||||||||
| "--enable-impeller-vulkan", | ||||||||||
| "--no-lto" | ||||||||||
| ], | ||||||||||
| "name": "host_release", | ||||||||||
| "ninja": { | ||||||||||
| "config": "host_release", | ||||||||||
| "targets": [] | ||||||||||
| } | ||||||||||
| } | ||||||||||
| ] | ||||||||||
| } | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| import 'package:engine_build_configs/engine_build_configs.dart'; | ||
|
|
||
| import 'environment.dart'; | ||
| import 'logger.dart'; | ||
|
|
||
| /// A function that returns true or false when given a [BuilderConfig] and its | ||
| /// name. | ||
|
|
@@ -48,3 +49,59 @@ List<Build> runnableBuilds(Environment env, Map<String, BuilderConfig> input) { | |
| return build.canRunOn(env.platform); | ||
| }); | ||
| } | ||
|
|
||
| /// Validates the list of builds. | ||
| /// Calls assert. | ||
johnmccutchan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| void debugCheckBuilds(List<Build> builds) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is what https://github.com/flutter/engine/blob/main/tools/pkg/engine_build_configs/bin/check.dart#L91 is checking, which we run on CI here: https://github.com/flutter/engine/blob/main/ci/builders/linux_unopt.json#L96. Do you get the errors you expect from that script if you intentionally introduce some duplicates? |
||
| final Set<String> names = <String>{}; | ||
|
|
||
| for (final Build build in builds) { | ||
| assert(!names.contains(build.name), | ||
| 'More than one build has the name ${build.name}'); | ||
| names.add(build.name); | ||
| } | ||
| } | ||
|
|
||
| /// Build the build target in the environment. | ||
| Future<int> runBuild(Environment environment, Build build) async { | ||
| final BuildRunner buildRunner = BuildRunner( | ||
| platform: environment.platform, | ||
| processRunner: environment.processRunner, | ||
| abi: environment.abi, | ||
| engineSrcDir: environment.engine.srcDir, | ||
| build: build, | ||
| runTests: false, | ||
| ); | ||
|
|
||
| Spinner? spinner; | ||
| void handler(RunnerEvent event) { | ||
| switch (event) { | ||
| case RunnerStart(): | ||
| environment.logger.status('$event ', newline: false); | ||
| spinner = environment.logger.startSpinner(); | ||
| case RunnerProgress(done: true): | ||
| spinner?.finish(); | ||
| spinner = null; | ||
| environment.logger.clearLine(); | ||
| environment.logger.status(event); | ||
| case RunnerProgress(done: false): | ||
| { | ||
| spinner?.finish(); | ||
| spinner = null; | ||
| final String percent = '${event.percent.toStringAsFixed(1)}%'; | ||
| final String fraction = '(${event.completed}/${event.total})'; | ||
| final String prefix = '[${event.name}] $percent $fraction '; | ||
| final String what = event.what; | ||
| environment.logger.clearLine(); | ||
| environment.logger.status('$prefix$what', newline: false, fit: true); | ||
| } | ||
| default: | ||
| spinner?.finish(); | ||
| spinner = null; | ||
| environment.logger.status(event); | ||
| } | ||
| } | ||
|
|
||
| final bool buildResult = await buildRunner.run(handler); | ||
| return buildResult ? 0 : 1; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.