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.
This commit is contained in:
Vadim Zeitlin 2022-08-03 22:40:49 +02:00
parent a527b2714d
commit 3eb78a328e

View file

@ -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: