Skip to content

Commit

Permalink
github-actions: cache netmap checkout
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
victorjulien committed Oct 9, 2024
1 parent d5dd549 commit 3acf298
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2434,6 +2434,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
Expand Down Expand Up @@ -2489,12 +2496,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
Expand Down

0 comments on commit 3acf298

Please sign in to comment.