This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
add supported luci builders #20099
Merged
Merged
add supported luci builders #20099
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
66526de
add supported luci builders
keyonghan d8c6775
fix license
keyonghan ef32f57
add readme
keyonghan 8548c0d
add code to validate json contents
keyonghan 365207a
license
keyonghan 6949335
move dev to ci
keyonghan b6f538a
fix license
keyonghan 8f2463e
add shell script to run test
keyonghan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| This directory contains resources that the Flutter team uses during | ||
| the development of engine. | ||
|
|
||
| ## Luci builder file | ||
| `engine_try_builders.json` and `engine_prod_builders.json` contains the | ||
| supported luci try/prod builders for engine. It follows format: | ||
| ```json | ||
| { | ||
| "builders":[ | ||
| { | ||
| "name":"xxx", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"yyy", | ||
| "repo":"engine" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
| This file will be mainly used in [`flutter/cocoon`](https://github.com/flutter/cocoon) | ||
| to trigger/update engine luci tasks. | ||
|
|
||
| If any new changes, please validate json contents by running | ||
| ``` | ||
| dart validate_json.dart engine_try_builders.json | ||
| dart validate_json.dart engine_prod_builders.json | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/bin/bash | ||
| # Copyright 2020 The Flutter Authors. All rights reserved. | ||
| # Use of this source code is governed by a BSD-style license that can be | ||
| # found in the LICENSE file. | ||
|
|
||
| # Runner for dart tests. It expects a single parameter with the full | ||
| # path to the start folder where tests will be run. | ||
|
|
||
| set -e | ||
|
|
||
| dir=$(dirname $0) | ||
|
|
||
| pushd $dir > /dev/null | ||
| dart validate_json.dart engine_try_builders.json | ||
| dart validate_json.dart engine_prod_builders.json | ||
|
|
||
| popd > /dev/null | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| { | ||
| "builders":[ | ||
| { | ||
| "name":"Linux Host Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Linux Fuchsia", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Linux Android AOT Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Linux Android Debug Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac Host Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac Android AOT Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac Android Debug Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac iOS Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac iOS Engine Profile", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac iOS Engine Release", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Windows Host Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Windows Android AOT Engine", | ||
| "repo":"engine" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| { | ||
| "builders":[ | ||
| { | ||
| "name":"Linux Host Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Linux Fuchsia", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Linux Android AOT Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Linux Android Debug Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Linux Web Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac Host Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac Android AOT Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac Android Debug Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac Host Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac iOS Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Windows Host Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Windows Android AOT Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Windows Web Engine", | ||
| "repo":"engine" | ||
| }, | ||
| { | ||
| "name":"Mac Web Engine", | ||
| "repo":"engine" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| // Copyright 2020 The Flutter 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 'dart:convert'; | ||
| import 'dart:io'; | ||
| import 'dart:io' show File; | ||
| import 'dart:io' as io_internals show exit; | ||
|
|
||
| final bool hasColor = stdout.supportsAnsiEscapes; | ||
| final String bold = hasColor ? '\x1B[1m' : ''; // used for shard titles | ||
| final String red = hasColor ? '\x1B[31m' : ''; // used for errors | ||
| final String reset = hasColor ? '\x1B[0m' : ''; | ||
| final String reverse = hasColor ? '\x1B[7m' : ''; // used for clocks | ||
|
|
||
| /// Validates if the input builders JSON file has valid contents. | ||
| /// | ||
| /// Examples: | ||
| /// dart validate_json.dart /path/to/json/file | ||
| Future<void> main(List<String> args) async { | ||
| final String jsonString = await File(args[0]).readAsString(); | ||
| Map<String, dynamic> decodedJson; | ||
| final List<String> messages = <String>[]; | ||
| try { | ||
| decodedJson = json.decode(jsonString) as Map<String, dynamic>; | ||
| final List<dynamic> builders = decodedJson['builders'] as List<dynamic>; | ||
| if (builders == null) { | ||
| messages.add('${bold}Json format is violated: no "builders" exists. Please follow: $reset'); | ||
| messages.add(''' | ||
| { | ||
| "builders":[ | ||
| { | ||
| "name":"xxx", | ||
| "repo":"engine" | ||
| }, { | ||
| "name":"xxx", | ||
| "repo":"engine" | ||
| } | ||
| ] | ||
| }'''); | ||
| exitWithError(messages); | ||
| } | ||
| } on ExitException catch (error) { | ||
| error.apply(); | ||
| } | ||
| print('$clock ${bold}Analysis successful for ${args[0]}.$reset'); | ||
| } | ||
|
|
||
| class ExitException implements Exception { | ||
| ExitException(this.exitCode); | ||
|
|
||
| final int exitCode; | ||
|
|
||
| void apply() { | ||
| io_internals.exit(exitCode); | ||
| } | ||
| } | ||
|
|
||
| void exitWithError(List<String> messages) { | ||
| final String redLine = '$red━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━$reset'; | ||
| print(redLine); | ||
| messages.forEach(print); | ||
| print(redLine); | ||
| exit(1); | ||
| } | ||
|
|
||
| String get clock { | ||
| final DateTime now = DateTime.now(); | ||
| return '$reverse▌' | ||
| '${now.hour.toString().padLeft(2, "0")}:' | ||
| '${now.minute.toString().padLeft(2, "0")}:' | ||
| '${now.second.toString().padLeft(2, "0")}' | ||
| '▐$reset'; | ||
| } | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR but given this validation will be used across repos I'm wondering if it could be moved to the recipes to avoid duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point! moving the validation to a module should help. Will take a look.