From: Pieter Lexis Date: Mon, 8 Apr 2019 13:36:30 +0000 (+0200) Subject: add ccache cache to recursor builds X-Git-Tag: rec-4.2.0-rc1~26^2~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12538b7a2d0af7d5c71b18ce875dc7ab59b1ef77;p=pdns add ccache cache to recursor builds --- diff --git a/.circleci/config.yml b/.circleci/config.yml index d52dc1397..da6698228 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -74,6 +74,33 @@ commands: name: update apt cache command: apt-get update + save-ccache-cache: + description: Store the .ccache directory + parameters: + product: + type: string + default: "" + steps: + - save_cache: + key: ccache-cache-{{ arch }}-<< parameters.product >>-{{ .Branch }} + paths: + - ~/.ccache + + restore-cache-ccache: + description: Restore the .ccache directory + parameters: + product: + type: string + default: "" + steps: + - run: + name: ensure ca-certificates is installed + command: apt-get update && apt-get -qq -y install ca-certificates + - restore_cache: + keys: + - ccache-cache-{{ arch }}-<< parameters.product >>-{{ .Branch }} + - ccache-cache-{{ arch }}-<< parameters.product >> + jobs: build-auth: docker: @@ -136,6 +163,8 @@ jobs: docker: - image: debian:stretch steps: + - restore-cache-ccache: + product: recursor - run: name: Install dependencies command: | @@ -143,6 +172,7 @@ jobs: autoconf \ automake \ ca-certificates \ + ccache \ curl \ bison \ flex \ @@ -164,11 +194,12 @@ jobs: - checkout - run: name: autoconf - command: autoreconf -vfi + command: PATH=/usr/lib/ccache:$PATH autoreconf -vfi working_directory: ~/project/pdns/recursordist - run: name: configure command: | + PATH=/usr/lib/ccache:$PATH \ CFLAGS="-O1 -Werror=vla" \ CXXFLAGS="-O1 -Werror=vla" \ ./configure \ @@ -182,8 +213,10 @@ jobs: working_directory: ~/project/pdns/recursordist - run: name: build - command: make -j3 -k + command: PATH=/usr/lib/ccache:$PATH make -j3 -k working_directory: ~/project/pdns/recursordist + - save-ccache-cache: + product: recursor - run: name: Run unit tests command: make check || (cat test-suite.log; false)