Skip to content

Fix usage of rust_cache in CI and CD#294

Merged
SeaSkyThe merged 1 commit intomainfrom
fix/rust_cache
Mar 20, 2026
Merged

Fix usage of rust_cache in CI and CD#294
SeaSkyThe merged 1 commit intomainfrom
fix/rust_cache

Conversation

@SeaSkyThe
Copy link
Copy Markdown
Member

@SeaSkyThe SeaSkyThe commented Mar 17, 2026

Description

Looks like we are never using Rust Cache, since the executable never finds Cargo.toml. This PR fixes the target folder used by rust_cache in CI/CD.

You can check any previous CI: https://github.com/spruceid/sprucekit-mobile/actions/runs/23024537471/job/66869108375#step:4:23 to see the error. And compare with the same step in this PR's CI.

Error:

Run Swatinem/rust-cache@v2
Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
    at ExecState._setResult (/home/runner/work/_actions/Swatinem/rust-cache/v2/dist/restore/index.js:9754:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/Swatinem/rust-cache/v2/dist/restore/index.js:9737:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/Swatinem/rust-cache/v2/dist/restore/index.js:9631:27)
    at ChildProcess.emit (node:events:524:28)
    at maybeClose (node:internal/child_process:1104:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  commandFailed: {
    command: 'cargo metadata --all-features --format-version 1 --no-deps',
    stderr: '\x1B[1m\x1B[91merror\x1B[0m: could not find `Cargo.toml` in `/home/runner/work/sprucekit-mobile/sprucekit-mobile` or any parent directory\n'
  }

Copy link
Copy Markdown
Member

@sbihel sbihel left a comment

Choose a reason for hiding this comment

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

Looks good. I don't know why it wasn't already the case but these changes make sense.

Now, if you encounter cache misses, it's probably because the cache limit of 10GB is too little. We can increase it if need be.

@SeaSkyThe SeaSkyThe merged commit 844c567 into main Mar 20, 2026
4 checks passed
@SeaSkyThe SeaSkyThe deleted the fix/rust_cache branch March 20, 2026 12:37
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.

2 participants