diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5e7062..029b037 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,18 +58,18 @@ jobs: echo "OS version: $OS_VERSION" echo "os_version=$OS_VERSION" >> $GITHUB_OUTPUT - - name: Cache CLN + - name: Restore CLN cache id: cache-cln - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: path: | /usr/local/bin/lightning* /usr/local/libexec/c-lightning key: cache-cln-${{ inputs.cln-version }}-${{ steps.exact_versions.outputs.os_version }} - - name: Cache bitcoind + - name: Restore bitcoind cache id: cache-bitcoind - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: path: /usr/local/bin/bitcoin* key: cache-bitcoind-${{ matrix.bitcoind-version }}-${{ steps.exact_versions.outputs.os_version }} @@ -90,6 +90,13 @@ jobs: sudo mv bitcoin-${BITCOIND_VERSION}/bin/* /usr/local/bin rm -rf bitcoin-${BITCOIND_VERSION}-${TARGET_ARCH}.tar.gz bitcoin-${BITCOIND_VERSION} + - name: Save bitcoind cache + id: save-cache-bitcoind + uses: actions/cache/save@v4 + with: + path: /usr/local/bin/bitcoin* + key: ${{ steps.cache-bitcoind.outputs.cache-primary-key }} + - name: Download Core Lightning ${{ inputs.cln-version }} & install binaries if: ${{ contains(matrix.os, 'ubuntu') && steps.cache-cln.outputs.cache-hit != 'true' }} run: | @@ -100,6 +107,15 @@ jobs: sudo tar -xvf ${url##*/} -C /usr/local --strip-components=2 echo "CLN_VERSION=$(lightningd --version)" >> "$GITHUB_OUTPUT" + - name: Restore CLN cache + id: save-cache-cln + uses: actions/cache/save@v4 + with: + path: | + /usr/local/bin/lightning* + /usr/local/libexec/c-lightning + key: ${{ steps.cache-cln.outputs.cache-primary-key }} + - name: Set up Rust if: ${{ inputs.tagged-release == false}} uses: dtolnay/rust-toolchain@stable