summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-12 11:05:16 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-12 11:19:28 +0200
commitf040982c3df5003412ffc634d04f0eb03d7165a5 (patch)
tree16ad10a5a15c737be4d2cc58a6c63ec72556a6e5
parent8abaa77121d12f8a59737c03d581e00b7dd90b16 (diff)
downloadmana-f040982c3df5003412ffc634d04f0eb03d7165a5.tar.gz
mana-f040982c3df5003412ffc634d04f0eb03d7165a5.tar.bz2
mana-f040982c3df5003412ffc634d04f0eb03d7165a5.tar.xz
mana-f040982c3df5003412ffc634d04f0eb03d7165a5.zip
CI: Use ccache to cache compiler results
-rw-r--r--.gitlab-ci.yml12
1 files changed, 11 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0cbe67e0..b2fae39e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,11 +8,19 @@ ubuntu-build:
- UBUNTU_VERSION: "20.04"
- UBUNTU_VERSION: "22.04"
image: ubuntu:$UBUNTU_VERSION
+ cache:
+ paths:
+ - ccache
+ before_script:
+ - export CCACHE_BASEDIR="$PWD"
+ - export CCACHE_DIR="$PWD/ccache"
+ - export CCACHE_COMPILERCHECK=content
script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get update
- apt-get install -y
build-essential
+ ccache
cmake
gettext
libcurl4-openssl-dev
@@ -26,8 +34,10 @@ ubuntu-build:
libsdl2-ttf-dev
libxml2-dev
ninja-build
- - cmake -G Ninja -B build .
+ - ccache --zero-stats || true
+ - cmake -G Ninja -B build . -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- cmake --build build
+ - ccache --show-stats
macos-build:
stage: build