From 6bcf5c64c489175da41acf7739f156319a00f5f9 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 3 Feb 2019 20:12:34 +0100 Subject: [PATCH] CI/CircleCI: Use ccache for nopch --- .circleci/config.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d42805670..813b4208cb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,13 +65,23 @@ jobs: apt-get install -y wget sudo mysql-client apt-get install -y libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-program-options-dev libboost-regex-dev libboost-system-dev libboost-thread-dev libssl-dev libmysqlclient-dev libreadline-dev libncurses-dev zlib1g-dev libbz2-dev apt-get install -y cmake clang git + apt-get install -y ccache - checkout + - restore_cache: + keys: + - nopch-{{ .Branch }}-{{ .Revision }} + - nopch-{{ .Branch }} + - nopch - run: name: Setup command: | + ccache -s git config user.email "circleci@build.bot" && git config user.name "Circl CI" - export CC=/usr/bin/clang - export CXX=/usr/bin/clang++ + export CC="ccache clang" + export CXX="ccache clang++" + export CCACHE_CPP2=yes + export USE_CCACHE=1 + export PATH=/usr/lib/ccache:$PATH $CXX --version mkdir bin cd bin @@ -82,9 +92,14 @@ jobs: command: | cd bin make -j 4 -k && make install + ccache -s cd check_install/bin ./authserver --version ./worldserver --version + - save_cache: + key: nopch-{{ .Branch }}-{{ .Revision }} + paths: + - /root/.ccache workflows: version: 2 build_all: