Skip to content

Keep the build cache between CI runs - #781

Merged
lagergren merged 1 commit into
masterfrom
lagergren/ci-build-cache
Nov 18, 2026
Merged

lagergren merged 1 commit into
masterfrom
lagergren/ci-build-cache

Conversation

@lagergren

Copy link
Copy Markdown
Contributor

CI never reuses what an earlier run built. The local build cache lives in each checkout (.gradle/build-cache), to keep concurrent local builds of several checkouts apart, and every CI job starts with a new checkout. So every run compiles and tests the whole XDK: about 6.5 of the 9 minutes of the main Gradle build on the last green master run.

On CI (CI is set) the cache now stays in the Gradle user home (caches/build-cache-1). setup-gradle already saves that after master's runs, and restores it for later runs; pull requests only read it. Locally nothing changes. The root build and the three build-logic builds change the same way.

Merge order

Why it should be safe now

Things to know

The local build cache lives in each checkout, to keep concurrent builds
of several checkouts apart. CI builds one new checkout per job, so a run
never reused anything an earlier run built: every run compiled and tested
the whole XDK, about 6.5 of the 9 minutes of its main Gradle build.

On CI the cache now stays in the Gradle user home, where setup-gradle
saves it after master's runs and restores it for later runs, pull
requests included, which only read it. Locally nothing changes.
@lagergren
lagergren marked this pull request as ready for review November 18, 2026 11:20
@lagergren
lagergren merged commit e410669 into master Nov 18, 2026
5 checks passed
@lagergren
lagergren deleted the lagergren/ci-build-cache branch November 18, 2026 11:22
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.

1 participant