All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Kyle Evans" <kevans@freebsd.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Willian Rampazzo" <willianr@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Warner Losh" <imp@bsdimp.com>
Subject: [PATCH v2 4/6] gitlab-ci: Add ccache in $PATH and display statistics
Date: Wed, 12 May 2021 07:37:12 +0200	[thread overview]
Message-ID: <20210512053714.3268162-5-f4bug@amsat.org> (raw)
In-Reply-To: <20210512053714.3268162-1-f4bug@amsat.org>

If a runner has ccache installed, use it and display statistics
at the end of the build.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 .gitlab-ci.d/buildtest-template.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index f284d7a0eec..a625c697d3b 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -6,13 +6,18 @@
       then
         JOBS=$(sysctl -n hw.ncpu)
         MAKE=gmake
+        PATH=/usr/local/libexec/ccache:$PATH
         ;
       else
         JOBS=$(expr $(nproc) + 1)
         MAKE=make
+        PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH
         ;
       fi
     - echo "=== Using $JOBS simultaneous jobs ==="
+    - if command -v ccache > /dev/null ; then ccache --zero-stats ; fi
+  after_script:
+    - if command -v ccache > /dev/null ; then ccache --show-stats ; fi
 
 .native_build_job_template:
   stage: build
-- 
2.26.3



  parent reply	other threads:[~2021-05-12  5:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12  5:37 [PATCH v2 0/6] gitlab-ci: Allow using FreeBSD runners Philippe Mathieu-Daudé
2021-05-12  5:37 ` [PATCH v2 1/6] gitlab-ci: Extract &environment_variables template Philippe Mathieu-Daudé
2021-05-12  5:37 ` [PATCH v2 2/6] gitlab-ci: Adapt JOBS variable for FreeBSD runners Philippe Mathieu-Daudé
2021-05-12  5:37 ` [PATCH v2 3/6] gitlab-ci: Run GNU make via the $MAKE variable Philippe Mathieu-Daudé
2021-05-12  5:37 ` Philippe Mathieu-Daudé [this message]
2021-05-12  5:37 ` [PATCH v2 5/6] gitlab-ci: Simplify before/after script for Avocado based jobs Philippe Mathieu-Daudé
2021-05-12  5:37 ` [PATCH v2 6/6] gitlab-ci: Add FreeBSD jobs Philippe Mathieu-Daudé
2021-05-12 20:25   ` Warner Losh

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=20210512053714.3268162-5-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=alex.bennee@linaro.org \
    --cc=imp@bsdimp.com \
    --cc=kevans@freebsd.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    --cc=willianr@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.