-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[ci] Add LUCI version of build-all for Android #4236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
auto-submit
merged 2 commits into
flutter:main
from
stuartmorgan-g:luci-android-build-all
Jun 22, 2023
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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,12 @@ | ||
#!/bin/bash | ||
# Copyright 2013 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. | ||
set -e | ||
|
||
platform="$1" | ||
build_mode="$2" | ||
output_dir="$3" | ||
shift 3 | ||
cd "$output_dir"/all_packages | ||
flutter build "$platform" --"$build_mode" "$@" |
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,13 @@ | ||
#!/bin/bash | ||
# Copyright 2013 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. | ||
set -e | ||
|
||
output_dir="$1" | ||
|
||
# The output directory here must match the directory in | ||
# build_all_packages_app_legacy.sh | ||
dart ./script/tool/bin/flutter_plugin_tools.dart create-all-packages-app \ | ||
--legacy-source=.ci/legacy_project/all_packages --output-dir="$output_dir"/ \ | ||
--exclude script/configs/exclude_all_packages_app.yaml |
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,23 @@ | ||
tasks: | ||
- name: prepare tool | ||
script: .ci/scripts/prepare_tool.sh | ||
- name: create all_packages app | ||
script: .ci/scripts/create_all_packages_app.sh | ||
- name: build all_packages for Android debug | ||
script: .ci/scripts/build_all_packages_app.sh | ||
args: ["apk", "debug"] | ||
- name: build all_packages for Android release | ||
script: .ci/scripts/build_all_packages_app.sh | ||
args: ["apk", "release"] | ||
- name: create all_packages app - legacy version | ||
script: .ci/scripts/create_all_packages_app_legacy.sh | ||
# Output dir; must match the final argument to build_all_packages_app_legacy | ||
# below. | ||
args: ["legacy"] | ||
# Only build legacy in one mode, to minimize extra CI time. Debug is chosen | ||
# somewhat arbitrarily as likely being slightly faster. | ||
- name: build all_packages for Android - legacy version | ||
script: .ci/scripts/build_all_packages_app_legacy.sh | ||
# The final argument here must match the output directory passed to | ||
# create_all_packages_app_legacy above. | ||
args: ["apk", "debug", "legacy"] |
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.
These were taken from flutter/flutter's configs. I believe it's similar to what we are currently using in Cirrus, so hopefully it'll transition smoothly.
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.
Can we use a different platform name to avoid confusion from framework ones, which needs a tethered android phone? Alternatively, I am wondering if we can consolidate the to-be-added (linux) platforms, and leave the dependencies difference on target level.
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.
IMO the flutter/flutter naming is confusing, because
linux_android
has one specific device, then there are a bunch oflinux_android_somedevice
variants with different devices. Why doeslinux_android
not match the naming scheme there?Also, I don't expect to need device-specific configs in this repo since we use FTL for device tests, so the naming should be much simpler here.
Do you mean _desktop, _web, and _android? That would mean duplicating all of the generic platform-targeting configuration (These two lines for Android, cmake/clang/etc for desktop, etc.) for every single test, which makes things very redundant and harder to update. I would really like to avoid that.
Unless you mean putting all the things needed for all three into a single Linux configuration. I'm fine with that in terms of file structure, but I assume that slows things down unnecessarily in CI.
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.
(And FWIW, I believe this is the last one I will need to add. My plan was one generic one for things like Dart analyze and unit tests that have no target, and one for each of the three targets that Linux hosts are used for.)
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.
Different platforms handling different set of tasks are expected, and sound good to me.
We have some metrics data depending on the platform assuming
Linux_android
targets are tied to a phone. Do you mind holding a bit on this PR before I find a good way to handle the metrics?#4229 LGTM to merge.
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.
Created flutter/flutter#129039, I expect to fix it in the coming fixit week with a higher priority.
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.
flutter/flutter#129039 is fixed. This should be unblocked.