Skip to content

chore: CI: fold Linux Lake into Linux release - #13759

Merged
Garmelon merged 2 commits into
leanprover:masterfrom
Kha:push-kmykurslmpkr
May 18, 2026
Merged

Garmelon merged 2 commits into
leanprover:masterfrom
Kha:push-kmykurslmpkr

Conversation

@Kha

@Kha Kha commented May 16, 2026

Copy link
Copy Markdown
Member

Now that they both use Lake, there's little reason for the duplication

@Kha
Kha requested review from Garmelon and tydeu May 16, 2026 17:52
@Kha
Kha requested a review from kim-em as a code owner May 16, 2026 17:52
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label May 16, 2026
@mathlib-lean-pr-testing

Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase ef2dc0f66aec683f6f1d18bc04cb7593687e5855 --onto 803553a556fd82fa1060efb0c43eda542130cb16. You can force Mathlib CI using the force-mathlib-ci label. (2026-05-16 19:21:07)

@leanprover-bot

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase ef2dc0f66aec683f6f1d18bc04cb7593687e5855 --onto 803553a556fd82fa1060efb0c43eda542130cb16. You can force reference manual CI using the force-manual-ci label. (2026-05-16 19:21:09)

@Garmelon Garmelon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, one fewer build configurations.

@Kha
Kha added this pull request to the merge queue May 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 18, 2026
@Garmelon
Garmelon added this pull request to the merge queue May 18, 2026
Merged via the queue into leanprover:master with commit e09155b May 18, 2026
23 of 24 checks passed
@Kha
Kha deleted the push-kmykurslmpkr branch May 26, 2026 17:19
JJYYY-JJY pushed a commit to JJYYY-JJY/lean4 that referenced this pull request Jul 24, 2026
This PR restores reuse of the Lake artifact cache across core CI builds.

Since leanprover#13759, the `Linux Lake (Cached)` job downloaded the cache but
still rebuilt everything, because the cache trace is keyed on
`Lean.githash`, which is the commit hash on the release job that
produces the cache, but the stage0 tree hash on the non-release job that
consumes it. To fix this, the Lean trace Lake uses is overriden via
`LEAN_GITHASH` to be the stage0 tree hash (rather than whatever
`Lean.githash` may be). This ensures so stage1 `.olean`s are reusable
across commits that do not touch stage0. The override affects only the
cache trace, not the compiled `.olean`s, which still embed the same
`Lean.githash`.

Release builds cannot reuse `.olean`s embedded with a different
`Lean.githash`. Nonetheless, this change would allow Lake to reuse them
if they have the same stage0. To avoid this, restoring `.olean`s from
the cache is now completely disabled for release builds. In practice,
this is pure savings, as the `.olean`s restored from the cache during
release builds were unused anyway due to the mismatched githash.

Implementation-wise, CMake serves as the single source of truth for
`LEAN_GITHASH`: it computes the stage0 tree hash once, embeds it as the
non-release `Lean.githash` (as before), and passes it to Lake as
`LEAN_GITHASH` for the core build (via `stdlib.make`). CI reads the file
and sets `LEAN_GITHASH` in the CI job environment so that the standalone
`lake cache` steps use the same key. The hash is computed with `git
rev-parse HEAD:stage0` rather than the previous `git ls-tree HEAD
"{}/../../stage0" --object-only`, because it is now also needed at stage
1 where that relative path does not apply. Both commands return the same
tree object hash.

🤖 Prepared with Claude Code

---------

Co-authored-by: Claude Code <[email protected]>
robsimmons pushed a commit that referenced this pull request Jul 29, 2026
This PR restores reuse of the Lake artifact cache across core CI builds.

Since #13759, the `Linux Lake (Cached)` job downloaded the cache but
still rebuilt everything, because the cache trace is keyed on
`Lean.githash`, which is the commit hash on the release job that
produces the cache, but the stage0 tree hash on the non-release job that
consumes it. To fix this, the Lean trace Lake uses is overriden via
`LEAN_GITHASH` to be the stage0 tree hash (rather than whatever
`Lean.githash` may be). This ensures so stage1 `.olean`s are reusable
across commits that do not touch stage0. The override affects only the
cache trace, not the compiled `.olean`s, which still embed the same
`Lean.githash`.

Release builds cannot reuse `.olean`s embedded with a different
`Lean.githash`. Nonetheless, this change would allow Lake to reuse them
if they have the same stage0. To avoid this, restoring `.olean`s from
the cache is now completely disabled for release builds. In practice,
this is pure savings, as the `.olean`s restored from the cache during
release builds were unused anyway due to the mismatched githash.

Implementation-wise, CMake serves as the single source of truth for
`LEAN_GITHASH`: it computes the stage0 tree hash once, embeds it as the
non-release `Lean.githash` (as before), and passes it to Lake as
`LEAN_GITHASH` for the core build (via `stdlib.make`). CI reads the file
and sets `LEAN_GITHASH` in the CI job environment so that the standalone
`lake cache` steps use the same key. The hash is computed with `git
rev-parse HEAD:stage0` rather than the previous `git ls-tree HEAD
"{}/../../stage0" --object-only`, because it is now also needed at stage
1 where that relative path does not apply. Both commands return the same
tree object hash.

🤖 Prepared with Claude Code

---------

Co-authored-by: Claude Code <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants