qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/4] gitlab-ci: Add ccache in $PATH and display statistics


From: Philippe Mathieu-Daudé
Subject: [PATCH 4/4] gitlab-ci: Add ccache in $PATH and display statistics
Date: Mon, 10 May 2021 17:22:54 +0200

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.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a33e51bf453..d9a0252c54d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,13 +21,18 @@ include:
       then
         MAKE=gmake
         JOBS=$(sysctl -n hw.ncpu)
+        PATH=/usr/local/libexec/ccache:$PATH
         ;
       else
         MAKE=make
         JOBS=$(expr $(nproc) + 1)
+        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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]