Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST cache netmap github checkout #11914

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git clone seems to work better than actions/checkout in #11903

But not sure it is a good path to follow

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the checkout action is more idiomatic

with:
repository: luigirizzo/netmap
# gets cloned to $GITHUB_WORKSPACE/netmap/
path: netmap/

- name: Save Netmap Cache
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also cache the compilation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to add additional complexity, this is just about avoiding the rate limit issue

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
104 changes: 52 additions & 52 deletions rust/Cargo.lock.in

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading