From 3eb78a328e5fb8ea5201b219af464fb571ea0252 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 3 Aug 2022 22:40:49 +0200 Subject: [PATCH] Use ccache in Circle CI job Note that with Circle CI, an existing cache can't be modified, so we create a new cache every time -- and then load the most recent one using the common prefix. --- .circleci/config.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 01fad4f841..b7fce6058a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,13 +11,21 @@ jobs: - run: name: Install dependencies command: | - WX_EXTRA_PACKAGES=git ./build/tools/before_install.sh + WX_EXTRA_PACKAGES='ccache git' ./build/tools/before_install.sh + + echo "PATH=/usr/lib64/ccache:$PATH" >> $BASH_ENV - run: name: Checkout required submodules command: | git submodule update --init 3rdparty/catch 3rdparty/nanosvg + - restore_cache: + name: Restore ccache + keys: + - ccache-v1-{{ arch }}-{{ .Branch }} + - ccache-v1-{{ arch }} + - run: name: Configure command: ./configure --disable-debug-info @@ -30,6 +38,18 @@ jobs: command: | make -k -j2 CXXFLAGS='-Werror -Wno-error=cpp' + - run: + name: Show ccache statistics + when: always + command: ccache -vv -s + + - save_cache: + name: Save ccache + when: always + key: ccache-v1-{{ arch }}-{{ .Branch }}-{{ .BuildNum }} + paths: + - ~/.cache/ccache + workflows: build: jobs: