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:
parent
a527b2714d
commit
3eb78a328e
1 changed files with 21 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue