From cf2dc78f6323293d428e02263ee6a9b39ec2fd4e Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Sun, 9 Aug 2020 14:06:51 +0200 Subject: [PATCH] Add ccache --- .ci/qt5_14/Dockerfile | 1 + .ci/qt5_14/build.sh | 6 ++++-- .github/workflows/qt5_14.yml | 10 +++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.ci/qt5_14/Dockerfile b/.ci/qt5_14/Dockerfile index 8fcc7819b1f..1af781e2abe 100644 --- a/.ci/qt5_14/Dockerfile +++ b/.ci/qt5_14/Dockerfile @@ -3,6 +3,7 @@ MAINTAINER Matthias Kuhn RUN dnf -y install \ bison \ + ccache \ clang \ clazy \ exiv2-devel \ diff --git a/.ci/qt5_14/build.sh b/.ci/qt5_14/build.sh index 3b0a1718d35..9f75cb9935f 100755 --- a/.ci/qt5_14/build.sh +++ b/.ci/qt5_14/build.sh @@ -3,9 +3,10 @@ mkdir /usr/src/qgis/build cd /usr/src/qgis/build || exit -1 +ccache -S cmake -GNinja \ - -DUSE_CCACHE=OFF \ + -DUSE_CCACHE=ON \ -DWITH_QUICK=ON \ -DWITH_3D=ON \ -DWITH_STAGED_PLUGINS=ON \ @@ -31,5 +32,6 @@ cmake -GNinja \ -DWERROR=TRUE \ .. - ninja + +ccache -S diff --git a/.github/workflows/qt5_14.yml b/.github/workflows/qt5_14.yml index 7fc76756157..cf1229c67e6 100644 --- a/.github/workflows/qt5_14.yml +++ b/.github/workflows/qt5_14.yml @@ -21,6 +21,14 @@ jobs: run: | docker build -t qgis_build_deps -f .ci/qt5_14/Dockerfile . + + - name: Cache + id: cache + uses: actions/cache@v2 + with: + path: ~/.ccache + key: qt514 + - name: Run build run: | - docker run -v $(pwd):/usr/src/qgis qgis_build_deps /usr/src/qgis/.ci/qt5_14/build.sh + docker run -v ~/.ccache:/root/ccache -v $(pwd):/usr/src/qgis qgis_build_deps /usr/src/qgis/.ci/qt5_14/build.sh