From 473e4fd40031dfc2edceac5c41a677db50f9cfa6 Mon Sep 17 00:00:00 2001 From: tecnovert Date: Wed, 29 Jan 2025 07:55:02 +0200 Subject: [PATCH] Fix CI caching --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66de431..47fc544 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,9 @@ jobs: - name: Install run: | pip install . + # Print the core versions to a file for caching + basicswap-prepare --version --withcoins=bitcoin | tail -n +2 > core_versions.txt + cat core_versions.txt - name: Running flake8 run: | flake8 --ignore=E203,E501,W503 --exclude=basicswap/contrib,basicswap/interface/contrib,.eggs,.tox,bin/install_certifi.py @@ -44,12 +47,11 @@ jobs: uses: actions/cache@v3 env: cache-name: cache-cores - CACHE_KEY: $(printf $(python bin/basicswap-prepare.py --version --withcoins=bitcoin) | sha256sum | head -c 64) with: - path: $BIN_DIR - key: $CACHE_KEY + path: /tmp/cached_bin + key: cores-${{ runner.os }}-${{ hashFiles('**/core_versions.txt') }} - - if: ${{ steps.cache-yarn.outputs.cache-hit != 'true' }} + - if: ${{ steps.cache-cores.outputs.cache-hit != 'true' }} name: Running basicswap-prepare run: | basicswap-prepare --bindir="$BIN_DIR" --preparebinonly --withcoins=particl,bitcoin,monero