Skip to content

Build the dev container in CI only when its inputs change - #9298

Merged
cknitt merged 1 commit into
masterfrom
ci-devcontainer-paths
Nov 14, 2026
Merged

cknitt merged 1 commit into
masterfrom
ci-devcontainer-paths

Conversation

@cknitt

@cknitt cknitt commented Nov 14, 2026

Copy link
Copy Markdown
Member

test-devcontainer built the dev container from scratch on every pull request: about 10 minutes on an ARM runner, for a job that only fails when the dev setup itself breaks.

Now the job first lists the pull request's files (gh pr diff --name-only), and builds the container only if one of its inputs changed:

  • .devcontainer/ (Dockerfile, devcontainer.json, postCreate.sh)
  • the opam dependencies that postCreate.sh installs: *.opam, *.opam.template, dune-project
  • the yarn dependencies it installs: any package.json, yarn.lock, .yarnrc.yml, .yarn/
  • the Makefile, whose make is the job's command
  • ci.yml itself

Pushes to master and maintenance/* always build it. If the file list can't be fetched (e.g. a diff too large for the API), the job builds as before.

The job always runs and only skips its two expensive steps, so ci-ok still sees it succeed and needs no change. This PR touches ci.yml, so its own run still builds the container.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe

The test-devcontainer job built the container from scratch on every pull
request, about 10 minutes. It now lists the pull request's files first
and builds only when the container definition, the opam or yarn
dependencies its setup installs, the Makefile or ci.yml change; pushes,
and pull requests whose files can't be listed, still build it. The job
always runs, so ci-ok still sees it succeed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe
Signed-off-by: Christoph Knittel <ck@cca.io>
@github-actions

Copy link
Copy Markdown

Changelog

🏠 Internal

  • Build the dev container in CI only for pull requests that change its inputs.

Semantic Diff

1 commit · Full page

Build the dev container in CI only when its inputs change

a0ce9cd · cknitt + Claude · Nov 14, 2026, 08:13 UTC

The test-devcontainer job built the container from scratch on every pull request, about 10 minutes. It now lists the pull request's files first and builds only when the container definition, the opam or yarn dependencies its setup installs, the Makefile or ci.yml change; pushes, and pull requests whose files can't be listed, still build it. The job always runs, so ci-ok still sees it succeed.

@github-actions

Copy link
Copy Markdown

✅ Compiler benchmarks

Allocated words

In total: 640,946,715 → 640,946,907 (±0.00%).

Generated projects: 920,886,741 → 920,886,066 (±0.00%).

None of the 265 benchmarks changed by 0.1% or more.

Instructions

In total: 9,209,713,560 → 9,209,713,560 (±0.00%).

None of the 33 benchmarks changed by 0.1% or more.

Output size

In total: 25,843,406 → 25,843,406 (±0.00%).

None of the 13 benchmarks changed by 0.1% or more.

Pull request a0ce9cd compared with base ed08a8c in this run.

@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.06%. Comparing base (ed08a8c) to head (a0ce9cd).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9298      +/-   ##
==========================================
- Coverage   82.06%   82.06%   -0.01%     
==========================================
  Files         455      455              
  Lines       65399    65399              
==========================================
- Hits        53672    53670       -2     
- Misses      11727    11729       +2     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cknitt

cknitt commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

@codex review

@cknitt
cknitt marked this pull request as ready for review November 14, 2026 08:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T08:21:48.029033Z a0ce9cd Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: a0ce9cdb82

ℹ️ 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".

@pkg-pr-new

pkg-pr-new Bot commented Nov 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@9298

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@9298

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@9298

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@9298

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@9298

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@9298

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@9298

commit: a0ce9cd

@cknitt
cknitt enabled auto-merge (squash) November 14, 2026 08:24
@github-actions

Copy link
Copy Markdown

@cknitt
cknitt merged commit 1efa212 into master Nov 14, 2026
22 checks passed
@cknitt
cknitt deleted the ci-devcontainer-paths branch November 14, 2026 08:38
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.

2 participants