From 32e67cfe77b71b357686d66f51592a598625b6a9 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Thu, 6 Jul 2023 08:56:20 -0700 Subject: [PATCH] Further shard clang-tidy runs (flutter/engine#43428) The clang-tidy shards have crept up to 60 minutes on some runs. This PR will bring them back down to around 30 minutes. It does this by sharding the work for Mac/Linux `host_debug` across 4 shards. The clang-tidy work for ios/Android remains constrained to one shard. Unfortunately, the clang-tidy script sharding isn't smart enough to allow the ios/Android shards to participate in the `host_debug` sharding. This PR leaves that shard as-is, but we could further improve the runtime there if needed. --- .../flutter/ci/builders/linux_clang_tidy.json | 96 +++++++++++++++- .../flutter/ci/builders/mac_clang_tidy.json | 105 +++++++++++++++++- 2 files changed, 192 insertions(+), 9 deletions(-) diff --git a/engine/src/flutter/ci/builders/linux_clang_tidy.json b/engine/src/flutter/ci/builders/linux_clang_tidy.json index 2bc3ce148a..aa05115422 100644 --- a/engine/src/flutter/ci/builders/linux_clang_tidy.json +++ b/engine/src/flutter/ci/builders/linux_clang_tidy.json @@ -37,7 +37,65 @@ ], "tests": [ { - "name": "test: lint host_debug", + "name": "test: lint host_debug 0", + "recipe": "engine_v2/tester_engine", + "drone_dimensions": [ + "device_type=none", + "os=Linux", + "cores=32" + ], + "gclient_variables": { + "download_android_deps": false + }, + "dependencies": [ + "host_debug" + ], + "tasks": [ + { + "name": "test: lint host_debug", + "parameters": [ + "--variant", + "host_debug", + "--lint-all", + "--shard-id=0", + "--shard-variants=host_debug,host_debug,host_debug" + ], + "max_attempts": 1, + "script": "flutter/ci/lint.sh" + } + ] + }, + { + "name": "test: lint host_debug 1", + "recipe": "engine_v2/tester_engine", + "drone_dimensions": [ + "device_type=none", + "os=Linux", + "cores=32" + ], + "gclient_variables": { + "download_android_deps": false + }, + "dependencies": [ + "host_debug" + ], + "tasks": [ + { + "name": "test: lint host_debug", + "parameters": [ + "--variant", + "host_debug", + "--lint-all", + "--shard-id=1", + "--shard-variants=host_debug,host_debug,host_debug" + ], + "max_attempts": 1, + "script": "flutter/ci/lint.sh" + } + ] + }, + { + "name": "test: lint host_debug 2", "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", @@ -58,10 +116,40 @@ "--variant", "host_debug", "--lint-all", - "--shard-id=1", - "--shard-variants=android_debug_arm64" + "--shard-id=2", + "--shard-variants=host_debug,host_debug,host_debug" ], - "max_attempts": 1, + "max_attempts": 1, + "script": "flutter/ci/lint.sh" + } + ] + }, + { + "name": "test: lint host_debug 3", + "recipe": "engine_v2/tester_engine", + "drone_dimensions": [ + "device_type=none", + "os=Linux", + "cores=32" + ], + "gclient_variables": { + "download_android_deps": false + }, + "dependencies": [ + "host_debug", + "android_debug_arm64" + ], + "tasks": [ + { + "name": "test: lint host_debug", + "parameters": [ + "--variant", + "host_debug", + "--lint-all", + "--shard-id=3", + "--shard-variants=host_debug,host_debug,host_debug" + ], + "max_attempts": 1, "script": "flutter/ci/lint.sh" } ] diff --git a/engine/src/flutter/ci/builders/mac_clang_tidy.json b/engine/src/flutter/ci/builders/mac_clang_tidy.json index 95524f3603..b141caba2b 100644 --- a/engine/src/flutter/ci/builders/mac_clang_tidy.json +++ b/engine/src/flutter/ci/builders/mac_clang_tidy.json @@ -46,7 +46,7 @@ ], "tests": [ { - "name": "test: lint host_debug", + "name": "test: lint host_debug 0", "recipe": "engine_v2/tester_engine", "drone_dimensions": [ "device_type=none", @@ -57,8 +57,39 @@ "download_android_deps": false }, "dependencies": [ - "host_debug", - "ios_debug_sim" + "host_debug" + ], + "contexts": [ + "osx_sdk" + ], + "tasks": [ + { + "name": "test: lint host_debug", + "parameters": [ + "--variant", + "host_debug", + "--lint-all", + "--shard-id=0", + "--shard-variants=host_debug,host_debug,host_debug" + ], + "max_attempts": 1, + "script": "flutter/ci/lint.sh" + } + ] + }, + { + "name": "test: lint host_debug 1", + "recipe": "engine_v2/tester_engine", + "drone_dimensions": [ + "device_type=none", + "os=Mac", + "cpu=arm64" + ], + "gclient_variables": { + "download_android_deps": false + }, + "dependencies": [ + "host_debug" ], "contexts": [ "osx_sdk" @@ -71,9 +102,73 @@ "host_debug", "--lint-all", "--shard-id=1", - "--shard-variants=ios_debug_sim" + "--shard-variants=host_debug,host_debug,host_debug" ], - "max_attempts": 1, + "max_attempts": 1, + "script": "flutter/ci/lint.sh" + } + ] + }, + { + "name": "test: lint host_debug 2", + "recipe": "engine_v2/tester_engine", + "drone_dimensions": [ + "device_type=none", + "os=Mac", + "cpu=arm64" + ], + "gclient_variables": { + "download_android_deps": false + }, + "dependencies": [ + "host_debug" + ], + "contexts": [ + "osx_sdk" + ], + "tasks": [ + { + "name": "test: lint host_debug", + "parameters": [ + "--variant", + "host_debug", + "--lint-all", + "--shard-id=2", + "--shard-variants=host_debug,host_debug,host_debug" + ], + "max_attempts": 1, + "script": "flutter/ci/lint.sh" + } + ] + }, + { + "name": "test: lint host_debug 3", + "recipe": "engine_v2/tester_engine", + "drone_dimensions": [ + "device_type=none", + "os=Mac", + "cpu=arm64" + ], + "gclient_variables": { + "download_android_deps": false + }, + "dependencies": [ + "host_debug" + ], + "contexts": [ + "osx_sdk" + ], + "tasks": [ + { + "name": "test: lint host_debug", + "parameters": [ + "--variant", + "host_debug", + "--lint-all", + "--shard-id=3", + "--shard-variants=host_debug,host_debug,host_debug" + ], + "max_attempts": 1, "script": "flutter/ci/lint.sh" } ]