The CI Challenge: save 10% or get $1,000

Touch the restored Go build cache so the job's first command cannot trim it

Marking restored entries as used lets a later plain build reuse them, so it stops recompiling every package.

How OpenClaw used this technique

Read what OpenClaw changed and follow the original sources.

Touch the restored Go build cache so the job's first command cannot trim it

Marking restored entries as used lets a later plain build reuse them, so it stops recompiling every package.

In each race shard, the first test that builds the CLI went from a mean of 135 s to 30 s on CI, two runs each side on the same head and shard assignment. Source

Shard go test time fell by about 110 s. Source

Use it when
A Go job restores a build cache saved days ago and runs go commands with different flags, for example race tests and then a plain go build, and the later build recompiles most packages despite the cache hit.
Before applying it
The touch step took 0 to 1 seconds and runs right after setup-go restores the cache.

Company Playbooks