From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [PATCH 05/10] .travis.yml: Improve ccache use
Date: Tue, 3 Sep 2019 15:26:44 +0200 [thread overview]
Message-ID: <20190903132649.20226-6-philmd@redhat.com> (raw)
In-Reply-To: <20190903132649.20226-1-philmd@redhat.com>
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Per https://ccache.dev/manual/latest.html:
By default, ccache tries to give as few false cache hits as
possible. However, in certain situations it’s possible that
you know things that ccache can’t take for granted.
[The CCACHE_SLOPINESS environment variable] makes it possible
to tell ccache to relax some checks in order to increase the
hit rate.
We can relax the ctime/mtime header checks:
- include_file_ctime
By default, ccache also will not cache a file if it
includes a header whose ctime is too new. This option
disables that check.
- include_file_mtime
By default, ccache will not cache a file if it includes
a header whose mtime is too new. This option disables
that check.
We also add a call to clear the cache statistics before running
the build, and display them when the build finishes.
See https://docs.travis-ci.com/user/caching/#ccache-cache
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
.travis.yml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index a3db5b3f63..fccc1e091d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -70,6 +70,9 @@ env:
- TEST_CMD="make check -j3 V=1"
# This is broadly a list of "mainline" softmmu targets which have support across the major distros
- MAIN_SOFTMMU_TARGETS="aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
+ - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
+ - CCACHE_MAXSIZE=1G
+
git:
# we want to do this ourselves
@@ -77,10 +80,13 @@ git:
before_script:
+ - command -v ccache && ccache --zero-stats
- mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
- ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
script:
- make -j3 && travis_retry ${TEST_CMD}
+after_script:
+ - command -v ccache && ccache --show-stats
matrix:
--
2.20.1
next prev parent reply other threads:[~2019-09-03 13:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 13:26 [Qemu-devel] [PATCH 00/10] travis: Use caching when possible Philippe Mathieu-Daudé
2019-09-03 13:26 ` [Qemu-devel] [PATCH 01/10] .travis.yml: Enable multiple caching features Philippe Mathieu-Daudé
2019-09-03 13:26 ` [Qemu-devel] [PATCH 02/10] .travis.yml: Increase cache timeout from 3min to 20min Philippe Mathieu-Daudé
2019-09-03 13:26 ` [Qemu-devel] [PATCH 03/10] .travis.yml: Cache Python PIP packages Philippe Mathieu-Daudé
2019-09-03 13:26 ` [Qemu-devel] [PATCH 04/10] .travis.yml: Cache Avocado cache Philippe Mathieu-Daudé
2019-09-03 13:26 ` Philippe Mathieu-Daudé [this message]
2019-09-03 13:26 ` [Qemu-devel] [PATCH 06/10] .travis.yml: Enable ccache on OSX Philippe Mathieu-Daudé
2019-09-03 13:26 ` [Qemu-devel] [PATCH 07/10] .travis.yml: Document how the build matrix use caches Philippe Mathieu-Daudé
2019-09-03 13:26 ` [Qemu-devel] [PATCH 08/10] .travis.yml: Cache Linux/GCC 'debug profile' jobs together Philippe Mathieu-Daudé
2020-10-14 21:46 ` CACHE_NAME in .travis.yml (was Re: [Qemu-devel] [PATCH 08/10] .travis.yml: Cache Linux/GCC 'debug profile' jobs together) Eduardo Habkost
2019-09-03 13:26 ` [Qemu-devel] [PATCH 09/10] .travis.yml: Cache Linux/GCC 'non-debug profile' jobs together Philippe Mathieu-Daudé
2019-09-03 13:26 ` [Qemu-devel] [PATCH 10/10] .travis.yml: Cache Linux/Clang " Philippe Mathieu-Daudé
2019-09-04 11:26 ` [Qemu-devel] [PATCH 00/10] travis: Use caching when possible Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190903132649.20226-6-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=f4bug@amsat.org \
--cc=fam@euphon.net \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).