Files
Daniele 905fc54775
Nightly Build / build (push) Successful in 9m28s
ci: build from a persistent tree instead of the runner workspace
The previous commit tried to fix the mtime invalidation with
`git restore-mtime`. It does not work on this box, in the worst way: the
packaged version (2022.12) drives `git whatchanged`, which git 2.53
refuses to run without --i-still-use-this — and the tool swallows that
failure and exits 0 having updated nothing. Verified on the runner: "0
commits evaluated, 675 files missing, 0 files updated", while the job
happily went on to rebuild everything.

Fix the cause instead of the symptom. Both building workflows now sync a
tree that survives between runs and build there. `git checkout` only
rewrites files whose content actually changed, so mtimes are correct as a
consequence rather than as a reconstruction — and no external tool is
involved. Gitea serves this repo from the same machine the runner runs
on, so the sync reads the bare repo directly: no network, no token.

Two properties this buys that restore-mtime did not:

- The absolute source path is pinned. The runner derives its workspace
  path from the job definition, so editing a workflow moved it and
  invalidated every workspace crate by itself — the previous commit paid
  that cost without knowing it.
- It cannot fail towards staleness. Checking out an older commit stamps
  those files newer, which costs an extra rebuild; restore-mtime moved
  mtimes backwards, which could have let cargo reuse artifacts built from
  newer code.

Each workflow gets its own tree, for the same reason they already have
their own CARGO_TARGET_DIR: they track different branches, and one shared
tree would rewrite half the files on every switch.
2026-08-10 18:27:21 +01:00
..