Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Run the download_android_tools.py in a gclient hook. #3050

Merged
merged 2 commits into from
Sep 21, 2016

Conversation

chinmaygarde
Copy link
Member

Originally, this was a step that had to be carried out manually. Presumably because we did not want developers to download the Android SDK and NDK if they were not targetting Android. In practice, this is rarely the case. Even the buildbots unconditionally run the script (though they don’t need Android artifacts on the Mac since there is no Mac to Android builder).

cc @jamesr @jason-simmons @abarth

Originally, this was a step that had to be carried out manually. Presumably because we did not want developers to download the Android SDK and NDK if they were not targetting Android. In practice, this is rarely the case. Even the buildbots unconditionally run the script (though they don’t need Android artifacts on the Mac since there is no Mac to Android builder).
@chinmaygarde
Copy link
Member Author

Updated docs to remove the extra setup step.

@chinmaygarde
Copy link
Member Author

A side effect of this change is that Travis now downloads Android tools for the engine job. Not sure it matters.

@jamesr
Copy link
Contributor

jamesr commented Sep 21, 2016

A side effect of this change is that Travis now downloads Android tools for the engine job. Not sure it matters.

ah, maybe that's why it's not in the default set. how long does it take? does this push us close to a travis timeout?

@eseidelGoogle
Copy link
Contributor

We can detect travis with environment variables and disable that if needed.

@chinmaygarde
Copy link
Member Author

chinmaygarde commented Sep 21, 2016

how long does it take? does this push us close to a travis timeout?

We don't actually build the Android engine on Travis. So it doesn't affect the results of the job in any way. Travis just has to download stuff it doesn't need. This is not new since most of what gclient does is for building the engine.

@jamesr
Copy link
Contributor

jamesr commented Sep 21, 2016

There was a time when travis tried to build the engine. Maybe this is a holdover from then - @abarth would probably remember.

@abarth
Copy link
Contributor

abarth commented Sep 21, 2016

Can you rig this up so we don't download these binaries on travis? They're huge and there's no benefit to downloading them on travis:

Copying gs://mojo/android/tool/0d320c50b0ed188c7e1182388e2beb623a1d307d.tar.gz...
Downloading ...flutter/src/third_party/android_tools/sdk.tar.gz: 412.35 MiB/412.35 MiB    
Copying gs://mojo/android/tool/7b727f0d4c853c9848847839a317300cb83f4ece.tar.gz...
Downloading ...flutter/src/third_party/android_tools/ndk.tar.gz: 894.75 MiB/894.75 MiB    
Running ['python', '/home/travis/depot_tools/gsutil.py', 'cp', 'gs://mojo/android/tool/0d320c50b0ed188c7e1182388e2beb623a1d307d.tar.gz', '/home/travis/build/flutter/src/third_party/android_tools/sdk.tar.gz']
Extracting Android tools (sdk)
Running ['python', '/home/travis/depot_tools/gsutil.py', 'cp', 'gs://mojo/android/tool/7b727f0d4c853c9848847839a317300cb83f4ece.tar.gz', '/home/travis/build/flutter/src/third_party/android_tools/ndk.tar.gz']
Extracting Android tools (ndk)
Hook '/usr/bin/python src/tools/android/download_android_tools.py' took 65.51 secs

@chinmaygarde
Copy link
Member Author

Can you rig this up so we don't download these binaries on travis?

I could check for a Travis specific environment variable. That would mean we need to add Travis specific logic to the hooks. Or is there a way to specify to gclient that it should skip certain named hooks?

@chinmaygarde
Copy link
Member Author

Added the check in flutter/buildroot#11.

@abarth
Copy link
Contributor

abarth commented Sep 21, 2016

LGTM

@chinmaygarde chinmaygarde merged commit 75673cb into flutter:master Sep 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants