From 15ba27b3ed8ea2d646813fd529bb74627095385c Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 2 Apr 2020 21:49:56 -0700 Subject: [PATCH] add build caching using ccache --- .gitlab-ci.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b6faf5..d6d41f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,15 +1,28 @@ image: debian:10 +cache: + paths: + - ccache + build: stage: build - script: + before_script: - apt-get update - >- apt-get -y install build-essential git python3-dev python3-pip python3-setuptools python3-wheel pkg-config tcl-dev - libreadline-dev bison flex libffi-dev - + libreadline-dev bison flex libffi-dev ccache + - export PATH="/usr/lib/ccache:$PATH" + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" + - export CCACHE_COMPILERCHECK=content + - ccache --zero-stats || true + - ccache --show-stats || true + after_script: + - export CCACHE_DIR="$PWD/ccache" + - ccache --show-stats + script: - git clone --depth 1 https://github.com/YosysHQ/yosys.git yosys - pushd yosys - make config-gcc -- 2.30.2