Skip to content

[ci] Split build_all_packages by JDK version. #7106

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
merged 6 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,38 @@ targets:
"CHANNEL": "master"
}

- name: Linux_android android_build_all_packages_legacy master
# When making this `bringup: false`, update the task above to
# use target_file: android_build_all_packages_jdk17.yaml and
# remove its 'dependencies' section.
bringup: true # https://github.com/flutter/packages/pull/7099
recipe: packages/packages
timeout: 30
properties:
version_file: flutter_master.version
# TODO(stuartmorgan): Once stable requires JDK 17, and the
# legacy project is updated accordingly, this entire target
# can be merged back into android_build_all_packages.
# This file only builds a *legacy* version of the project.
target_file: android_build_all_packages_legacy.yaml
channel: master
# The legacy project build requires an older JDK.
dependencies: >-
[
{"dependency": "open_jdk", "version": "version:11"}
]
env_variables: >-
{
"CHANNEL": "master"
}

- name: Linux_android android_build_all_packages stable
recipe: packages/packages
timeout: 30
properties:
add_recipes_cq: "true"
version_file: flutter_stable.version
# This builds both legacy, and "modern" projects.
target_file: android_build_all_packages.yaml
channel: stable
# The legacy project build requires an older JDK.
Expand All @@ -394,6 +420,28 @@ targets:
"CHANNEL": "stable"
}

- name: Linux_android android_build_all_packages_legacy stable
# When making this `bringup: false`, update the task above to
# use target_file: android_build_all_packages_jdk17.yaml and
# remove its 'dependencies' section.
bringup: true # https://github.com/flutter/packages/pull/7099
recipe: packages/packages
timeout: 30
properties:
version_file: flutter_stable.version
# This file only builds a *legacy* version of the project.
target_file: android_build_all_packages_legacy.yaml
channel: stable
# The legacy project build requires an older JDK.
dependencies: >-
[
{"dependency": "open_jdk", "version": "version:11"}
]
env_variables: >-
{
"CHANNEL": "stable"
}

- name: Linux_android android_platform_tests_shard_1 master
recipe: packages/packages
timeout: 60
Expand Down
2 changes: 2 additions & 0 deletions .ci/targets/android_build_all_packages.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This builds legacy and modern all_packages app, which requires jdk11
# This will stop working in the next stable!
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
Expand Down
14 changes: 14 additions & 0 deletions .ci/targets/android_build_all_packages_jdk17.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This only builds the modern all_packages app, which requires jdk17+
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: create all_packages app
script: .ci/scripts/create_all_packages_app.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- 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"]
17 changes: 17 additions & 0 deletions .ci/targets/android_build_all_packages_legacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This only builds the legacy all_packages app, which requires jdk11
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- 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"]