From c429aa053f761dd74e2c278bf608c06fb8bcd8c0 Mon Sep 17 00:00:00 2001 From: Ignacio Martin Date: Wed, 18 Nov 2026 22:07:04 +0100 Subject: [PATCH] Cache the ort download folder in CI and release workflows 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. --- .github/workflows/ci.yml | 10 ++++++++-- .github/workflows/release.yml | 7 +++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a80c1e61..0babfbe2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,8 +8,10 @@ on: env: CARGO_TERM_COLOR: always - # ort's build script downloads prebuilt ONNX Runtime binaries; keep them - # inside the workspace so Swatinem/rust-cache picks them up. + # ort's build script downloads prebuilt ONNX Runtime binaries from + # cdn.pyke.io; keep them in the workspace and list the folder in each + # rust-cache step's `cache-directories` (rust-cache only saves ~/.cargo + # and target/ by default) so a CDN hiccup can't fail a cached run. ORT_CACHE_DIR: ${{ github.workspace }}/.ort-cache jobs: @@ -26,6 +28,8 @@ jobs: with: components: clippy - uses: Swatinem/rust-cache@v2 + with: + cache-directories: .ort-cache - name: cargo check run: cargo check --workspace --all-targets --locked # Clippy 1.97 fires ~156 new style lints (mostly collapsible_if @@ -46,6 +50,8 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + with: + cache-directories: .ort-cache # Full test suite under MSVC, including the C-dependency chain # (bundled SQLite, sqlite-vec, tree-sitter grammars, libgit2, zstd). # Network/model tests stay #[ignore]d. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f53cb191..23f47930 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,8 +34,10 @@ concurrency: env: CARGO_TERM_COLOR: always - # ort's build script downloads prebuilt ONNX Runtime binaries; keep them - # inside the workspace so Swatinem/rust-cache picks them up. + # ort's build script downloads prebuilt ONNX Runtime binaries from + # cdn.pyke.io; keep them in the workspace and list the folder in the + # rust-cache step's `cache-directories` (rust-cache only saves ~/.cargo + # and target/ by default). ORT_CACHE_DIR: ${{ github.workspace }}/.ort-cache TAG: ${{ inputs.tag || github.ref_name }} @@ -102,6 +104,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: key: release-${{ matrix.target }} + cache-directories: .ort-cache # The three binaries must ship side by side: gaviero finds # gaviero-cli (agent hooks) and gaviero-mcp-shim (MCP bridge) next to