[roc] Re: Docker images for Android build

  • From: Victor Gaydov <victor@xxxxxxxxx>
  • To: roc@xxxxxxxxxxxxx
  • Date: Tue, 30 Jun 2020 19:27:40 +0300

On Tue, 30 Jun 2020 18:00:06 +0200
MATTEO ARELLA <arella.matteo.95@xxxxxxxxx> wrote:

Yes the java-android image also provides the android NDK so it can be
used for both roc-java and roc-toolkit.
The only drawback is that java-android image has more dependencies to
download but they are necessary for running adb and android emulator.

The plus cost can be amortized by running the java-android image with
a volume to android-sdk directory (/sdk inside the container) so that
the overhead is paid only once.

But if we don't preserve state between travis builds, we'll have to
download everything at least once per travis build, right?

We have --build-3rdparty option in scons which can download roc-toolkit
dependencies. After running travis builds for a few months, it appeared
that the network connectivity on travis is far from ideal. I regularly
got failed builds caused by network issues...

So I came up with creating a git submodule with cached tarballs for all
dependencies (called "vendor"). When scons wants to download something,
it first checks whether the submodule is present and have the needed
tarball.

On the user system, submodule is not usually cloned, but travis is
configured to perform a recursive clone (with all submodules).

The trick is that, for some reason, recursive git clone performed by
travis before build is always reliable, while curl or wget executed
during build can fail from time to time. Maybe travis has a special
handling for that initial cloning from github, don't know.

So. Maybe we can cache the content downloaded by java-android between
builds and add it to our vendor submodule?

If you want I can write a README doc for the java-android image
explaining all the features available.

That would be great!

BTW briefly documenting the hooks mechanism is appreciated too.

I'd prefer to keep the documentation in one place, i.e. in sphinx, in
this case I think this page would be the best:
https://roc-streaming.org/toolkit/docs/development/continuous_integration.html

That page is compiled from this RST file:
https://github.com/roc-streaming/roc-toolkit/blob/develop/docs/sphinx/development/continuous_integration.rst

PS. please use bottom posting on this list:
http://www.idallen.com/topposting.html

-- Victor

Other related posts: