From 9b6a1355acdccf327b2977024f052761f01389ea Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 9 Oct 2024 09:36:52 +0200 Subject: [PATCH] github-actions: cache netmap checkout To avoid build failures due to rate limiting, cache the netmap checkout. Explicitly restore and save to avoid the checkout action cleaning the checkout up before it can be stored in the cache. --- .github/workflows/builds.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 4f7d6fb38e..36e267e95d 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -2374,6 +2374,13 @@ jobs: needs: [prepare-deps, prepare-cbindgen] runs-on: ubuntu-22.04 steps: + - name: Restore Cache Netmap + uses: actions/cache/restore@v4 + id: netmap-cache + with: + path: netmap/ + key: netmap-git + # Cache Rust stuff. - name: Cache cargo registry uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 @@ -2429,12 +2436,20 @@ jobs: linux-headers-$(uname -r) - name: Checkout Netmap repository + if: steps.netmap-cache.outputs.cache-hit != 'true' uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 with: repository: luigirizzo/netmap # gets cloned to $GITHUB_WORKSPACE/netmap/ path: netmap/ + - name: Save Netmap Cache + if: steps.netmap-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: netmap/ + key: netmap-git + - name: Compile and install Netmap run: | cd $GITHUB_WORKSPACE/netmap/LINUX