[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 https://github.com/flutter/flutter/issues/114373
This commit is contained in:
stuartmorgan
2023-06-21 20:57:02 -04:00
committed by GitHub
parent b321f2c0ac
commit 4807a84ea2
4 changed files with 80 additions and 0 deletions

View File

@ -12,6 +12,17 @@ platform_properties:
linux:
properties:
os: Linux
linux_android:
properties:
os: Ubuntu
cores: "8"
device_type: none
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:33v6"},
{"dependency": "open_jdk", "version": "version:11"},
{"dependency": "curl", "version": "version:7.64.0"}
]
linux_desktop:
properties:
os: Ubuntu
@ -115,6 +126,27 @@ targets:
channel: stable
version_file: flutter_stable.version
### Android tasks ###
- name: Linux_android android_build_all_packages master
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
add_recipes_cq: "true"
version_file: flutter_master.version
target_file: android_build_all_packages.yaml
channel: master
- name: Linux_android android_build_all_packages stable
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
add_recipes_cq: "true"
version_file: flutter_stable.version
target_file: android_build_all_packages.yaml
channel: stable
### Web tasks ###
- name: Linux_web web_build_all_packages master
recipe: packages/packages

View File

@ -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" "$@"

View File

@ -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

View File

@ -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"]