8000
Skip to content

ci: pilot V build cache in toml CI - #28041

Open
ulises-jeremias wants to merge 1 commit into
vlang:masterfrom
ulises-jeremias:ci/toml-cache-pilot
Open

ci: pilot V build cache in toml CI#28041
ulises-jeremias wants to merge 1 commit into
vlang:masterfrom
ulises-jeremias:ci/toml-cache-pilot

Conversation

@ulises-jeremias
@ulises-jeremias ulises-jeremias commented Aug 6, 2026
Copy link
Copy Markdown
Member

Refs #27844. Part of #27835.

Pilot for #27844 β€” not closing yet (2B will expand after hit-rate).

What

  • Add actions/cache@v4 for v binary in toml_ci.yml before setup-v:
    • path: v, key: v-toml-${{ runner.os }}-${{ hashFiles('cmd/**','vlib/**','thirdparty/**','make*','.github/actions/setup-v/**') }}, restore-keys: v-toml-${{ runner.os }}-

Why

Validation

  • ruby -ryaml YAML ok, setup-v still runs (cache restore before build, no behavior change on miss).
  • hashFiles covers V source that invalidates binary; stale binary risk is cache miss only.

Risk

Stack

  • Independent of sanitized stack (base master). Tracked separately; will be rebased if needed.

Pilot actions/cache@v4 for V binary with key v-toml-${{ runner.os }}-
hashFiles(cmd/**,vlib/**,thirdparty/**,make*,.github/actions/setup-v/**)
stacked before setup-v; restore-keys fallback. Limited to toml_ci.yml to
measure hit-rate before expanding. Refs vlang#27835, vlang#27844.
@ulises-jeremias
ulises-jeremias marked this pull request as ready for review August 6, 2026 16:34
@medvednikov
Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d85e5fda2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- name: Cache V build
uses: actions/cache@v4
with:
path: v
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Skip setup-v when the V binary cache hits

In toml-module-pass-external-test-suites, every cache hit is immediately followed by the composite setup action, whose .github/actions/setup-v/action.yml lines 48–53 unconditionally run make. The GNUmakefile declares all phony and its recipe always bootstraps v1/v2 and overwrites ./v, so the restored binary cannot reduce build time and instead adds cache restore/save overhead. Gate the build on the cache-hit output, or cache build inputs that make can actually reuse.

Useful? React with πŸ‘Β / πŸ‘Ž.

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: evaluate safe caching of V build artifacts

2 participants

0