From 0dc55fc449c69ae65a606a524431ccf283b3077b Mon Sep 17 00:00:00 2001 From: tecnovert Date: Thu, 28 Nov 2024 22:57:11 +0200 Subject: [PATCH] ci: Fix cache key. --- .github/workflows/ci.yml | 8 ++++++-- basicswap/bin/prepare.py | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8dee10..0061673 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,10 @@ name: ci on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: BIN_DIR: /tmp/cached_bin TEST_RELOAD_PATH: /tmp/test_basicswap1 @@ -40,9 +44,10 @@ 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: python bin/basicswap-prepare.py --version --withcoins=bitcoin,monero + key: "$CACHE_KEY" - if: ${{ steps.cache-yarn.outputs.cache-hit != 'true' }} name: Running basicswap-prepare @@ -55,4 +60,3 @@ jobs: mkdir -p ${TEST_RELOAD_PATH}/bin cp -r $BIN_DIR/* ${TEST_RELOAD_PATH}/bin/ pytest tests/basicswap/extended/test_encrypted_xmr_reload.py - diff --git a/basicswap/bin/prepare.py b/basicswap/bin/prepare.py index d5ba5ff..f1909d9 100644 --- a/basicswap/bin/prepare.py +++ b/basicswap/bin/prepare.py @@ -1515,17 +1515,17 @@ def modify_tor_config( def printVersion(with_coins): - logger.info(f"Basicswap version: {__version__}") + print(f"Basicswap version: {__version__}") if len(with_coins) < 1: return - logger.info("Core versions:") + print("Core versions:") with_coins_changed: bool = False if len(with_coins) == 1 and "particl" in with_coins else True for coin, version in known_coins.items(): if with_coins_changed and coin not in with_coins: continue postfix = " (Disabled)" if coin in disabled_coins else "" - logger.info("\t%s: %s%s%s", coin.capitalize(), version[0], version[1], postfix) + print("\t{}: {}{}{}".format(coin.capitalize(), version[0], version[1], postfix)) def printHelp():