Skip to content

CI: narrow build-dir reset stamp to headers and cache options - #2194

Draft
pvelesko wants to merge 1 commit into
mainfrom
issue-2193-ci-stamp
Draft

pvelesko wants to merge 1 commit into
mainfrom
issue-2193-ci-stamp

Conversation

@pvelesko

Copy link
Copy Markdown
Collaborator

The self-hosted unit-test lanes wiped their persistent build tree whenever the stamp changed, and the stamp hashed every non-source file path plus full CMakeLists/.cmake contents, so runners alternating between PRs rebuilt from scratch almost every run. Ninja and CMake already track content edits, so the stamp now covers only what they cannot see: the LLVM install, the workflow file, the list of header paths (a new header can shadow an included one) and the option()/CACHE lines of the CMake files (CMake keeps cached values).

The first run on each runner after this lands still wipes once, since the stamp format changed. ccache on k3 being full is a separate problem.

Fixes #2193

This PR was generated using AI

The stamp hashed the path of every non-source file and the full
contents of every CMakeLists.txt and .cmake file. Runners that
alternate between PRs therefore saw a different stamp on almost every
run and wiped the build tree each time (k3 runs started ninja at
[1/1008], about 40 min per lane).

Ninja depfiles already track source and header contents, and CMake
re-runs itself when a CMakeLists changes. The rebuilt-LLVM case is
covered by the LLVM install listing (PR #2074 deps). So the stamp now
keeps only what ninja cannot see: the LLVM install, the list of header
paths (a new header can shadow an already included one), and the
option()/CACHE lines of the CMake files (CMake keeps cached values
across a re-run). The workflow file itself stays in the stamp.

Fixes #2193.

This branch has not been deployed

No deployments
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.

CI build dir reset stamp wipes the persistent build trees on almost every run, so self-hosted lanes rebuild from scratch

1 participant