From 2077365efcc8bca5eb3141a08d310d1582939462 Mon Sep 17 00:00:00 2001 From: auricom <27022259+auricom@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:55:52 +0200 Subject: [PATCH] ci: fix rocksdb cache save --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 12 +++++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e29f4229f1e..3239b746066a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,7 @@ jobs: run: ./.github/scripts/install-rocksdb.sh - name: Saves rocksdb libraries cache if: matrix.go-arch == 'amd64' && steps.install_rocksdb.outcome == 'success' - uses: actions/cache/restore@v4 + uses: actions/cache/save@v4 with: path: | /usr/local/lib/librocksdb.* diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b5ea960668e3..2995ea9a320c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -46,7 +46,7 @@ jobs: run: ./.github/scripts/install-rocksdb.sh - name: Saves rocksdb libraries cache if: steps.install_rocksdb.outcome == 'success' - uses: actions/cache/restore@v4 + uses: actions/cache/save@v4 with: path: | /usr/local/lib/librocksdb.* diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1df906f9906..2ffb23ad12e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -800,13 +800,16 @@ jobs: /usr/local/lib/librocksdb.* /usr/local/include/rocksdb key: ${{ runner.os }}-rocksdb-${{ env.ROCKSDB_VERSION }}-amd64 + - name: Install rocksdb deps + run: | + sudo apt-get update && sudo apt-get install -y libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev - name: Install rocksdb - if: env.GIT_DIFF && steps.cache-rocksdb.outputs.cache-hit != 'true' + if: steps.cache-rocksdb.outputs.cache-hit != 'true' id: install_rocksdb run: ./.github/scripts/install-rocksdb.sh - name: Saves rocksdb libraries cache if: steps.install_rocksdb.outcome == 'success' - uses: actions/cache/restore@v4 + uses: actions/cache/save@v4 with: path: | /usr/local/lib/librocksdb.* @@ -855,13 +858,16 @@ jobs: /usr/local/lib/librocksdb.* /usr/local/include/rocksdb key: ${{ runner.os }}-rocksdb-${{ env.ROCKSDB_VERSION }}-amd64 + - name: Install rocksdb deps + run: | + sudo apt-get update && sudo apt-get install -y libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev - name: Install rocksdb if: env.GIT_DIFF && steps.cache-rocksdb.outputs.cache-hit != 'true' id: install_rocksdb run: ./.github/scripts/install-rocksdb.sh - name: Saves rocksdb libraries cache if: steps.install_rocksdb.outcome == 'success' - uses: actions/cache/restore@v4 + uses: actions/cache/save@v4 with: path: | /usr/local/lib/librocksdb.*