Skip to content

ci: add Cargo and kraft-hyperlight caching - #18

Merged
danbugs merged 1 commit into
mainfrom
ci-caching
May 13, 2026
Merged

ci: add Cargo and kraft-hyperlight caching#18
danbugs merged 1 commit into
mainfrom
ci-caching

Conversation

@danbugs

@danbugs danbugs commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds Swatinem/rust-cache to every job that runs cargo build/cargo test (host-checks, bench-linux, bench-windows, runtime-test, runtime-test-windows, pyhl-snapshot-test, publish-kernels)
  • Replaces manual curl Go tarball download with actions/setup-go@v5 across all workflows
  • Caches the kraft-hyperlight binary via actions/cache (keyed on workflow file hash) — skips the git clone + Go build on cache hit
  • Replaces cargo install --git with local cargo build --release on Windows jobs (bench-windows, runtime-test-windows, pyhl-snapshot-test) — avoids redundant repo clone and lets rust-cache take effect

Expected savings: ~3-8 min per Cargo job on cache hits, ~60-90s per kraft-hyperlight cache hit, eliminates redundant git clones on Windows.

- Add Swatinem/rust-cache to every job that runs cargo build/test
- Replace manual Go tarball download with actions/setup-go
- Cache kraft-hyperlight binary (keyed on workflow file hash)
- Replace cargo install --git with local cargo build on Windows
  (avoids re-cloning the repo; lets rust-cache take effect)

Signed-off-by: danbugs <danilochiarlone@gmail.com>
@danbugs
danbugs enabled auto-merge May 13, 2026 00:24
@danbugs
danbugs merged commit 9d37a86 into main May 13, 2026
23 checks passed
@danbugs
danbugs deleted the ci-caching branch May 13, 2026 00:25

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Linux Benchmarks

Details
Benchmark suite Current: 5fce4c3 Previous: 10bdc20 Ratio
hello_world (median) 20 ms 20 ms 1
pandas (median) 100 ms 120 ms 0.83
density (per VM) 6 MB 6 MB 1
snapshot (disk) 648 MiB 648 MiB 1

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Windows Benchmarks

Details
Benchmark suite Current: 5fce4c3 Previous: 10bdc20 Ratio
hello_world (median) 202 ms 281 ms 0.72
pandas (median) 652 ms 996 ms 0.65
density (per VM) 6 MB 6 MB 1
snapshot (disk) 673 MiB 673 MiB 1

This comment was automatically generated by workflow using github-action-benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant