qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/3] gitlab-ci-edk2.yml: Use ccache


From: Laszlo Ersek
Subject: Re: [PATCH 3/3] gitlab-ci-edk2.yml: Use ccache
Date: Tue, 7 Jan 2020 11:19:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 01/06/20 19:46, Philippe Mathieu-Daudé wrote:
> By using ccache we reduce the job duration from
> 40 minutes 26 seconds to 32 minutes 6 seconds.
> 
>   Running after script...
>   $ ccache --show-stats
>   cache hit (direct)                  6604
>   files in cache                     12090
>   cache size                         335.5 MB
> 
> For now downloading this cache takes 16 seconds, archiving
> it 44 seconds.
> 
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
>  .gitlab-ci-edk2.yml | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/.gitlab-ci-edk2.yml b/.gitlab-ci-edk2.yml
> index abfaf52874..329ba24f20 100644
> --- a/.gitlab-ci-edk2.yml
> +++ b/.gitlab-ci-edk2.yml
> @@ -14,12 +14,19 @@ build-edk2:
>     - edk2-stdout.log
>     - edk2-stderr.log
>   image: ubuntu:16.04 # Use Ubuntu Xenial
> + variables:
> +   CCACHE_DIR: ${CI_PROJECT_DIR}/.ccache
> + cache: # Use the same cache for all EDK2 jobs
> +   key: ubuntu16.04-edk2-ccache
> +   paths:
> +   - ${CCACHE_DIR}
>   before_script: # Install packages requiered to build EDK2
>   - apt-get update --quiet --quiet
>   - DEBIAN_FRONTEND=noninteractive
>     apt-get install --assume-yes --no-install-recommends --quiet --quiet
>       build-essential
>       ca-certificates
> +     ccache
>       dos2unix
>       gcc-aarch64-linux-gnu
>       gcc-arm-linux-gnueabi
> @@ -29,9 +36,13 @@ build-edk2:
>       nasm
>       python
>       uuid-dev
> + - export PATH=/usr/lib/ccache:$PATH
> + - ccache --zero-stats
>   script: # Clone the required submodules and build EDK2
>   - git submodule update --init roms/edk2
>   - git -C roms/edk2 submodule update --init
>   - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
>   - echo "=== Using ${JOBS} simultaneous jobs ==="
>   - make -j${JOBS} -C roms efi 1>edk2-stdout.log 2> >(tee -a edk2-stderr.log 
> >&2)
> + after_script:
> + - ccache --show-stats
> 

I suggest dropping this patch. (In the first place: thank you for making
this a separate patch!)

I'm not a fan of ccache, to be honest. I've seen obscure failures with
it in the past. Also, the edk2 build system is a complicated beast in
itself; let's not compose that with another opaque thing. I'm especially
not fond of caching artifacts between multiple edk2 jobs.

For speeding up my builds, I used to use distcc instead; it worked
better than ccache (using multiple machines in my home). But I abandoned
even that, after a while.

I certainly don't intend to nack this patch -- if others really like
(and trust) ccache, they are welcome to ack. I'm just not a fan of it.

Thanks,
Laszlo




reply via email to

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