Skip to content

Commit b8405ed

Browse files
cknittclaude
andcommitted
Runs CI on Ubuntu 26.04 and macOS 26 runners
Every workflow now pins the newest runner images: ubuntu-26.04 and ubuntu-26.04-arm replace ubuntu-24.04 and ubuntu-24.04-arm, macos-26 and macos-26-intel replace macos-15 and macos-15-intel, and the stale and branch cleanup jobs name ubuntu-26.04 instead of ubuntu-latest. Windows stays on windows-2025. The job that builds with the oldest supported OCaml (5.0.0) stays on ubuntu-24.04, because OCaml 5.0's runtime does not compile with GCC 15, which defaults to C23. The new images needed three CI and test fixes. The APT package lookup reports apt's output and fetches the package lists once before giving up. The watch-exit lock holder in rewatch-ocaml/tests/run.sh is a copied bash instead of a copied sleep, which uutils coreutils (Ubuntu 26.04) refuses to run under the name rescript. The --ppx-wait helper of the rewatch unit tests publishes its PID with a rename, so a test that polls for the marker never reads an empty file. Review: Is there a newer Windows runner? No. windows-2025 is the newest Windows Server image; windows-2025-vs2026 is the same image with Visual Studio 2026, which the MinGW build does not use. Review: Why did the APT lookup fail? On the first ubuntu-26.04 run, apt-cache policy exited with status 100 and no output in all four Linux jobs; the rerun on the same image (20261012.163.1) resolved every package on the first try. The cause is unknown: apt 3.0.3 does not reproduce it with or without package lists, nor when awk closes the pipe early. The lookup now prints apt's output if it recurs. Review: Does the lock holder still count as a rescript process? Yes. The owner check reads the basename of /proc/<pid>/exe on Linux and of ps -o comm= on macOS; both give rescript for the copied bash, which runs its loop in its own process instead of exec'ing sleep. Review: Why did escaped_exception fail on macos-26-intel? The test polls for the marker file and then reads the PID from it. The PPX created the file before writing to it, so a poll in between read an empty string (Failure "int_of_string"). This is a race in the test helper, not a macOS 26 change. Review: Do the APT and OPAM caches need new keys? No. The APT key hashes /etc/os-release and the OPAM key includes the runner label, so both rebuild on the new images. Area: ci rewatch tests Output: unchanged Tests: ~rewatch-ocaml/tests/run.sh ~tests/rewatch_ounit_tests/unit_tests.ml PR: #8891 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rR6jNpVHh7sx7L62iEf4u Signed-off-by: Christoph Knittel <ck@cca.io>
1 parent 58f1bd2 commit b8405ed

12 files changed

Lines changed: 59 additions & 32 deletions

File tree

‎.github/actions/setup-linux-dependencies/action.yml‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,27 @@ runs:
2323
read -ra packages <<< "$PACKAGES"
2424
mapfile -t packages < <(printf '%s\n' "${packages[@]}" | sort -u)
2525
26+
candidate() {
27+
local output
28+
output="$(apt-cache policy "$1" 2>&1)" || {
29+
echo "apt-cache policy $1 failed with exit code $?:" >&2
30+
printf '%s\n' "$output" >&2
31+
return 1
32+
}
33+
awk '/Candidate:/ { print $2; exit }' <<< "$output"
34+
}
35+
36+
# A runner image may ship without package lists, in which case no
37+
# candidate resolves until the lists are fetched.
38+
updated=false
2639
resolved_packages=()
2740
for package in "${packages[@]}"; do
28-
version="$(apt-cache policy "$package" | awk '/Candidate:/ { print $2; exit }')"
41+
version="$(candidate "$package")" || version=""
42+
if [[ ( -z "$version" || "$version" == "(none)" ) && "$updated" == false ]]; then
43+
sudo apt-get update
44+
updated=true
45+
version="$(candidate "$package")" || version=""
46+
fi
2947
if [[ -z "$version" || "$version" == "(none)" ]]; then
3048
echo "Unable to resolve an APT candidate for $package" >&2
3149
exit 1

‎.github/workflows/branch_cleanup.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
cleanup-stale-branches:
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-26.04
1111
steps:
1212
- name: Cleanup Stale Branches
1313
uses: cbrgm/cleanup-stale-branches-action@v1

‎.github/workflows/changelog.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ permissions:
1919

2020
jobs:
2121
changelog:
22-
runs-on: ubuntu-24.04
22+
runs-on: ubuntu-26.04
2323
steps:
2424
- uses: actions/checkout@v7
2525
with:

‎.github/workflows/ci.yml‎

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
include:
39-
- os: ubuntu-24.04 # x64
39+
- os: ubuntu-26.04 # x64
4040
ocaml_compiler: ocaml-variants.5.5.1+options,ocaml-option-static
4141
upload_binaries: true
4242
upload_libs: true
4343
node-target: linux-x64
4444
rust-target: x86_64-unknown-linux-musl
4545
dune-profile: static
46-
- os: ubuntu-24.04-arm # ARM
46+
- os: ubuntu-26.04-arm # ARM
4747
ocaml_compiler: ocaml-variants.5.5.1+options,ocaml-option-static
4848
upload_binaries: true
4949
# Build the playground compiler and run the benchmarks on the fastest runner
@@ -53,13 +53,13 @@ jobs:
5353
node-target: linux-arm64
5454
rust-target: aarch64-unknown-linux-musl
5555
dune-profile: static
56-
- os: macos-15-intel # x64
56+
- os: macos-26-intel # x64
5757
ocaml_compiler: 5.5.1
5858
upload_binaries: true
5959
node-target: darwin-x64
6060
rust-target: x86_64-apple-darwin
6161
dune-profile: release
62-
- os: macos-15 # ARM
62+
- os: macos-26 # ARM
6363
ocaml_compiler: 5.5.1
6464
upload_binaries: true
6565
node-target: darwin-arm64
@@ -75,7 +75,8 @@ jobs:
7575

7676
# Verify that the compiler still builds with the oldest OCaml version we support.
7777
# Steps comparing OCaml and Rust rewatch are skipped on this job; the
78-
# first linux-x64 job runs them.
78+
# first linux-x64 job runs them. OCaml 5.0 does not build with GCC 15
79+
# (C23 by default), so this job stays on Ubuntu 24.04.
7980
- os: ubuntu-24.04
8081
ocaml_compiler: ocaml-variants.5.0.0+options,ocaml-option-static
8182
node-target: linux-x64
@@ -397,7 +398,7 @@ jobs:
397398
needs:
398399
- build-compiler
399400
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
400-
runs-on: ubuntu-24.04
401+
runs-on: ubuntu-26.04
401402
permissions:
402403
contents: read
403404
pages: write
@@ -449,7 +450,7 @@ jobs:
449450
- build-compiler
450451
outputs:
451452
commit_sha: ${{ steps.publish.outputs.sha }}
452-
runs-on: ubuntu-24.04-arm
453+
runs-on: ubuntu-26.04-arm
453454
steps:
454455
- name: Checkout
455456
uses: actions/checkout@v7
@@ -482,7 +483,7 @@ jobs:
482483
api-docs:
483484
needs:
484485
- build-compiler
485-
runs-on: ubuntu-24.04-arm
486+
runs-on: ubuntu-26.04-arm
486487
steps:
487488
- name: Checkout rescript-lang.org
488489
uses: actions/checkout@v7
@@ -519,7 +520,7 @@ jobs:
519520
yarn build
520521
521522
test-devcontainer:
522-
runs-on: ubuntu-24.04-arm
523+
runs-on: ubuntu-26.04-arm
523524
steps:
524525
- name: Checkout
525526
uses: actions/checkout@v7
@@ -536,10 +537,10 @@ jobs:
536537
fail-fast: false
537538
matrix:
538539
include:
539-
- os: macos-15-intel
540-
- os: macos-15
541-
- os: ubuntu-24.04
542-
- os: ubuntu-24.04-arm
540+
- os: macos-26-intel
541+
- os: macos-26
542+
- os: ubuntu-26.04
543+
- os: ubuntu-26.04-arm
543544
- os: windows-2025
544545
runs-on: ${{ matrix.os }}
545546
steps:
@@ -602,10 +603,10 @@ jobs:
602603
fail-fast: false
603604
matrix:
604605
include:
605-
- os: macos-15-intel
606-
- os: macos-15
607-
- os: ubuntu-24.04
608-
- os: ubuntu-24.04-arm
606+
- os: macos-26-intel
607+
- os: macos-26
608+
- os: ubuntu-26.04
609+
- os: ubuntu-26.04-arm
609610
- os: windows-2025
610611
runs-on: ${{ matrix.os }}
611612
steps:

‎.github/workflows/coverage.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ env:
1515

1616
jobs:
1717
coverage:
18-
runs-on: ubuntu-24.04-arm
18+
runs-on: ubuntu-26.04-arm
1919
permissions:
2020
actions: write # For build cache overwriting
2121
id-token: write # For CodeCov OIDC
2222
env:
23-
OS: ubuntu-24.04-arm
23+
OS: ubuntu-26.04-arm
2424
OCAML_COMPILER: 5.5.1
2525
RUST_TARGET: aarch64-unknown-linux-gnu
2626
steps:

‎.github/workflows/playground_preview_cleanup.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
cleanup:
1010
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
11-
runs-on: ubuntu-24.04
11+
runs-on: ubuntu-26.04
1212
steps:
1313
- name: Setup Rclone
1414
uses: cometkim/rclone-actions/setup-rclone@main

‎.github/workflows/playground_preview_upload.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
upload:
1010
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.pull_requests[0].base.ref == 'master' }}
11-
runs-on: ubuntu-24.04
11+
runs-on: ubuntu-26.04
1212
permissions:
1313
actions: read
1414
contents: read

‎.github/workflows/publish.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
release-plan:
1616
name: Plan release from ${{ github.ref_name }}
17-
runs-on: ubuntu-24.04
17+
runs-on: ubuntu-26.04
1818
outputs:
1919
version: ${{ steps.plan.outputs.version }}
2020
npm-tag: ${{ steps.plan.outputs.npm-tag }}
@@ -77,7 +77,7 @@ jobs:
7777
contents: write
7878
id-token: write
7979
environment: npm-release
80-
runs-on: ubuntu-24.04-arm
80+
runs-on: ubuntu-26.04-arm
8181
steps:
8282
- name: Checkout
8383
uses: actions/checkout@v7

‎.github/workflows/semantic_diff.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
github.actor != 'dependabot[bot]' &&
2727
(github.event_name == 'pull_request') ==
2828
(github.event.pull_request.head.repo.full_name == github.repository)
29-
runs-on: ubuntu-24.04
29+
runs-on: ubuntu-26.04
3030
permissions:
3131
contents: read
3232
pull-requests: write
@@ -87,7 +87,7 @@ jobs:
8787
github.actor != 'dependabot[bot]' &&
8888
(github.event_name == 'pull_request') ==
8989
(github.event.pull_request.head.repo.full_name == github.repository)
90-
runs-on: ubuntu-24.04
90+
runs-on: ubuntu-26.04
9191
permissions: {}
9292
steps:
9393
- name: Setup Rclone

‎.github/workflows/stale.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
jobs:
1212
stale:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-26.04
1414
steps:
1515
- uses: actions/stale@v11
1616
with:

0 commit comments

Comments
 (0)