From dc952380d4f175affe42f30bebbf616aad91b47f Mon Sep 17 00:00:00 2001 From: Esko Luontola Date: Fri, 4 Oct 2024 15:23:51 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Cache=20Node.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why: - Previously, the CI downloaded Node.js on every build from https://nodejs.org/dist/v21.7.3/node-v21.7.3-linux-x64.tar.xz but nodejs.org is sometimes very slow. In the worst case, the binary is not found and nvm will attempt to compile Node.js from source. --- .semaphore/semaphore.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 81c74a72..7e59fbe4 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -20,6 +20,7 @@ blocks: - name: Build commands: - cache restore + - cache restore nvm-$(checksum .tool-versions) - cache restore m2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum project.clj) - cache restore lein-$SEMAPHORE_GIT_BRANCH-revision-$(checksum project.clj) - sem-version java 17 @@ -33,6 +34,7 @@ blocks: - docker push luontola/territory-bro:ci - cache store + - cache store nvm-$(checksum .tool-versions) ~/.nvm/.cache - cache store m2-$SEMAPHORE_GIT_BRANCH-revision-$(checksum project.clj) ~/.m2 - cache store lein-$SEMAPHORE_GIT_BRANCH-revision-$(checksum project.clj) ~/.lein/self-installs