Skip to content

Shorten the slowest CI legs: website build, format check, rewatch polling - #9302

Merged
cknitt merged 3 commits into
masterfrom
ci-faster-pr-legs
Nov 14, 2026
Merged

cknitt merged 3 commits into
masterfrom
ci-faster-pr-legs

Conversation

@cknitt

@cknitt cknitt commented Nov 14, 2026

Copy link
Copy Markdown
Member

A PR run takes about 12.5 minutes (median of 12 recent runs). The run waits for the slowest build-compiler leg: ARM 557 s, Windows 550 s, macOS 459 s. This PR shortens all three.

  • Website build only for new API docs. The website build (about 3.5 min on ARM) ran on every PR. The "docs changed" check always found a change: the copied .gitkeep showed up as untracked, and the website's v13 branch has older docs than master. Now an empty cache entry, keyed on the website commit and the hash of scripts/res/apiDocs, records each successful build. A PR whose docs match an earlier build skips the website checkout, Node setup and build. The first PR after the website branch moves still builds once.
  • Format check only on Linux. It gives the same result everywhere, but took 25 s on Windows and 18 s on macOS.
  • Faster polling in the canonical rewatch tests. The canonical suite is the slowest part of the rewatch step on every platform (Windows 224 s, macOS 221 s, ARM 120 s). Its ~150 waits polled once a second. They now poll every 0.1 s, with the timeouts still in seconds. Locally, watch tests went from 6.9 s to 3.7 s, 4.1 s to 0.5 s, and 16.3 s to 10.1 s.

Together this should bring a PR run to about 10.5 minutes. The real numbers will show up in this PR's CI.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gG8vKzkJGrU7AZ1CXQ

cknitt and others added 3 commits November 14, 2026 09:16
The website build ran on every pull request: the check for changed docs
always found the copied .gitkeep and the website branch's older docs. An
empty cache entry keyed on the website commit and the docs hash now
records each build, so the ARM job skips about 3.5 minutes when the docs
match an earlier build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gG8vKzkJGrU7AZ1CXQ
Signed-off-by: Christoph Knittel <ck@cca.io>
The format check gives the same result on every platform but took 25 s
on Windows and 18 s on macOS, both on the critical path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gG8vKzkJGrU7AZ1CXQ
Signed-off-by: Christoph Knittel <ck@cca.io>
The canonical suite is the slowest part of each platform's rewatch step,
and its waits polled once a second, so each of its ~150 waits took up to
a second too long. Timeouts stay in seconds. Locally, the passing watch
tests took 3.7 s instead of 6.9 s, 0.5 s instead of 4.1 s and so on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gG8vKzkJGrU7AZ1CXQ
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt cknitt added the changelog:skip No release notes needed label Nov 14, 2026
@github-actions

Copy link
Copy Markdown

Changelog

No changelog entry.

Semantic Diff

3 commits · Full page

Build the website in CI only for API docs it hasn't built yet

adc28e5 · cknitt + Claude · Nov 14, 2026, 09:16 UTC

The website build ran on every pull request: the check for changed docs always found the copied .gitkeep and the website branch's older docs. An empty cache entry keyed on the website commit and the docs hash now records each build, so the ARM job skips about 3.5 minutes when the docs match an earlier build.

Check formatting only on Linux in CI

adc3052 · cknitt + Claude · Nov 14, 2026, 09:16 UTC

The format check gives the same result on every platform but took 25 s on Windows and 18 s on macOS, both on the critical path.

Poll every 0.1 s in the build system's canonical tests

4f18f1e · cknitt + Claude · Nov 14, 2026, 09:16 UTC

The canonical suite is the slowest part of each platform's rewatch step, and its waits polled once a second, so each of its ~150 waits took up to a second too long. Timeouts stay in seconds. Locally, the passing watch tests took 3.7 s instead of 6.9 s, 0.5 s instead of 4.1 s and so on.

@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 (1efa212) to head (4f18f1e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9302      +/-   ##
==========================================
- 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.

@github-actions

Copy link
Copy Markdown

✅ Compiler benchmarks

Allocated words

In total: 640,952,947 → 640,952,815 (±0.00%).

Generated projects: 920,897,791 → 920,897,145 (±0.00%).

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

Instructions

In total: 9,209,713,740 → 9,209,713,740 (±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 4f18f1e compared with base 1efa212 in this run.

@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@9302

@rescript/belt

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

@rescript/darwin-arm64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

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

@rescript/win32-x64

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

commit: 4f18f1e

@github-actions

Copy link
Copy Markdown

@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 10:05
@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-14T10:06:56.305027Z 4f18f1e 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. Keep it up!

Reviewed commit: 4f18f1eec4

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

@cknitt
cknitt merged commit c1927e6 into master Nov 14, 2026
36 of 37 checks passed
@cknitt
cknitt deleted the ci-faster-pr-legs branch November 14, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:skip No release notes needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants