From patchwork Tue Sep 3 13:26:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11127891 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3024B1399 for ; Tue, 3 Sep 2019 13:31:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1145323697 for ; Tue, 3 Sep 2019 13:31:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1145323697 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:46108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i58uV-0006Fj-KT for patchwork-qemu-devel@patchwork.kernel.org; Tue, 03 Sep 2019 09:31:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51266) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i58q1-00022j-O5 for qemu-devel@nongnu.org; Tue, 03 Sep 2019 09:27:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i58q0-0000fe-CO for qemu-devel@nongnu.org; Tue, 03 Sep 2019 09:27:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11253) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i58q0-0000fT-78 for qemu-devel@nongnu.org; Tue, 03 Sep 2019 09:27:12 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A537C075BD2; Tue, 3 Sep 2019 13:27:11 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-102.brq.redhat.com [10.40.204.102]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 774A05C3FA; Tue, 3 Sep 2019 13:27:09 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Tue, 3 Sep 2019 15:26:44 +0200 Message-Id: <20190903132649.20226-6-philmd@redhat.com> In-Reply-To: <20190903132649.20226-1-philmd@redhat.com> References: <20190903132649.20226-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 03 Sep 2019 13:27:11 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 05/10] .travis.yml: Improve ccache use X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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 Signed-off-by: Philippe Mathieu-Daudé --- .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: