You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Xeno Amess <xe...@gmail.com> on 2020/04/12 23:08:05 UTC

suggest adding cache for .m2 folders into travis-ci for commons project.

most of commons projects use travis-ci but only few of them uses cache for
.m2
for example, commons-lang's .travis.yml looks like:

language: java
jdk:
  - openjdk8
  - openjdk11
  - openjdk13
  - openjdk-ea

matrix:
  include:
    - os: linux-ppc64le
      jdk: openjdk8
  allow_failures:
    - jdk: openjdk-ea

script:
  - mvn

after_success:
  - mvn clean test jacoco:report coveralls:report -Ptravis-jacoco
javadoc:javadoc -Ddoclint=all

we can easily change it to

language: java

cache:
  directories:
    - "$HOME/.m2"

jdk:
  - openjdk8
  - openjdk11
  - openjdk13
  - openjdk-ea

matrix:
  include:
    - os: linux-ppc64le
      jdk: openjdk8
  allow_failures:
    - jdk: openjdk-ea

script:
  - mvn

after_success:
  - mvn clean test jacoco:report coveralls:report -Ptravis-jacoco
javadoc:javadoc -Ddoclint=all

https://docs.travis-ci.com/user/caching
the benifit is it will build faster on travis-ci, make everybody's life
easier.
I see no cost in doing so.
what about your opinions?

Re: suggest adding cache for .m2 folders into travis-ci for commons project.

Posted by Gilles Sadowski <gi...@gmail.com>.
Hi.

2020-04-13 1:08 UTC+02:00, Xeno Amess <xe...@gmail.com>:
> most of commons projects use travis-ci but only few of them uses cache for
> .m2
> for example, commons-lang's .travis.yml looks like:
>
> language: java
> jdk:
>   - openjdk8
>   - openjdk11
>   - openjdk13
>   - openjdk-ea
>
> matrix:
>   include:
>     - os: linux-ppc64le
>       jdk: openjdk8
>   allow_failures:
>     - jdk: openjdk-ea
>
> script:
>   - mvn
>
> after_success:
>   - mvn clean test jacoco:report coveralls:report -Ptravis-jacoco
> javadoc:javadoc -Ddoclint=all
>
> we can easily change it to
>
> language: java
>
> cache:
>   directories:
>     - "$HOME/.m2"

I tried it for "Commons Statistics" and the last build (#93)
was ~20% faster than the fastest of all recent builds.[1]

Thanks for the suggestion,
Gilles

[1] https://travis-ci.org/github/apache/commons-statistics/builds

>
> jdk:
>   - openjdk8
>   - openjdk11
>   - openjdk13
>   - openjdk-ea
>
> matrix:
>   include:
>     - os: linux-ppc64le
>       jdk: openjdk8
>   allow_failures:
>     - jdk: openjdk-ea
>
> script:
>   - mvn
>
> after_success:
>   - mvn clean test jacoco:report coveralls:report -Ptravis-jacoco
> javadoc:javadoc -Ddoclint=all
>
> https://docs.travis-ci.com/user/caching
> the benifit is it will build faster on travis-ci, make everybody's life
> easier.
> I see no cost in doing so.
> what about your opinions?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org