Skip to content

Commit

Permalink
Prefix non-local build config names with ci/ (flutter#51474)
Browse files Browse the repository at this point in the history
Part 1 of flutter/flutter#145263

This PR updates the names of builds outside of `local_engine.json` to be
prefixed with the string `ci/` (or `ci\` on Windows). For better or
worse, the "name" field of a build is used to construct a path used as
the source directory of a copy operation (I think the CAS archive
step?). Because of that, changing the name of a build also requires
updating the build output directory of the ninja build.

This PR also adds tests to make sure the naming of these builds remains
consistent.
  • Loading branch information
zanderso authored Mar 31, 2024
1 parent 9689390 commit 4f6b832
Show file tree
Hide file tree
Showing 35 changed files with 807 additions and 555 deletions.
9 changes: 5 additions & 4 deletions build/copy_info_plist.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
Copies the Info.plist and adds extra fields to it like the git hash of the
engine.
Precondition: $CWD/../../flutter is the path to the flutter engine repo.
usage: copy_info_plist.py --source <src_path> --destination <dest_path>
--minversion=<deployment_target>
"""
Expand All @@ -20,10 +18,13 @@

import git_revision

_script_dir = os.path.abspath(os.path.join(os.path.realpath(__file__), '..'))
_src_root_dir = os.path.join(_script_dir, '..', '..')


def get_clang_version():
clang_executable = str(
os.path.join('..', '..', 'flutter', 'buildtools', 'mac-x64', 'clang', 'bin', 'clang++')
os.path.join(_src_root_dir, 'flutter', 'buildtools', 'mac-x64', 'clang', 'bin', 'clang++')
)
version = subprocess.check_output([clang_executable, '--version'])
return version.splitlines()[0]
Expand All @@ -47,7 +48,7 @@ def main():
args = parser.parse_args()

text = open(args.source).read()
engine_path = os.path.join(os.getcwd(), '..', '..', 'flutter')
engine_path = os.path.join(_src_root_dir, 'flutter')
revision = git_revision.get_repository_version(engine_path)
clang_version = get_clang_version()
text = text.format(revision=revision, clang_version=clang_version, min_version=args.minversion)
Expand Down
7 changes: 5 additions & 2 deletions ci/analyze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ FLUTTER_DIR="$SRC_DIR/flutter"
# directory. If not specified, we default to the build output for
# host_debug_unopt.
if [[ $# -eq 0 ]] ; then
DART_BIN="$SRC_DIR/out/host_debug_unopt/dart-sdk/bin"
DART_BIN="$SRC_DIR/out/host_debug_unopt/dart-sdk/bin"
if [[ ! -d "$DART_BIN" ]]; then
DART_BIN="$SRC_DIR/out/ci/host_debug_unopt/dart-sdk/bin"
fi
else
DART_BIN="$1"
DART_BIN="$1"
fi

DART="$DART_BIN/dart"
Expand Down
123 changes: 68 additions & 55 deletions ci/builders/linux_android_aot_engine.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
{
"archives": [
{
"name": "android_profile",
"name": "ci/android_profile",
"type": "gcs",
"base_path": "out/android_profile/zip_archives/",
"base_path": "out/ci/android_profile/zip_archives/",
"include_paths": [
"out/android_profile/zip_archives/android-arm-profile/artifacts.zip",
"out/android_profile/zip_archives/android-arm-profile/linux-x64.zip",
"out/android_profile/zip_archives/android-arm-profile/symbols.zip",
"out/android_profile/zip_archives/download.flutter.io"
"out/ci/android_profile/zip_archives/android-arm-profile/artifacts.zip",
"out/ci/android_profile/zip_archives/android-arm-profile/linux-x64.zip",
"out/ci/android_profile/zip_archives/android-arm-profile/symbols.zip",
"out/ci/android_profile/zip_archives/download.flutter.io"
],
"realm": "production"
}
Expand All @@ -23,6 +23,8 @@
"use_rbe": true
},
"gn": [
"--target-dir",
"ci/android_profile",
"--runtime-mode",
"profile",
"--android",
Expand All @@ -31,9 +33,9 @@
"--rbe",
"--no-goma"
],
"name": "android_profile",
"name": "ci/android_profile",
"ninja": {
"config": "android_profile",
"config": "ci/android_profile",
"targets": [
"default",
"clang_x64/gen_snapshot",
Expand All @@ -45,14 +47,14 @@
{
"archives": [
{
"name": "android_release",
"name": "ci/android_release",
"type": "gcs",
"base_path": "out/android_release/zip_archives/",
"base_path": "out/ci/android_release/zip_archives/",
"include_paths": [
"out/android_release/zip_archives/android-arm-release/artifacts.zip",
"out/android_release/zip_archives/android-arm-release/linux-x64.zip",
"out/android_release/zip_archives/android-arm-release/symbols.zip",
"out/android_release/zip_archives/download.flutter.io"
"out/ci/android_release/zip_archives/android-arm-release/artifacts.zip",
"out/ci/android_release/zip_archives/android-arm-release/linux-x64.zip",
"out/ci/android_release/zip_archives/android-arm-release/symbols.zip",
"out/ci/android_release/zip_archives/download.flutter.io"
],
"realm": "production"
}
Expand All @@ -65,6 +67,8 @@
"use_rbe": true
},
"gn": [
"--target-dir",
"ci/android_release",
"--runtime-mode",
"release",
"--android",
Expand All @@ -73,9 +77,9 @@
"--rbe",
"--no-goma"
],
"name": "android_release",
"name": "ci/android_release",
"ninja": {
"config": "android_release",
"config": "ci/android_release",
"targets": [
"default",
"clang_x64/gen_snapshot",
Expand All @@ -87,15 +91,15 @@
{
"archives": [
{
"name": "android_release_arm64",
"name": "ci/android_release_arm64",
"type": "gcs",
"base_path": "out/android_release_arm64/zip_archives/",
"base_path": "out/ci/android_release_arm64/zip_archives/",
"include_paths": [
"out/android_release_arm64/zip_archives/android-arm64-release/artifacts.zip",
"out/android_release_arm64/zip_archives/android-arm64-release/linux-x64.zip",
"out/android_release_arm64/zip_archives/android-arm64-release/symbols.zip",
"out/android_release_arm64/zip_archives/android-arm64-release/analyze-snapshot-linux-x64.zip",
"out/android_release_arm64/zip_archives/download.flutter.io"
"out/ci/android_release_arm64/zip_archives/android-arm64-release/artifacts.zip",
"out/ci/android_release_arm64/zip_archives/android-arm64-release/linux-x64.zip",
"out/ci/android_release_arm64/zip_archives/android-arm64-release/symbols.zip",
"out/ci/android_release_arm64/zip_archives/android-arm64-release/analyze-snapshot-linux-x64.zip",
"out/ci/android_release_arm64/zip_archives/download.flutter.io"
],
"realm": "production"
}
Expand All @@ -108,6 +112,8 @@
"use_rbe": true
},
"gn": [
"--target-dir",
"ci/android_release_arm64",
"--runtime-mode",
"release",
"--android",
Expand All @@ -116,9 +122,9 @@
"--rbe",
"--no-goma"
],
"name": "android_release_arm64",
"name": "ci/android_release_arm64",
"ninja": {
"config": "android_release_arm64",
"config": "ci/android_release_arm64",
"targets": [
"default",
"clang_x64/gen_snapshot",
Expand All @@ -132,7 +138,7 @@
"language": "bash",
"script": "flutter/ci/binary_size_treemap.sh",
"parameters": [
"../../src/out/android_release_arm64/libflutter.so",
"../../src/out/ci/android_release_arm64/libflutter.so",
"${FLUTTER_LOGS_DIR}"
]
}
Expand All @@ -141,15 +147,15 @@
{
"archives": [
{
"name": "android_profile_arm64",
"name": "ci/android_profile_arm64",
"type": "gcs",
"base_path": "out/android_profile_arm64/zip_archives/",
"base_path": "out/ci/android_profile_arm64/zip_archives/",
"include_paths": [
"out/android_profile_arm64/zip_archives/android-arm64-profile/artifacts.zip",
"out/android_profile_arm64/zip_archives/android-arm64-profile/linux-x64.zip",
"out/android_profile_arm64/zip_archives/android-arm64-profile/symbols.zip",
"out/android_profile_arm64/zip_archives/android-arm64-profile/analyze-snapshot-linux-x64.zip",
"out/android_profile_arm64/zip_archives/download.flutter.io"
"out/ci/android_profile_arm64/zip_archives/android-arm64-profile/artifacts.zip",
"out/ci/android_profile_arm64/zip_archives/android-arm64-profile/linux-x64.zip",
"out/ci/android_profile_arm64/zip_archives/android-arm64-profile/symbols.zip",
"out/ci/android_profile_arm64/zip_archives/android-arm64-profile/analyze-snapshot-linux-x64.zip",
"out/ci/android_profile_arm64/zip_archives/download.flutter.io"
],
"realm": "production"
}
Expand All @@ -162,6 +168,8 @@
"use_rbe": true
},
"gn": [
"--target-dir",
"ci/android_profile_arm64",
"--android",
"--runtime-mode",
"profile",
Expand All @@ -170,9 +178,9 @@
"--rbe",
"--no-goma"
],
"name": "android_profile_arm64",
"name": "ci/android_profile_arm64",
"ninja": {
"config": "android_profile_arm64",
"config": "ci/android_profile_arm64",
"targets": [
"clang_x64/gen_snapshot",
"default",
Expand All @@ -192,7 +200,7 @@
"script": "flutter/ci/firebase_testlab.py",
"parameters": [
"--variant",
"android_profile_arm64"
"ci/android_profile_arm64"
],
"test_if": "main"
}
Expand All @@ -201,15 +209,15 @@
{
"archives": [
{
"name": "android_profile_x64",
"name": "ci/android_profile_x64",
"type": "gcs",
"base_path": "out/android_profile_x64/zip_archives/",
"base_path": "out/ci/android_profile_x64/zip_archives/",
"include_paths": [
"out/android_profile_x64/zip_archives/android-x64-profile/artifacts.zip",
"out/android_profile_x64/zip_archives/android-x64-profile/linux-x64.zip",
"out/android_profile_x64/zip_archives/android-x64-profile/symbols.zip",
"out/android_profile_x64/zip_archives/android-x64-profile/analyze-snapshot-linux-x64.zip",
"out/android_profile_x64/zip_archives/download.flutter.io"
"out/ci/android_profile_x64/zip_archives/android-x64-profile/artifacts.zip",
"out/ci/android_profile_x64/zip_archives/android-x64-profile/linux-x64.zip",
"out/ci/android_profile_x64/zip_archives/android-x64-profile/symbols.zip",
"out/ci/android_profile_x64/zip_archives/android-x64-profile/analyze-snapshot-linux-x64.zip",
"out/ci/android_profile_x64/zip_archives/download.flutter.io"
],
"realm": "production"
}
Expand All @@ -222,6 +230,8 @@
"use_rbe": true
},
"gn": [
"--target-dir",
"ci/android_profile_x64",
"--runtime-mode",
"profile",
"--android",
Expand All @@ -230,9 +240,9 @@
"--rbe",
"--no-goma"
],
"name": "android_profile_x64",
"name": "ci/android_profile_x64",
"ninja": {
"config": "android_profile_x64",
"config": "ci/android_profile_x64",
"targets": [
"default",
"clang_x64/gen_snapshot",
Expand All @@ -244,15 +254,15 @@
{
"archives": [
{
"name": "android_release_x64",
"name": "ci/android_release_x64",
"type": "gcs",
"base_path": "out/android_release_x64/zip_archives/",
"base_path": "out/ci/android_release_x64/zip_archives/",
"include_paths": [
"out/android_release_x64/zip_archives/android-x64-release/artifacts.zip",
"out/android_release_x64/zip_archives/android-x64-release/linux-x64.zip",
"out/android_release_x64/zip_archives/android-x64-release/symbols.zip",
"out/android_release_x64/zip_archives/android-x64-release/analyze-snapshot-linux-x64.zip",
"out/android_release_x64/zip_archives/download.flutter.io"
"out/ci/android_release_x64/zip_archives/android-x64-release/artifacts.zip",
"out/ci/android_release_x64/zip_archives/android-x64-release/linux-x64.zip",
"out/ci/android_release_x64/zip_archives/android-x64-release/symbols.zip",
"out/ci/android_release_x64/zip_archives/android-x64-release/analyze-snapshot-linux-x64.zip",
"out/ci/android_release_x64/zip_archives/download.flutter.io"
],
"realm": "production"
}
Expand All @@ -265,6 +275,8 @@
"use_rbe": true
},
"gn": [
"--target-dir",
"ci/android_release_x64",
"--runtime-mode",
"release",
"--android",
Expand All @@ -273,9 +285,9 @@
"--rbe",
"--no-goma"
],
"name": "android_release_x64",
"name": "ci/android_release_x64",
"ninja": {
"config": "android_release_x64",
"config": "ci/android_release_x64",
"targets": [
"default",
"clang_x64/gen_snapshot",
Expand All @@ -290,7 +302,8 @@
{
"name": "Verify-export-symbols-release-binaries",
"parameters": [
"src/out"
"src/out/ci",
"src/flutter/buildtools"
],
"script": "flutter/testing/symbols/verify_exported.dart",
"language": "dart"
Expand Down
Loading

0 comments on commit 4f6b832

Please sign in to comment.