Skip to content

Cache ort download folder in CI and release workflows - #390

Merged
neich merged 1 commit into
mainfrom
fi/ci
Nov 18, 2026
Merged

neich merged 1 commit into
mainfrom
fi/ci

Conversation

@neich

@neich neich commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Summary

The CI and release workflows set ORT_CACHE_DIR to a workspace folder (.ort-cache). Swatinem/rust-cache only saves ~/.cargo and target/ by default, so that folder was never cached. This change adds it to each rust-cache step, so cached runs no longer re-download ONNX Runtime from cdn.pyke.io. A CDN hiccup should then no longer fail a cached run.

Changes

  • .github/workflows/ci.yml: add cache-directories: .ort-cache to both Swatinem/rust-cache@v2 steps (the check/clippy job and the Windows test job).
  • .github/workflows/release.yml: add cache-directories: .ort-cache to the rust-cache step, next to the existing per-target key.
  • Update the ORT_CACHE_DIR comments in both files to describe the new behavior.

Testing

  • git diff --check origin/main...HEAD
  • cargo test (skipped: only runs with --run-tests)

The workflow changes themselves were not run, so the cache hit behavior is unverified until the workflows run on this branch.

Risks / Notes

  • Workflow-only change. No Rust code or generated files are touched.
  • The first run after merge will still download ONNX Runtime and populate the cache. Later runs are the ones that benefit.
  • cache-directories is a relative path, resolved from the workspace root. It matches the ORT_CACHE_DIR value ${{ github.workspace }}/.ort-cache.

Adds .ort-cache to the rust-cache cache-directories in the CI and
release workflows, since rust-cache only saves ~/.cargo and target/ by
default. A cdn.pyke.io hiccup can then no longer fail a run that already
has the ONNX Runtime binaries cached, and the env comments now explain
this.
@neich
neich merged commit 1e9a8a2 into main Nov 18, 2026
@neich
neich deleted the fi/ci branch November 18, 2026 21:07
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