diff --git a/.ci.yaml b/.ci.yaml index 275a8f1a17..ad8adefe26 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -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 diff --git a/.ci/scripts/build_all_packages_app_legacy.sh b/.ci/scripts/build_all_packages_app_legacy.sh new file mode 100755 index 0000000000..40e56de91e --- /dev/null +++ b/.ci/scripts/build_all_packages_app_legacy.sh @@ -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" "$@" diff --git a/.ci/scripts/create_all_packages_app_legacy.sh b/.ci/scripts/create_all_packages_app_legacy.sh new file mode 100755 index 0000000000..e56d460e85 --- /dev/null +++ b/.ci/scripts/create_all_packages_app_legacy.sh @@ -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 diff --git a/.ci/targets/android_build_all_packages.yaml b/.ci/targets/android_build_all_packages.yaml new file mode 100644 index 0000000000..6c807e8334 --- /dev/null +++ b/.ci/targets/android_build_all_packages.yaml @@ -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"]