Skip to content

Commit 68f3f92

Browse files
committed
ci: migrate build workflows to Blacksmith runners
Migrate the core build pipeline workflows from GitHub-hosted runners to Blacksmith runners for faster builds and better caching. Runner mapping: - ubuntu-latest / ubuntu-24.04 → blacksmith-4vcpu-ubuntu-2404 - ubuntu-24.04-arm → blacksmith-4vcpu-ubuntu-2404-arm Updated workflows: - build.yml: check-skip + all runs-on passed to sub-workflows - build-container.yml: runners + Docker actions (useblacksmith/*) - build-depends.yml: default runs-on input - build-src.yml: default runs-on input Also removes explicit Docker layer cache config from build-container.yml as Blacksmith handles caching natively.
1 parent dcfa6ba commit 68f3f92

File tree

4 files changed

+16
-24
lines changed

4 files changed

+16
-24
lines changed

.github/workflows/build-container.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
build-amd64:
2525
name: Build container (amd64)
26-
runs-on: ubuntu-24.04
26+
runs-on: blacksmith-4vcpu-ubuntu-2404
2727
outputs:
2828
tag: ${{ steps.prepare.outputs.tag }}
2929
repo: ${{ steps.prepare.outputs.repo }}
@@ -43,7 +43,7 @@ jobs:
4343
echo "repo=${REPO_NAME}" >> "$GITHUB_OUTPUT"
4444
4545
- name: Set up Docker Buildx
46-
uses: docker/setup-buildx-action@v3
46+
uses: useblacksmith/setup-docker-builder@v1
4747

4848
- name: Login to GitHub Container Registry
4949
uses: docker/login-action@v3
@@ -54,22 +54,18 @@ jobs:
5454

5555
- name: Build and push Docker image
5656
id: build
57-
uses: docker/build-push-action@v6
57+
uses: useblacksmith/build-push-action@v2
5858
with:
5959
context: ${{ inputs.context }}
6060
file: ${{ inputs.file }}
6161
push: true
6262
platforms: linux/amd64
6363
tags: |
6464
ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ hashFiles(inputs.file) }}-amd64
65-
cache-from: |
66-
type=registry,ref=ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ hashFiles(inputs.file) }}-amd64
67-
type=registry,ref=ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ steps.prepare.outputs.tag }}
68-
cache-to: type=inline
6965
7066
build-arm64:
7167
name: Build container (arm64)
72-
runs-on: ubuntu-24.04-arm
68+
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
7369
outputs:
7470
digest: ${{ steps.build.outputs.digest }}
7571
steps:
@@ -87,7 +83,7 @@ jobs:
8783
echo "repo=${REPO_NAME}" >> "$GITHUB_OUTPUT"
8884
8985
- name: Set up Docker Buildx
90-
uses: docker/setup-buildx-action@v3
86+
uses: useblacksmith/setup-docker-builder@v1
9187

9288
- name: Login to GitHub Container Registry
9389
uses: docker/login-action@v3
@@ -98,22 +94,18 @@ jobs:
9894

9995
- name: Build and push Docker image
10096
id: build
101-
uses: docker/build-push-action@v6
97+
uses: useblacksmith/build-push-action@v2
10298
with:
10399
context: ${{ inputs.context }}
104100
file: ${{ inputs.file }}
105101
push: true
106102
platforms: linux/arm64
107103
tags: |
108104
ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ hashFiles(inputs.file) }}-arm64
109-
cache-from: |
110-
type=registry,ref=ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ hashFiles(inputs.file) }}-arm64
111-
type=registry,ref=ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ steps.prepare.outputs.tag }}
112-
cache-to: type=inline
113105
114106
create-manifest:
115107
name: Create multi-arch manifest
116-
runs-on: ubuntu-24.04-arm
108+
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
117109
needs: [build-amd64, build-arm64]
118110
steps:
119111
- name: Checkout code
@@ -122,7 +114,7 @@ jobs:
122114
ref: ${{ github.event.pull_request.head.sha }}
123115

124116
- name: Set up Docker Buildx
125-
uses: docker/setup-buildx-action@v3
117+
uses: useblacksmith/setup-docker-builder@v1
126118

127119
- name: Login to GitHub Container Registry
128120
uses: docker/login-action@v3

.github/workflows/build-depends.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
runs-on:
1515
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
1616
required: false
17-
default: ubuntu-24.04
17+
default: blacksmith-4vcpu-ubuntu-2404
1818
type: string
1919
outputs:
2020
key:

.github/workflows/build-src.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727
runs-on:
2828
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
2929
required: false
30-
default: ubuntu-24.04
30+
default: blacksmith-4vcpu-ubuntu-2404
3131
type: string
3232
outputs:
3333
key:

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ concurrency:
2020
jobs:
2121
check-skip:
2222
name: Check skip conditions
23-
runs-on: ubuntu-latest
23+
runs-on: blacksmith-4vcpu-ubuntu-2404
2424
outputs:
2525
skip: ${{ steps.skip-check.outputs.skip }}
2626
steps:
@@ -95,7 +95,7 @@ jobs:
9595
with:
9696
build-target: linux64_multiprocess
9797
container-path: ${{ needs.container.outputs.path }}
98-
runs-on: ubuntu-24.04-arm
98+
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
9999

100100
depends-linux64_nowallet:
101101
name: x86_64-pc-linux-gnu_nowallet
@@ -177,7 +177,7 @@ jobs:
177177
depends-key: ${{ needs.depends-linux64_multiprocess.outputs.key }}
178178
depends-host: ${{ needs.depends-linux64_multiprocess.outputs.host }}
179179
depends-dep-opts: ${{ needs.depends-linux64_multiprocess.outputs.dep-opts }}
180-
runs-on: ubuntu-24.04-arm
180+
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
181181

182182
src-linux64_nowallet:
183183
name: linux64_nowallet-build
@@ -213,7 +213,7 @@ jobs:
213213
depends-key: ${{ needs.depends-linux64_multiprocess.outputs.key }}
214214
depends-host: ${{ needs.depends-linux64_multiprocess.outputs.host }}
215215
depends-dep-opts: ${{ needs.depends-linux64_multiprocess.outputs.dep-opts }}
216-
runs-on: ubuntu-24.04-arm
216+
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
217217

218218
src-linux64_ubsan:
219219
name: linux64_ubsan-build
@@ -266,7 +266,7 @@ jobs:
266266
bundle-key: ${{ needs.src-linux64_multiprocess.outputs.key }}
267267
build-target: linux64_multiprocess
268268
container-path: ${{ needs.container-slim.outputs.path }}
269-
runs-on: ubuntu-24.04-arm
269+
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
270270

271271
test-linux64_nowallet:
272272
name: linux64_nowallet-test
@@ -294,7 +294,7 @@ jobs:
294294
bundle-key: ${{ needs.src-linux64_tsan.outputs.key }}
295295
build-target: linux64_tsan
296296
container-path: ${{ needs.container-slim.outputs.path }}
297-
runs-on: ubuntu-24.04-arm
297+
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
298298

299299
test-linux64_ubsan:
300300
name: linux64_ubsan-test

0 commit comments

Comments
 (0)