Skip to content
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

Install Java 8, Android command line tools and SDK for Ubuntu #188

Conversation

jpsim
Copy link
Contributor

@jpsim jpsim commented Dec 6, 2022

These are used for Envoy Mobile's CI and currently installed on every CI job run: https://github.com/envoyproxy/envoy/blob/main/mobile/ci/linux_ci_setup.sh

These are used for Envoy Mobile's CI and currently installed on every
CI job run: https://github.com/envoyproxy/envoy/blob/main/mobile/ci/linux_ci_setup.sh

Signed-off-by: JP Simard <[email protected]>
@jpsim jpsim marked this pull request as ready for review December 6, 2022 20:43
@jpsim jpsim requested a review from a team as a code owner December 6, 2022 20:43
Copy link
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im wondering if it would be possible to do this with bazel - seems like there are bazel rules - https://bazel.build/docs/android-ndk

@jpsim
Copy link
Contributor Author

jpsim commented Dec 6, 2022

im wondering if it would be possible to do this with bazel

I think Keith looked into it and ran into this issue: bazelbuild/rules_android_ndk#24

Signed-off-by: JP Simard <[email protected]>
@jpsim jpsim changed the title Install Android command line tools and SDK for Ubuntu Install Java 8, Android command line tools and SDK for Ubuntu Dec 6, 2022
@jpsim jpsim force-pushed the install-android-command-line-tools-and-sdk-for-ubuntu branch from c2cd427 to 0c8ec2e Compare December 6, 2022 21:54
$SDKMANAGER --install "platforms;android-30"
$SDKMANAGER --install "build-tools;30.0.2"

export "ANDROID_HOME=${ANDROID_HOME}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think these wont be available in the container env when it is run and dont seem to be used in the build

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll look into how to set env variables in Docker from a bash script then.

the intention is to have these set when the container runs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you want to set them as ENV vars in the Dockerfile and then you can use them here and at runtime

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 6f3544f.

jpsim added 2 commits December 7, 2022 09:35
Signed-off-by: JP Simard <[email protected]>
@jpsim jpsim requested a review from phlax December 8, 2022 19:54
@jpsim jpsim force-pushed the install-android-command-line-tools-and-sdk-for-ubuntu branch from ef1a2b5 to 1a127b2 Compare December 8, 2022 20:22
Copy link
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for addressing @jpsim , lgtm

@phlax phlax enabled auto-merge (squash) December 8, 2022 20:33
@phlax phlax merged commit dce0a8c into envoyproxy:main Dec 8, 2022
@jpsim jpsim deleted the install-android-command-line-tools-and-sdk-for-ubuntu branch December 8, 2022 21:48
htuch pushed a commit that referenced this pull request Dec 8, 2022
  [skip ci]
  Install Java 8, Android command line tools and SDK for Ubuntu (#188)

* Install Android command line tools and SDK for Ubuntu

These are used for Envoy Mobile's CI and currently installed on every
CI job run: https://github.com/envoyproxy/envoy/blob/main/mobile/ci/linux_ci_setup.sh

Signed-off-by: JP Simard <[email protected]>
htuch pushed a commit that referenced this pull request Dec 8, 2022
  [skip ci]
  Regenerate linux toolchains from dce0a8c

  [skip ci]
  Install Java 8, Android command line tools and SDK for Ubuntu (#188)

* Install Android command line tools and SDK for Ubuntu

These are used for Envoy Mobile's CI and currently installed on every
CI job run: https://github.com/envoyproxy/envoy/blob/main/mobile/ci/linux_ci_setup.sh

Signed-off-by: JP Simard <[email protected]>
@jpsim
Copy link
Contributor Author

jpsim commented Dec 9, 2022

This grew the size of the Docker image by quite a bit: 1.79 GB to 3.77 GB

That's unfortunate given the vast majority of Envoy's CI jobs don't need the Android toolchain installed.

@phlax what if we added a new image that was Ubuntu+Android so that most CI jobs can use the leaner image, and the Envoy Mobile CI jobs can use this heavier one?

I'm also seeing some issues even using this image on CI: envoyproxy/envoy#24460

@phlax
Copy link
Member

phlax commented Dec 9, 2022

This grew the size of the Docker image by quite a bit: 1.79 GB to 3.77 GB

that was my original concern - that is going to be a huge problem - it will slow all envoy ci down a lot (3.77 is the compressed size to in reality it will take a lot more space)

I'm also seeing some issues even using this image on CI: envoyproxy/envoy#24460

yep we already overload dockerhub and have intermittent issues

@phlax what if we added a new image that was Ubuntu+Android so that most CI jobs can use the leaner image, and the Envoy Mobile CI jobs can use this heavier one?

i really dont see any other way - it will take a bit to set up cc @lizan

@phlax
Copy link
Member

phlax commented Dec 9, 2022

i guess its worth asking my original question again - is there no way we could do this with bazel ?

@jpsim
Copy link
Contributor Author

jpsim commented Dec 9, 2022

I'll revert this until we sort out of a better solution.

is there no way we could do this with bazel ?

I'd love to find a way to do this with Bazel, but I think the blocker is still here: bazelbuild/rules_android_ndk#24

@phlax
Copy link
Member

phlax commented Dec 9, 2022

looking at the fail trying to use this - i think even if we separated out to a different image it will still have issues in github actions being too large

jpsim added a commit to jpsim/envoy-build-tools that referenced this pull request Dec 9, 2022
@jpsim
Copy link
Contributor Author

jpsim commented Dec 9, 2022

i think even if we separated out to a different image it will still have issues in github actions being too large

The issue isn't on the GitHub Actions side, it's on the EngFlow RBE side. It's being looked into here: https://envoyproxy.slack.com/archives/C02QMNG92A3/p1670596188932999

jpsim added a commit to jpsim/envoy-build-tools that referenced this pull request Dec 14, 2022
…roxy#188)

* Install Android command line tools and SDK for Ubuntu

These are used for Envoy Mobile's CI and currently installed on every
CI job run: https://github.com/envoyproxy/envoy/blob/main/mobile/ci/linux_ci_setup.sh

Signed-off-by: JP Simard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants