History

.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> ---------

blacksmith-sh[bot] committed 4 months ago

Commit 718ffd21 parent 4d012908 files · +64 −24Browse files

Unified · Split

8 files
  1. .github/workflows/ci.yml +39 −13
  2. .github/workflows/pkg-pr-new.yml +8 −1
  3. .github/workflows/preview-sweep.yml +1 −1
  4. .github/workflows/preview.yml +9 −2
  5. .github/workflows/publish-desktop.yml +1 −1
  6. .github/workflows/publish-executor-package.yml +1 −1
  7. .github/workflows/publish-selfhost-docker.yml +4 −4
  8. .github/workflows/release.yml +1 −1
.github/workflows/ci.yml+39−13
@@ -13,7 +13,7 @@ concurrency: · 12 unmodified lines
13jobs:13jobs:
14 format:14 format:
15 name: Format15 name: Format
16 runs-on: ubuntu-latest16 runs-on: blacksmith-4vcpu-ubuntu-2404
17 steps:17 steps:
18 - uses: actions/checkout@v418 - uses: actions/checkout@v4
19 19
@@ -29,13 +29,20 @@ jobs: · 9 unmodified lines
29 restore-keys: |29 restore-keys: |
30 ${{ runner.os }}-bun-1.3.11-30 ${{ runner.os }}-bun-1.3.11-
31 31
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
32 - run: bun install --frozen-lockfile39 - run: bun install --frozen-lockfile
33 40
34 - run: bun run format:check41 - run: bun run format:check
35 42
36 lint:43 lint:
37 name: Lint44 name: Lint
38 runs-on: ubuntu-latest45 runs-on: blacksmith-4vcpu-ubuntu-2404
39 steps:46 steps:
40 - uses: actions/checkout@v447 - uses: actions/checkout@v4
41 48
@@ -51,13 +58,20 @@ jobs: · 9 unmodified lines
51 restore-keys: |58 restore-keys: |
52 ${{ runner.os }}-bun-1.3.11-59 ${{ runner.os }}-bun-1.3.11-
53 60
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
54 - run: bun install --frozen-lockfile68 - run: bun install --frozen-lockfile
55 69
56 - run: bun run lint70 - run: bun run lint
57 71
58 typecheck:72 typecheck:
59 name: Typecheck73 name: Typecheck
60 runs-on: ubuntu-latest74 runs-on: blacksmith-4vcpu-ubuntu-2404
61 steps:75 steps:
62 - uses: actions/checkout@v476 - uses: actions/checkout@v4
63 77
@@ -73,13 +87,20 @@ jobs: · 9 unmodified lines
73 restore-keys: |87 restore-keys: |
74 ${{ runner.os }}-bun-1.3.11-88 ${{ runner.os }}-bun-1.3.11-
75 89
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
76 - run: bun install --frozen-lockfile97 - run: bun install --frozen-lockfile
77 98
78 - run: bun run typecheck99 - run: bun run typecheck
79 100
80 test:101 test:
81 name: Test102 name: Test
82 runs-on: ubuntu-latest103 runs-on: blacksmith-4vcpu-ubuntu-2404
83 env:104 env:
84 TURBO_TEST_CONCURRENCY: 3105 TURBO_TEST_CONCURRENCY: 3
85 steps:106 steps:
@@ -130,7 +151,7 @@ jobs: · 44 unmodified lines
130 - { target: cloud, shard: 7/8, shard-name: 7of8 }151 - { target: cloud, shard: 7/8, shard-name: 7of8 }
131 - { target: cloud, shard: 8/8, shard-name: 8of8 }152 - { target: cloud, shard: 8/8, shard-name: 8of8 }
132 - target: selfhost153 - target: selfhost
133 runs-on: ubuntu-latest154 runs-on: blacksmith-4vcpu-ubuntu-2404
134 timeout-minutes: 30155 timeout-minutes: 30
135 steps:156 steps:
136 - uses: actions/checkout@v4157 - uses: actions/checkout@v4
@@ -191,7 +212,7 @@ jobs: · 54 unmodified lines
191 # Skipped on pull_request: the local scenario boots a real `executor web`212 # Skipped on pull_request: the local scenario boots a real `executor web`
192 # plus a browser and is currently flaky on PRs. Still runs on push to main.213 # plus a browser and is currently flaky on PRs. Still runs on push to main.
193 if: github.event_name != 'pull_request'214 if: github.event_name != 'pull_request'
194 runs-on: ubuntu-latest215 runs-on: blacksmith-4vcpu-ubuntu-2404
195 timeout-minutes: 20216 timeout-minutes: 20
196 steps:217 steps:
197 - uses: actions/checkout@v4218 - uses: actions/checkout@v4
@@ -244,7 +265,7 @@ jobs: · 46 unmodified lines
244 265
245 desktop-smoke:266 desktop-smoke:
246 name: Desktop smoke build267 name: Desktop smoke build
247 runs-on: ubuntu-latest268 runs-on: blacksmith-4vcpu-ubuntu-2404
248 steps:269 steps:
249 - uses: actions/checkout@v4270 - uses: actions/checkout@v4
250 271
@@ -260,6 +281,13 @@ jobs: · 9 unmodified lines
260 restore-keys: |281 restore-keys: |
261 ${{ runner.os }}-bun-1.3.11-282 ${{ runner.os }}-bun-1.3.11-
262 283
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
263 - run: bun install --frozen-lockfile291 - run: bun install --frozen-lockfile
264 292
265 - name: Build web app293 - name: Build web app
@@ -277,19 +305,17 @@ jobs: · 11 unmodified lines
277 305
278 selfhost-docker-smoke:306 selfhost-docker-smoke:
279 name: Self-host Docker image307 name: Self-host Docker image
280 runs-on: ubuntu-latest308 runs-on: blacksmith-4vcpu-ubuntu-2404
281 steps:309 steps:
282 - uses: actions/checkout@v4310 - uses: actions/checkout@v4
283 311
284 - name: Set up Docker Buildx312 - name: Setup Blacksmith Builder
285 uses: docker/setup-buildx-action@v3313 uses: useblacksmith/setup-docker-builder@v1
286 314
287 - name: Build self-host image315 - name: Build self-host image
288 uses: docker/build-push-action@v6316 uses: useblacksmith/build-push-action@v2
289 with:317 with:
290 context: .318 context: .
291 file: apps/host-selfhost/Dockerfile319 file: apps/host-selfhost/Dockerfile
292 push: false320 push: false
293 tags: executor-selfhost:ci321 tags: executor-selfhost:ci
294 cache-from: type=gha
295 cache-to: type=gha,mode=max
.github/workflows/pkg-pr-new.yml+8−1
@@ -64,7 +64,7 @@ jobs: · 63 unmodified lines
64 publish:64 publish:
65 name: Publish65 name: Publish
66 needs: build-preview-binary66 needs: build-preview-binary
67 runs-on: ubuntu-latest67 runs-on: blacksmith-4vcpu-ubuntu-2404
68 permissions:68 permissions:
69 contents: read69 contents: read
70 pull-requests: write70 pull-requests: write
@@ -77,6 +77,13 @@ jobs: · 6 unmodified lines
77 with:77 with:
78 bun-version: 1.3.1178 bun-version: 1.3.11
79 79
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
80 - run: bun install --frozen-lockfile87 - run: bun install --frozen-lockfile
81 88
82 - name: Build executor preview wrapper89 - name: Build executor preview wrapper
.github/workflows/preview-sweep.yml+1−1
@@ -19,7 +19,7 @@ permissions: · 18 unmodified lines
19jobs:19jobs:
20 sweep:20 sweep:
21 name: Destroy previews for closed PRs21 name: Destroy previews for closed PRs
22 runs-on: ubuntu-latest22 runs-on: blacksmith-4vcpu-ubuntu-2404
23 steps:23 steps:
24 - uses: actions/checkout@v424 - uses: actions/checkout@v4
25 25
.github/workflows/preview.yml+9−2
@@ -27,7 +27,7 @@ jobs: · 26 unmodified lines
27 deploy:27 deploy:
28 name: Deploy preview28 name: Deploy preview
29 if: github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository29 if: github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository
30 runs-on: ubuntu-latest30 runs-on: blacksmith-4vcpu-ubuntu-2404
31 steps:31 steps:
32 - uses: actions/checkout@v432 - uses: actions/checkout@v4
33 33
@@ -35,6 +35,13 @@ jobs: · 1 unmodified line
35 with:35 with:
36 bun-version: 1.3.1136 bun-version: 1.3.11
37 37
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
38 - run: bun install --frozen-lockfile45 - run: bun install --frozen-lockfile
39 46
40 - name: Deploy47 - name: Deploy
@@ -82,7 +89,7 @@ jobs: · 41 unmodified lines
82 teardown:89 teardown:
83 name: Tear down preview90 name: Tear down preview
84 if: github.event.action == 'closed' && github.event.pull_request.head.repo.full_name == github.repository91 if: github.event.action == 'closed' && github.event.pull_request.head.repo.full_name == github.repository
85 runs-on: ubuntu-latest92 runs-on: blacksmith-4vcpu-ubuntu-2404
86 steps:93 steps:
87 - uses: actions/checkout@v494 - uses: actions/checkout@v4
88 95
.github/workflows/publish-desktop.yml+1−1
@@ -177,7 +177,7 @@ jobs: · 176 unmodified lines
177 177
178 release:178 release:
179 needs: build179 needs: build
180 runs-on: ubuntu-latest180 runs-on: blacksmith-4vcpu-ubuntu-2404
181 permissions:181 permissions:
182 contents: write182 contents: write
183 183
.github/workflows/publish-executor-package.yml+1−1
@@ -21,7 +21,7 @@ concurrency: · 20 unmodified lines
21 21
22jobs:22jobs:
23 publish:23 publish:
24 runs-on: ubuntu-latest24 runs-on: blacksmith-4vcpu-ubuntu-2404
25 permissions:25 permissions:
26 actions: write26 actions: write
27 contents: write27 contents: write
.github/workflows/publish-selfhost-docker.yml+4−4
@@ -18,7 +18,7 @@ concurrency: · 17 unmodified lines
18 18
19jobs:19jobs:
20 publish:20 publish:
21 runs-on: ubuntu-latest21 runs-on: blacksmith-4vcpu-ubuntu-2404
22 permissions:22 permissions:
23 contents: read23 contents: read
24 packages: write24 packages: write
@@ -86,8 +86,8 @@ jobs: · 61 unmodified lines
86 - name: Set up QEMU86 - name: Set up QEMU
87 uses: docker/setup-qemu-action@v387 uses: docker/setup-qemu-action@v3
88 88
89 - name: Set up Docker Buildx89 - name: Setup Blacksmith Builder
90 uses: docker/setup-buildx-action@v390 uses: useblacksmith/setup-docker-builder@v1
91 91
92 - name: Log in to GHCR92 - name: Log in to GHCR
93 uses: docker/login-action@v393 uses: docker/login-action@v3
@@ -97,7 +97,7 @@ jobs: · 3 unmodified lines
97 password: ${{ secrets.GITHUB_TOKEN }}97 password: ${{ secrets.GITHUB_TOKEN }}
98 98
99 - name: Build and push self-host image99 - name: Build and push self-host image
100 uses: docker/build-push-action@v6100 uses: useblacksmith/build-push-action@v2
101 with:101 with:
102 context: .102 context: .
103 file: apps/host-selfhost/Dockerfile103 file: apps/host-selfhost/Dockerfile
.github/workflows/release.yml+1−1
@@ -15,7 +15,7 @@ concurrency: · 14 unmodified lines
15 15
16jobs:16jobs:
17 release:17 release:
18 runs-on: ubuntu-latest18 runs-on: blacksmith-4vcpu-ubuntu-2404
19 permissions:19 permissions:
20 actions: write20 actions: write
21 contents: write21 contents: write