Skip to content

Commit 718ffd2

Browse files
blacksmith-sh[bot]RhysSullivancodesmith-bot
authored
.github/workflows: Migrate workflows to Blacksmith runners (#1286)
* Migrate workflows to Blacksmith * ci: pin Node 22 before bun install so better-sqlite3 builds on Blacksmith runners The format, lint, typecheck, and desktop-smoke jobs relied on the runner's default Node. On blacksmith-4vcpu-ubuntu-2404 that is v20.20.0, where better-sqlite3's node-gyp fallback (no prebuilt binary matched for the runner) crashes: node-gyp's undici calls webidl.markAsUncloneable, which only exists in Node 22.10+. Pin Node 22 before `bun install`, matching the existing test/e2e jobs that hit the same issue. Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com> * ci: pin Node 22 for bun install in preview and pkg-pr-new Blacksmith jobs Same better-sqlite3 node-gyp failure as the CI workflow: on blacksmith-4vcpu-ubuntu-2404 the default node is v20.20.0, where better-sqlite3's node-gyp fallback crashes (undici's webidl.markAsUncloneable needs Node 22.10+). Pin Node 22 before `bun install` in preview.yml's deploy job and pkg-pr-new.yml's publish job. The pkg-pr-new build-preview-binary matrix job stays on GitHub-hosted runners and is unaffected. Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com> --------- Co-authored-by: blacksmith-sh[bot] <157653362+blacksmith-sh[bot]@users.noreply.github.com> Co-authored-by: RhysSullivan <rhys@rhyssullivan.com> Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
1 parent 4d01290 commit 718ffd2

8 files changed

Lines changed: 64 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313
jobs:
1414
format:
1515
name: Format
16-
runs-on: ubuntu-latest
16+
runs-on: blacksmith-4vcpu-ubuntu-2404
1717
steps:
1818
- uses: actions/checkout@v4
1919

@@ -29,13 +29,20 @@ jobs:
2929
restore-keys: |
3030
${{ runner.os }}-bun-1.3.11-
3131
32+
# No prebuilt better-sqlite3 binary matches this runner, so `bun install`
33+
# builds it from source via node-gyp, whose undici needs Node 22.10+
34+
# (webidl.markAsUncloneable). Pin the same runtime the test/e2e jobs use.
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: 22
38+
3239
- run: bun install --frozen-lockfile
3340

3441
- run: bun run format:check
3542

3643
lint:
3744
name: Lint
38-
runs-on: ubuntu-latest
45+
runs-on: blacksmith-4vcpu-ubuntu-2404
3946
steps:
4047
- uses: actions/checkout@v4
4148

@@ -51,13 +58,20 @@ jobs:
5158
restore-keys: |
5259
${{ runner.os }}-bun-1.3.11-
5360
61+
# No prebuilt better-sqlite3 binary matches this runner, so `bun install`
62+
# builds it from source via node-gyp, whose undici needs Node 22.10+
63+
# (webidl.markAsUncloneable). Pin the same runtime the test/e2e jobs use.
64+
- uses: actions/setup-node@v4
65+
with:
66+
node-version: 22
67+
5468
- run: bun install --frozen-lockfile
5569

5670
- run: bun run lint
5771

5872
typecheck:
5973
name: Typecheck
60-
runs-on: ubuntu-latest
74+
runs-on: blacksmith-4vcpu-ubuntu-2404
6175
steps:
6276
- uses: actions/checkout@v4
6377

@@ -73,13 +87,20 @@ jobs:
7387
restore-keys: |
7488
${{ runner.os }}-bun-1.3.11-
7589
90+
# No prebuilt better-sqlite3 binary matches this runner, so `bun install`
91+
# builds it from source via node-gyp, whose undici needs Node 22.10+
92+
# (webidl.markAsUncloneable). Pin the same runtime the test/e2e jobs use.
93+
- uses: actions/setup-node@v4
94+
with:
95+
node-version: 22
96+
7697
- run: bun install --frozen-lockfile
7798

7899
- run: bun run typecheck
79100

80101
test:
81102
name: Test
82-
runs-on: ubuntu-latest
103+
runs-on: blacksmith-4vcpu-ubuntu-2404
83104
env:
84105
TURBO_TEST_CONCURRENCY: 3
85106
steps:
@@ -130,7 +151,7 @@ jobs:
130151
- { target: cloud, shard: 7/8, shard-name: 7of8 }
131152
- { target: cloud, shard: 8/8, shard-name: 8of8 }
132153
- target: selfhost
133-
runs-on: ubuntu-latest
154+
runs-on: blacksmith-4vcpu-ubuntu-2404
134155
timeout-minutes: 30
135156
steps:
136157
- uses: actions/checkout@v4
@@ -191,7 +212,7 @@ jobs:
191212
# Skipped on pull_request: the local scenario boots a real `executor web`
192213
# plus a browser and is currently flaky on PRs. Still runs on push to main.
193214
if: github.event_name != 'pull_request'
194-
runs-on: ubuntu-latest
215+
runs-on: blacksmith-4vcpu-ubuntu-2404
195216
timeout-minutes: 20
196217
steps:
197218
- uses: actions/checkout@v4
@@ -244,7 +265,7 @@ jobs:
244265

245266
desktop-smoke:
246267
name: Desktop smoke build
247-
runs-on: ubuntu-latest
268+
runs-on: blacksmith-4vcpu-ubuntu-2404
248269
steps:
249270
- uses: actions/checkout@v4
250271

@@ -260,6 +281,13 @@ jobs:
260281
restore-keys: |
261282
${{ runner.os }}-bun-1.3.11-
262283
284+
# No prebuilt better-sqlite3 binary matches this runner, so `bun install`
285+
# builds it from source via node-gyp, whose undici needs Node 22.10+
286+
# (webidl.markAsUncloneable). Pin the same runtime the test/e2e jobs use.
287+
- uses: actions/setup-node@v4
288+
with:
289+
node-version: 22
290+
263291
- run: bun install --frozen-lockfile
264292

265293
- name: Build web app
@@ -277,19 +305,17 @@ jobs:
277305

278306
selfhost-docker-smoke:
279307
name: Self-host Docker image
280-
runs-on: ubuntu-latest
308+
runs-on: blacksmith-4vcpu-ubuntu-2404
281309
steps:
282310
- uses: actions/checkout@v4
283311

284-
- name: Set up Docker Buildx
285-
uses: docker/setup-buildx-action@v3
312+
- name: Setup Blacksmith Builder
313+
uses: useblacksmith/setup-docker-builder@v1
286314

287315
- name: Build self-host image
288-
uses: docker/build-push-action@v6
316+
uses: useblacksmith/build-push-action@v2
289317
with:
290318
context: .
291319
file: apps/host-selfhost/Dockerfile
292320
push: false
293321
tags: executor-selfhost:ci
294-
cache-from: type=gha
295-
cache-to: type=gha,mode=max

.github/workflows/pkg-pr-new.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
publish:
6565
name: Publish
6666
needs: build-preview-binary
67-
runs-on: ubuntu-latest
67+
runs-on: blacksmith-4vcpu-ubuntu-2404
6868
permissions:
6969
contents: read
7070
pull-requests: write
@@ -77,6 +77,13 @@ jobs:
7777
with:
7878
bun-version: 1.3.11
7979

80+
# No prebuilt better-sqlite3 binary matches this runner, so `bun install`
81+
# builds it from source via node-gyp, whose undici needs Node 22.10+
82+
# (webidl.markAsUncloneable). Pin the same runtime the CI jobs use.
83+
- uses: actions/setup-node@v4
84+
with:
85+
node-version: 22
86+
8087
- run: bun install --frozen-lockfile
8188

8289
- name: Build executor preview wrapper

.github/workflows/preview-sweep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ permissions:
1919
jobs:
2020
sweep:
2121
name: Destroy previews for closed PRs
22-
runs-on: ubuntu-latest
22+
runs-on: blacksmith-4vcpu-ubuntu-2404
2323
steps:
2424
- uses: actions/checkout@v4
2525

.github/workflows/preview.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,21 @@ jobs:
2727
deploy:
2828
name: Deploy preview
2929
if: github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository
30-
runs-on: ubuntu-latest
30+
runs-on: blacksmith-4vcpu-ubuntu-2404
3131
steps:
3232
- uses: actions/checkout@v4
3333

3434
- uses: oven-sh/setup-bun@v2
3535
with:
3636
bun-version: 1.3.11
3737

38+
# No prebuilt better-sqlite3 binary matches this runner, so `bun install`
39+
# builds it from source via node-gyp, whose undici needs Node 22.10+
40+
# (webidl.markAsUncloneable). Pin the same runtime the CI jobs use.
41+
- uses: actions/setup-node@v4
42+
with:
43+
node-version: 22
44+
3845
- run: bun install --frozen-lockfile
3946

4047
- name: Deploy
@@ -82,7 +89,7 @@ jobs:
8289
teardown:
8390
name: Tear down preview
8491
if: github.event.action == 'closed' && github.event.pull_request.head.repo.full_name == github.repository
85-
runs-on: ubuntu-latest
92+
runs-on: blacksmith-4vcpu-ubuntu-2404
8693
steps:
8794
- uses: actions/checkout@v4
8895

.github/workflows/publish-desktop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ jobs:
177177

178178
release:
179179
needs: build
180-
runs-on: ubuntu-latest
180+
runs-on: blacksmith-4vcpu-ubuntu-2404
181181
permissions:
182182
contents: write
183183

.github/workflows/publish-executor-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121

2222
jobs:
2323
publish:
24-
runs-on: ubuntu-latest
24+
runs-on: blacksmith-4vcpu-ubuntu-2404
2525
permissions:
2626
actions: write
2727
contents: write

.github/workflows/publish-selfhost-docker.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818

1919
jobs:
2020
publish:
21-
runs-on: ubuntu-latest
21+
runs-on: blacksmith-4vcpu-ubuntu-2404
2222
permissions:
2323
contents: read
2424
packages: write
@@ -86,8 +86,8 @@ jobs:
8686
- name: Set up QEMU
8787
uses: docker/setup-qemu-action@v3
8888

89-
- name: Set up Docker Buildx
90-
uses: docker/setup-buildx-action@v3
89+
- name: Setup Blacksmith Builder
90+
uses: useblacksmith/setup-docker-builder@v1
9191

9292
- name: Log in to GHCR
9393
uses: docker/login-action@v3
@@ -97,7 +97,7 @@ jobs:
9797
password: ${{ secrets.GITHUB_TOKEN }}
9898

9999
- name: Build and push self-host image
100-
uses: docker/build-push-action@v6
100+
uses: useblacksmith/build-push-action@v2
101101
with:
102102
context: .
103103
file: apps/host-selfhost/Dockerfile

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515

1616
jobs:
1717
release:
18-
runs-on: ubuntu-latest
18+
runs-on: blacksmith-4vcpu-ubuntu-2404
1919
permissions:
2020
actions: write
2121
contents: write

0 commit comments

Comments
 (0)