From e381395b2d16d2715552fc030fc059892c1d609e Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 22 Jan 2020 13:41:51 +0100 Subject: [PATCH] Move cache outside of build-dYYMMDD directory so it can be cached Travis allows us to cache directories between builds. Let make it easier. --- .travis.yml | 4 ++++ Makefile | 2 +- bin/build-release | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0aef7d4..71f4bb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,10 @@ dist: bionic language: bash # same as minimal +cache: + directories: + - $HOME/build/$TRAVIS_REPO_SLUG/../ccache + - $HOME/build/$TRAVIS_REPO_SLUG/../download install: - bin/system-setup diff --git a/Makefile b/Makefile index 11a88c2..caeec80 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ DISK_IMG = $(OUT_D)/disk.img PART_IMG = $(OUT_D)/part.img TAR_IMG = $(OUT_D)/rootfs.tar BR_TAR_IMG = $(BR_OUT_D)/images/rootfs.tar -BR2_CCACHE_DIR = $(OUT_D)/ccache +BR2_CCACHE_DIR = $(TOP_D)/ccache/$(ARCH) BR_MAKE = cd $(BR_D) && mkdir -p "$(TMPDIR)" && \ make O=$(BR_OUT_D) BR2_DL_DIR=$(DL_D) \ diff --git a/bin/build-release b/bin/build-release index 38d39d3..cba9439 100755 --- a/bin/build-release +++ b/bin/build-release @@ -188,6 +188,8 @@ logevent "end kernel and grub downloads" "$kstart" # STAGE 2: BUILD jobs_flag="" parallel=true +mkdir -p ../ccache +ln -snf ../ccache ccache case "${CIRROS_PARALLEL:-none}" in none) parallel=false;; 0|true) :;;