ci: cache cargo registry and target dir on the Linux runner #27

Open
opened 2026-11-11 08:02:37 +00:00 by charles · 0 comments
Owner

The plan (Task 1, Step 5) asks the Linux CI job to cache ~/.cargo/registry and target keyed on Cargo.lock. Task 1 shipped .forgejo/workflows/ci.yaml without a Linux cache:

  • the runners cannot fetch actions/* (see the fork's build-desktop.yaml header), so actions/cache is not an option;
  • the Linux job runs in an ephemeral ubuntu:22.04 container on eqemu-build, so nothing in it survives between runs unless the runner mounts a volume (container.volumes needs valid_volumes in the act_runner config, which this repo cannot see).

Windows is a persistent host runner and already reuses C:\\fcargo\\fluxer-native as its target dir.

Options: (a) add a container.volumes entry for a named docker volume holding CARGO_HOME and CARGO_TARGET_DIR, after confirming/adjusting the runner's valid_volumes; (b) sccache with a shared cache dir on the build host; (c) accept uncached Linux builds while the workspace is small and revisit once iced/wgpu land (Task 16+), when a cold build will take many minutes.

Found while implementing Task 1 (#1).

The plan (Task 1, Step 5) asks the Linux CI job to cache `~/.cargo/registry` and `target` keyed on `Cargo.lock`. Task 1 shipped `.forgejo/workflows/ci.yaml` without a Linux cache: - the runners cannot fetch `actions/*` (see the fork's `build-desktop.yaml` header), so `actions/cache` is not an option; - the Linux job runs in an ephemeral `ubuntu:22.04` container on `eqemu-build`, so nothing in it survives between runs unless the runner mounts a volume (`container.volumes` needs `valid_volumes` in the act_runner config, which this repo cannot see). Windows is a persistent host runner and already reuses `C:\\fcargo\\fluxer-native` as its target dir. Options: (a) add a `container.volumes` entry for a named docker volume holding `CARGO_HOME` and `CARGO_TARGET_DIR`, after confirming/adjusting the runner's `valid_volumes`; (b) `sccache` with a shared cache dir on the build host; (c) accept uncached Linux builds while the workspace is small and revisit once iced/wgpu land (Task 16+), when a cold build will take many minutes. Found while implementing Task 1 (#1).
charles added this to the Foundation milestone 2026-11-11 08:02:37 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#27
No description provided.