Skip to content

Commit 4807a84

Browse files
[ci] Add LUCI version of build-all for Android (#4236)
Adds a new Linux_android configuration, and an initial test (build-all-packages) using it. This is the simplest Android test since it doesn't actually run anything, so starting with this one as a foundation to test future web-based tests. Part of flutter/flutter#114373
1 parent b321f2c commit 4807a84

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

.ci.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ platform_properties:
1212
linux:
1313
properties:
1414
os: Linux
15+
linux_android:
16+
properties:
17+
os: Ubuntu
18+
cores: "8"
19+
device_type: none
20+
dependencies: >-
21+
[
22+
{"dependency": "android_sdk", "version": "version:33v6"},
23+
{"dependency": "open_jdk", "version": "version:11"},
24+
{"dependency": "curl", "version": "version:7.64.0"}
25+
]
1526
linux_desktop:
1627
properties:
1728
os: Ubuntu
@@ -115,6 +126,27 @@ targets:
115126
channel: stable
116127
version_file: flutter_stable.version
117128

129+
### Android tasks ###
130+
- name: Linux_android android_build_all_packages master
131+
bringup: true # New target
132+
recipe: packages/packages
133+
timeout: 30
134+
properties:
135+
add_recipes_cq: "true"
136+
version_file: flutter_master.version
137+
target_file: android_build_all_packages.yaml
138+
channel: master
139+
140+
- name: Linux_android android_build_all_packages stable
141+
bringup: true # New target
142+
recipe: packages/packages
143+
timeout: 30
144+
properties:
145+
add_recipes_cq: "true"
146+
version_file: flutter_stable.version
147+
target_file: android_build_all_packages.yaml
148+
channel: stable
149+
118150
### Web tasks ###
119151
- name: Linux_web web_build_all_packages master
120152
recipe: packages/packages
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
# Copyright 2013 The Flutter Authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
set -e
6+
7+
platform="$1"
8+
build_mode="$2"
9+
output_dir="$3"
10+
shift 3
11+
cd "$output_dir"/all_packages
12+
flutter build "$platform" --"$build_mode" "$@"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
# Copyright 2013 The Flutter Authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
set -e
6+
7+
output_dir="$1"
8+
9+
# The output directory here must match the directory in
10+
# build_all_packages_app_legacy.sh
11+
dart ./script/tool/bin/flutter_plugin_tools.dart create-all-packages-app \
12+
--legacy-source=.ci/legacy_project/all_packages --output-dir="$output_dir"/ \
13+
--exclude script/configs/exclude_all_packages_app.yaml
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
tasks:
2+
- name: prepare tool
3+
script: .ci/scripts/prepare_tool.sh
4+
- name: create all_packages app
5+
script: .ci/scripts/create_all_packages_app.sh
6+
- name: build all_packages for Android debug
7+
script: .ci/scripts/build_all_packages_app.sh
8+
args: ["apk", "debug"]
9+
- name: build all_packages for Android release
10+
script: .ci/scripts/build_all_packages_app.sh
11+
args: ["apk", "release"]
12+
- name: create all_packages app - legacy version
13+
script: .ci/scripts/create_all_packages_app_legacy.sh
14+
# Output dir; must match the final argument to build_all_packages_app_legacy
15+
# below.
16+
args: ["legacy"]
17+
# Only build legacy in one mode, to minimize extra CI time. Debug is chosen
18+
# somewhat arbitrarily as likely being slightly faster.
19+
- name: build all_packages for Android - legacy version
20+
script: .ci/scripts/build_all_packages_app_legacy.sh
21+
# The final argument here must match the output directory passed to
22+
# create_all_packages_app_legacy above.
23+
args: ["apk", "debug", "legacy"]

0 commit comments

Comments
 (0)