Skip to content

Commit 0ab4351

Browse files
committed
ci: add dependency caching + pin Bun in the CI workflows
Every integration-tests / conformance run re-downloaded all deps (Maven, NuGet, uv, Bun) and re-fetched images, and a Bun 1.3.8 segfault-on-exit flake cost a full re-run. Add caching to the toolchain setup steps and pin Bun off the bad version. - Maven: `cache: maven` on all `actions/setup-java` steps (java-reactor already had it; add it to the integration-tests matrix, the conformance matrix, and conformance-kotlin). - uv: `enable-cache: true` on `astral-sh/setup-uv`. - NuGet: `actions/cache` on `~/.nuget/packages` keyed on the csproj hash (no committed packages.lock.json, so key on server/csharp/**/*.csproj). - Bun: pin `bun-version: '1.3.14'` (recent stable 1.3.x, past the 1.3.8 segfault) on every `oven-sh/setup-bun` for reproducibility, plus an `actions/cache` on `~/.bun/install/cache` keyed on bun.lock (setup-bun caches the binary, not `bun install` output). No test logic, matrix, or run behavior changed — caching + pin only. Both workflows validated with `yaml.safe_load`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GF9xLEQZaPus5Y6opk398n
1 parent 5162386 commit 0ab4351

2 files changed

Lines changed: 104 additions & 0 deletions

File tree

.github/workflows/conformance.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v4
2121
- uses: oven-sh/setup-bun@v2
22+
with:
23+
bun-version: '1.3.14'
24+
- name: Cache Bun install cache
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.bun/install/cache
28+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-bun-
2231
- run: bun install
2332
- run: cd server/typescript/packages/conformance && bun bin/conformance.ts lint ../../../../fixtures/conformance
2433

@@ -33,6 +42,15 @@ jobs:
3342
steps:
3443
- uses: actions/checkout@v4
3544
- uses: oven-sh/setup-bun@v2
45+
with:
46+
bun-version: '1.3.14'
47+
- name: Cache Bun install cache
48+
uses: actions/cache@v4
49+
with:
50+
path: ~/.bun/install/cache
51+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
52+
restore-keys: |
53+
${{ runner.os }}-bun-
3654
- run: bun install
3755
- name: Build all workspace packages (emit dist/ for cross-package types)
3856
run: bun run --filter '*' build
@@ -52,23 +70,46 @@ jobs:
5270
- name: Set up Bun (TS)
5371
if: matrix.language == 'typescript'
5472
uses: oven-sh/setup-bun@v2
73+
with:
74+
bun-version: '1.3.14'
75+
76+
- name: Cache Bun install cache (TS)
77+
if: matrix.language == 'typescript'
78+
uses: actions/cache@v4
79+
with:
80+
path: ~/.bun/install/cache
81+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
82+
restore-keys: |
83+
${{ runner.os }}-bun-
5584
5685
- name: Set up .NET (C#)
5786
if: matrix.language == 'csharp'
5887
uses: actions/setup-dotnet@v4
5988
with:
6089
dotnet-version: '8.0.x'
6190

91+
- name: Cache NuGet packages (C#)
92+
if: matrix.language == 'csharp'
93+
uses: actions/cache@v4
94+
with:
95+
path: ~/.nuget/packages
96+
key: ${{ runner.os }}-nuget-${{ hashFiles('server/csharp/**/*.csproj') }}
97+
restore-keys: |
98+
${{ runner.os }}-nuget-
99+
62100
- name: Set up JDK (Java)
63101
if: matrix.language == 'java'
64102
uses: actions/setup-java@v4
65103
with:
66104
distribution: 'temurin'
67105
java-version: '21'
106+
cache: maven
68107

69108
- name: Set up uv (Python)
70109
if: matrix.language == 'python'
71110
uses: astral-sh/setup-uv@v3
111+
with:
112+
enable-cache: true
72113

73114
- name: TypeScript conformance
74115
if: matrix.language == 'typescript'
@@ -163,6 +204,7 @@ jobs:
163204
with:
164205
distribution: 'temurin'
165206
java-version: '21'
207+
cache: maven
166208

167209
- name: Kotlin conformance
168210
run: |
@@ -218,6 +260,15 @@ jobs:
218260
steps:
219261
- uses: actions/checkout@v4
220262
- uses: oven-sh/setup-bun@v2
263+
with:
264+
bun-version: '1.3.14'
265+
- name: Cache Bun install cache
266+
uses: actions/cache@v4
267+
with:
268+
path: ~/.bun/install/cache
269+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
270+
restore-keys: |
271+
${{ runner.os }}-bun-
221272
- run: bun install
222273
- run: cd server/typescript/packages/metadata && bun run conformance:mutation
223274

@@ -231,6 +282,15 @@ jobs:
231282
steps:
232283
- uses: actions/checkout@v4
233284
- uses: oven-sh/setup-bun@v2
285+
with:
286+
bun-version: '1.3.14'
287+
- name: Cache Bun install cache
288+
uses: actions/cache@v4
289+
with:
290+
path: ~/.bun/install/cache
291+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
292+
restore-keys: |
293+
${{ runner.os }}-bun-
234294
- run: bun install
235295
- name: Regenerate bundled + embedded doc templates from canonical
236296
run: bash scripts/sync-doc-templates.sh
@@ -247,6 +307,15 @@ jobs:
247307
steps:
248308
- uses: actions/checkout@v4
249309
- uses: oven-sh/setup-bun@v2
310+
with:
311+
bun-version: '1.3.14'
312+
- name: Cache Bun install cache
313+
uses: actions/cache@v4
314+
with:
315+
path: ~/.bun/install/cache
316+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
317+
restore-keys: |
318+
${{ runner.os }}-bun-
250319
- run: bun install
251320
- name: Regenerate embedded library metadata from canonical
252321
run: bun run scripts/generate-embedded-library.ts

.github/workflows/integration-tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,49 @@ jobs:
3333
- name: Set up Bun (TS port)
3434
if: matrix.port == 'ts'
3535
uses: oven-sh/setup-bun@v2
36+
with:
37+
# Pin a known-good Bun (1.3.8 segfaults on exit; see the flake that cost a
38+
# full re-run). setup-bun caches the Bun binary but NOT `bun install`
39+
# output — the actions/cache step below does that.
40+
bun-version: '1.3.14'
41+
42+
- name: Cache Bun install cache (TS port)
43+
if: matrix.port == 'ts'
44+
uses: actions/cache@v4
45+
with:
46+
path: ~/.bun/install/cache
47+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
48+
restore-keys: |
49+
${{ runner.os }}-bun-
3650
3751
- name: Set up .NET (C# port)
3852
if: matrix.port == 'csharp'
3953
uses: actions/setup-dotnet@v4
4054
with:
4155
dotnet-version: '8.0.x'
4256

57+
- name: Cache NuGet packages (C# port)
58+
if: matrix.port == 'csharp'
59+
uses: actions/cache@v4
60+
with:
61+
path: ~/.nuget/packages
62+
key: ${{ runner.os }}-nuget-${{ hashFiles('server/csharp/**/*.csproj') }}
63+
restore-keys: |
64+
${{ runner.os }}-nuget-
65+
4366
- name: Set up JDK (Java and Kotlin ports)
4467
if: matrix.port == 'java' || matrix.port == 'kotlin'
4568
uses: actions/setup-java@v4
4669
with:
4770
distribution: 'temurin'
4871
java-version: '21'
72+
cache: maven
4973

5074
- name: Set up uv (Python port)
5175
if: matrix.port == 'python'
5276
uses: astral-sh/setup-uv@v3
77+
with:
78+
enable-cache: true
5379

5480
- name: Install workspace deps
5581
if: matrix.port == 'ts'
@@ -82,6 +108,15 @@ jobs:
82108
steps:
83109
- uses: actions/checkout@v4
84110
- uses: oven-sh/setup-bun@v2
111+
with:
112+
bun-version: '1.3.14'
113+
- name: Cache Bun install cache
114+
uses: actions/cache@v4
115+
with:
116+
path: ~/.bun/install/cache
117+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
118+
restore-keys: |
119+
${{ runner.os }}-bun-
85120
- run: bun install
86121
- name: Run migrate-ts suite against real Postgres
87122
env:

0 commit comments

Comments
 (0)