You are viewing a plain text version of this content. The canonical link for it is here.
Posted to builds@apache.org by Vladimir Sitnikov <si...@gmail.com> on 2019/12/28 20:19:00 UTC

Build cache for Gradle: making builds and PR testing faster

Hi,

Does anybody know if there's a Build Cache server for Gradle available in
ASF infrastructure?

---

The use case is as follows: the server saves build artifacts (e.g. jars,
javadocs, etc), and
it helps to save build times on the repeated inputs.

For instance, in a multi-module project, we could save time on rebuilding
non-modified modules.
In the same way, we don't need to verify code style if we have already
verified it for the same set of input files.
In the same way, we don't need to execute unit tests if we have already
executed tests for the same source base.

The build cache would speedup build after a clean checkout, and it could
save developer's time (and PR testing time).

---

There's a free implementation available
https://docs.gradle.com/build-cache-node/ (it is a Docker image)

The suggested workflow is:
1) Build cache is writable only from ASF infrastructure (e.g. from ASF
Jenkins job).
In other words, ASF Jenkins builds the project and updates the cache
2) Everybody uses the cache in read-only mode, so they don't spend time on
what was already built by CI server.

Vladimir

Re: Build cache for Gradle: making builds and PR testing faster

Posted by Kenneth Knowles <ke...@apache.org>.
Beam was just discussing this. Was there any conclusion? Is there an ASF Infra build cache? Or is there now a project that did it themselves we can learn from?

On 2019/12/29 12:15:59, Vladimir Sitnikov <si...@gmail.com> wrote: 
> >Trying to get the use case
> 
> Please check the first mail. It is there.
> 
> For instance:
> 
> A) checkout master branch. Run the build.
> It would be much faster as it won't have to rebuild and retest all the
> things.
> 
> B) Pull request testing. It would save time on skipping the bits, thus it
> would produce feedback faster, and it would reduce CI worker utilization.
> 
> Vladimir
> 

Re: Build cache for Gradle: making builds and PR testing faster

Posted by Vladimir Sitnikov <si...@gmail.com>.
>Trying to get the use case

Please check the first mail. It is there.

For instance:

A) checkout master branch. Run the build.
It would be much faster as it won't have to rebuild and retest all the
things.

B) Pull request testing. It would save time on skipping the bits, thus it
would produce feedback faster, and it would reduce CI worker utilization.

Vladimir

Re: Build cache for Gradle: making builds and PR testing faster

Posted by Jeff MAURY <je...@jeffmaury.com>.
Trying to get the use case

Le dim. 29 déc. 2019 à 07:52, Vladimir Sitnikov <si...@gmail.com>
a écrit :

> >You should use Jenkins to cache between builds
>
> I want to reuse the same cache at developers' machines and at Travis /
> GitHub Actions.
>
> Caching between Jenkins runs is not enough.
>
> Vladimir
>

Re: Build cache for Gradle: making builds and PR testing faster

Posted by Vladimir Sitnikov <si...@gmail.com>.
>You should use Jenkins to cache between builds

I want to reuse the same cache at developers' machines and at Travis /
GitHub Actions.

Caching between Jenkins runs is not enough.

Vladimir

Re: Build cache for Gradle: making builds and PR testing faster

Posted by Jeff MAURY <je...@jeffmaury.com>.
You should use Jenkins to cache between builds

Jeff

Le sam. 28 déc. 2019 à 21:19, Vladimir Sitnikov <si...@gmail.com>
a écrit :

> Hi,
>
> Does anybody know if there's a Build Cache server for Gradle available in
> ASF infrastructure?
>
> ---
>
> The use case is as follows: the server saves build artifacts (e.g. jars,
> javadocs, etc), and
> it helps to save build times on the repeated inputs.
>
> For instance, in a multi-module project, we could save time on rebuilding
> non-modified modules.
> In the same way, we don't need to verify code style if we have already
> verified it for the same set of input files.
> In the same way, we don't need to execute unit tests if we have already
> executed tests for the same source base.
>
> The build cache would speedup build after a clean checkout, and it could
> save developer's time (and PR testing time).
>
> ---
>
> There's a free implementation available
> https://docs.gradle.com/build-cache-node/ (it is a Docker image)
>
> The suggested workflow is:
> 1) Build cache is writable only from ASF infrastructure (e.g. from ASF
> Jenkins job).
> In other words, ASF Jenkins builds the project and updates the cache
> 2) Everybody uses the cache in read-only mode, so they don't spend time on
> what was already built by CI server.
>
> Vladimir
>