From 354d6a9aab6868832fb999a68d7b63f3aab34b32 Mon Sep 17 00:00:00 2001 From: pasta Date: Thu, 24 Oct 2024 18:54:41 -0500 Subject: [PATCH] ci: cache depends sources in a seperate step --- .github/workflows/build.yml | 10 ++++++++++ .github/workflows/guix-build.yml | 9 ++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 106ec66e15..d3f5651892 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -91,6 +91,16 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} + - name: Cache depends sources + uses: actions/cache@v4 + with: + path: | + depends/sources + # We don't care about no specific key as depends system will handle that for us + key: depends-sources-${{ hashFiles('depends/packages/*') }} + restore-keys: | + depends-sources- + - name: Cache dependencies uses: actions/cache@v4 with: diff --git a/.github/workflows/guix-build.yml b/.github/workflows/guix-build.yml index 1f7722abef..cc37826496 100644 --- a/.github/workflows/guix-build.yml +++ b/.github/workflows/guix-build.yml @@ -79,6 +79,14 @@ jobs: path: dash fetch-depth: 0 + - name: Cache depends sources + uses: actions/cache@v4 + with: + path: dash/depends/sources + key: depends-sources-${{ hashFiles('dash/depends/packages/*') }} + restore-keys: | + depends-sources- + - name: Cache Guix and depends id: guix-cache-restore uses: actions/cache@v3 @@ -86,7 +94,6 @@ jobs: path: | ${{ github.workspace }}/.cache ${{ github.workspace }}/dash/depends/built - ${{ github.workspace }}/dash/depends/sources ${{ github.workspace }}/dash/depends/work /gnu/store key: ${{ runner.os }}-guix-${{ matrix.build_target }}-${{ github.sha }}