Skip to content

Commit

Permalink
[Fuchsia] only download fuchsia deps when necessary (#51439)
Browse files Browse the repository at this point in the history
This is a quick follow up of #51072 to only download fuchsia deps (via download_fuchsia_deps gclient arg) when necessary. Considering the pr/51072 is very huge, keeping these condition changes in a separate change would be cleaner.

The wiki has been updated already since setting the download_fuchsia_deps gclient arg explicitly won't break the existing workflow. I also mentioned in the wiki that building and running fuchsia needed a linux box (an explicit assertion in the with_envs.py).

Bug: http://b/40935282

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
  • Loading branch information
zijiehe-google-com authored Mar 18, 2024
1 parent 639d21a commit 9162c83
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 30 deletions.
12 changes: 12 additions & 0 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ targets:
properties:
release_build: "true"
config_name: linux_fuchsia
# pm in fuchsia-sdk is required when uploading artifacts, so we have to
# download the fuchsia-deps in root builder.
gclient_variables: >-
{
"download_android_deps": false,
"download_fuchsia_deps": true
}
# Do not remove(https://github.com/flutter/flutter/issues/144644)
# Scheduler will fail to get the platform
drone_dimensions:
Expand Down Expand Up @@ -304,6 +311,11 @@ targets:
add_recipes_cq: "true"
config_name: linux_license
clobber: "true"
# Ensure licenses in fuchsia deps can be correctly processed.
gclient_variables: >-
{
"download_fuchsia_deps": true
}
- name: Linux linux_web_engine
recipe: engine_v2/engine_v2
Expand Down
6 changes: 2 additions & 4 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ vars = {
# Checkout Fuchsia dependencies only on Linux. This is the umbrella flag which
# controls the behavior of all fuchsia related flags. I.e. any fuchsia related
# logic or condition may not work if this flag is False.
# TODO(zijiehe): Make this condition more strict to only download fuchsia
# dependencies when necessary: b/40935282
'download_fuchsia_deps': 'host_os == "linux"',
'download_fuchsia_deps': False,
# Downloads the fuchsia SDK as listed in fuchsia_sdk_path var. This variable
# is currently only used for the Fuchsia LSC process and is not intended for
# local development.
Expand Down Expand Up @@ -1210,7 +1208,7 @@ hooks = [
{
'name': 'Download Fuchsia system images',
'pattern': '.',
'condition': 'run_fuchsia_emu',
'condition': 'download_fuchsia_deps and run_fuchsia_emu',
'action': [
'env',
'DOWNLOAD_FUCHSIA_SDK={download_fuchsia_sdk}',
Expand Down
26 changes: 0 additions & 26 deletions ci/builders/linux_fuchsia.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"device_type=none",
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false
},
"gn": [
"--fuchsia",
"--fuchsia-cpu",
Expand All @@ -31,7 +28,6 @@
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false,
"run_fuchsia_emu": true
},
"gn": [
Expand Down Expand Up @@ -68,9 +64,6 @@
"device_type=none",
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false
},
"gn": [
"--fuchsia",
"--fuchsia-cpu",
Expand All @@ -94,7 +87,6 @@
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false,
"run_fuchsia_emu": true
},
"gn": [
Expand Down Expand Up @@ -131,9 +123,6 @@
"device_type=none",
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false
},
"gn": [
"--fuchsia",
"--fuchsia-cpu",
Expand Down Expand Up @@ -173,7 +162,6 @@
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false,
"run_fuchsia_emu": true
},
"gn": [
Expand Down Expand Up @@ -210,9 +198,6 @@
"device_type=none",
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false
},
"gn": [
"--fuchsia",
"--fuchsia-cpu",
Expand All @@ -236,7 +221,6 @@
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false,
"run_fuchsia_emu": true
},
"gn": [
Expand Down Expand Up @@ -273,10 +257,6 @@
"device_type=none",
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false,
"run_fuchsia_emu": true
},
"gn": [
"--fuchsia",
"--fuchsia-cpu",
Expand All @@ -300,7 +280,6 @@
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false,
"run_fuchsia_emu": true
},
"gn": [
Expand Down Expand Up @@ -337,10 +316,6 @@
"device_type=none",
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false,
"run_fuchsia_emu": true
},
"gn": [
"--fuchsia",
"--fuchsia-cpu",
Expand Down Expand Up @@ -380,7 +355,6 @@
"os=Linux"
],
"gclient_variables": {
"download_android_deps": false,
"run_fuchsia_emu": true
},
"gn": [
Expand Down

0 comments on commit 9162c83

Please # to comment.