Skip to content

Commit d6672f2

Browse files
authored
Use VM-based github runners (#4045)
# Description of Changes <!-- Please describe your change, mention any related tickets, and so on here. --> This workflow change migrates us from docker container runners to the new system which uses virtual machines via qemu. This solves a lot of complexities around docker-in-docker and also allows us to easily run windows VMs in the future. # API and ABI breaking changes <!-- If this is an API or ABI breaking change, please apply the corresponding GitHub label. --> None # Expected complexity level and risk 0 - this only updates our workflow and has no impact on the code. <!-- How complicated do you think these changes are? Grade on a scale from 1 to 5, where 1 is a trivial change, and 5 is a deep-reaching and complex change. This complexity rating applies not only to the complexity apparent in the diff, but also to its interactions with existing and future code. If you answered more than a 2, explain what is complex about the PR, and what other components it interacts with in potentially concerning ways. --> # Testing <!-- Describe any testing you've done, and any testing you'd like your reviewers to do, so that you're confident that all the changes work as expected! --> - [x] CI is passing --------- Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com>
1 parent 201970e commit d6672f2

8 files changed

Lines changed: 22 additions & 98 deletions

File tree

.github/workflows/attach-artifacts.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ on:
99

1010
jobs:
1111
upload-assets:
12-
runs-on: spacetimedb-new-runner
13-
container:
14-
image: localhost:5000/spacetimedb-ci:latest
15-
options: >-
16-
--privileged
12+
runs-on: spacetimedb-new-runner-2
1713
permissions:
1814
contents: write # needed to modify releases
1915

.github/workflows/ci.yml

Lines changed: 15 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,17 @@ concurrency:
2020
jobs:
2121
docker_smoketests:
2222
needs: [lints]
23-
name: Smoketests
23+
name: Smoketests (${{ matrix.name }})
2424
strategy:
2525
matrix:
26-
runner: [spacetimedb-new-runner, windows-latest]
2726
include:
28-
- runner: spacetimedb-new-runner
27+
- name: Linux
28+
runner: spacetimedb-new-runner-2
2929
smoketest_args: --docker
30-
container:
31-
image: localhost:5000/spacetimedb-ci:latest
32-
options: --privileged
33-
- runner: windows-latest
30+
- name: Windows
31+
runner: windows-latest
3432
smoketest_args: --no-build-cli
35-
container: null
3633
runs-on: ${{ matrix.runner }}
37-
container: ${{ matrix.container }}
3834
timeout-minutes: 120
3935
env:
4036
CARGO_TARGET_DIR: ${{ github.workspace }}/target
@@ -109,10 +105,6 @@ jobs:
109105
shell: powershell
110106
- name: Build crates
111107
run: cargo build -p spacetimedb-cli -p spacetimedb-standalone -p spacetimedb-update
112-
- name: Start Docker daemon
113-
if: runner.os == 'Linux'
114-
run: /usr/local/bin/start-docker.sh
115-
116108
- name: Build and start database (Linux)
117109
if: runner.os == 'Linux'
118110
run: |
@@ -146,11 +138,8 @@ jobs:
146138
test:
147139
needs: [lints]
148140
name: Test Suite
149-
runs-on: spacetimedb-new-runner
150-
container:
151-
image: localhost:5000/spacetimedb-ci:latest
152-
options: >-
153-
--privileged
141+
runs-on: spacetimedb-new-runner-2
142+
154143
env:
155144
CARGO_TARGET_DIR: ${{ github.workspace }}/target
156145
steps:
@@ -203,11 +192,7 @@ jobs:
203192

204193
lints:
205194
name: Lints
206-
runs-on: spacetimedb-new-runner
207-
container:
208-
image: localhost:5000/spacetimedb-ci:latest
209-
options: >-
210-
--privileged
195+
runs-on: spacetimedb-new-runner-2
211196
env:
212197
CARGO_TARGET_DIR: ${{ github.workspace }}/target
213198
steps:
@@ -235,11 +220,7 @@ jobs:
235220

236221
wasm_bindings:
237222
name: Build and test wasm bindings
238-
runs-on: spacetimedb-new-runner
239-
container:
240-
image: localhost:5000/spacetimedb-ci:latest
241-
options: >-
242-
--privileged
223+
runs-on: spacetimedb-new-runner-2
243224
env:
244225
CARGO_TARGET_DIR: ${{ github.workspace }}/target
245226
steps:
@@ -262,11 +243,7 @@ jobs:
262243

263244
publish_checks:
264245
name: Check that packages are publishable
265-
runs-on: spacetimedb-new-runner
266-
container:
267-
image: localhost:5000/spacetimedb-ci:latest
268-
options: >-
269-
--privileged
246+
runs-on: spacetimedb-new-runner-2
270247
permissions: read-all
271248
steps:
272249
- uses: actions/checkout@v3
@@ -295,16 +272,11 @@ jobs:
295272
strategy:
296273
matrix:
297274
include:
298-
- runner: spacetimedb-new-runner
299-
target: x86_64-unknown-linux-gnu
300-
container:
301-
image: localhost:5000/spacetimedb-ci:latest
302-
options: --privileged
275+
- { target: x86_64-unknown-linux-gnu, runner: spacetimedb-new-runner-2 }
303276
- { target: aarch64-unknown-linux-gnu, runner: arm-runner }
304277
- { target: aarch64-apple-darwin, runner: macos-latest }
305278
- { target: x86_64-pc-windows-msvc, runner: windows-latest }
306279
runs-on: ${{ matrix.runner }}
307-
container: ${{ matrix.container }}
308280
steps:
309281
- name: Checkout
310282
uses: actions/checkout@v3
@@ -347,7 +319,7 @@ jobs:
347319
name: Unreal Engine Tests
348320
# This can't go on e.g. ubuntu-latest because that runner runs out of disk space. ChatGPT suggested that the general solution tends to be to use
349321
# a custom runner.
350-
runs-on: spacetimedb-new-runner
322+
runs-on: spacetimedb-new-runner-2
351323
# Disable the tests because they are very flaky at the moment.
352324
# TODO: Remove this line and re-enable the `if` line just below here.
353325
if: false
@@ -434,7 +406,7 @@ jobs:
434406
435407
ci_command_docs:
436408
name: Check CI command docs
437-
runs-on: ubuntu-latest
409+
runs-on: spacetimedb-new-runner-2
438410
steps:
439411
- name: Find Git ref
440412
env:
@@ -462,11 +434,7 @@ jobs:
462434
cli_docs:
463435
name: Check CLI docs
464436
permissions: read-all
465-
runs-on: spacetimedb-new-runner
466-
container:
467-
image: localhost:5000/spacetimedb-ci:latest
468-
options: >-
469-
--privileged
437+
runs-on: spacetimedb-new-runner-2
470438
env:
471439
CARGO_TARGET_DIR: ${{ github.workspace }}/target
472440
steps:
@@ -687,12 +655,7 @@ jobs:
687655

688656
csharp-testsuite:
689657
needs: [lints]
690-
runs-on: spacetimedb-new-runner
691-
container:
692-
image: localhost:5000/spacetimedb-ci:latest
693-
options: >-
694-
--privileged
695-
--cgroupns=host
658+
runs-on: spacetimedb-new-runner-2
696659
timeout-minutes: 30
697660
env:
698661
CARGO_TARGET_DIR: ${{ github.workspace }}/target

.github/workflows/docs-publish.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ on:
1010

1111
jobs:
1212
build:
13-
runs-on: spacetimedb-new-runner
14-
container:
15-
image: localhost:5000/spacetimedb-ci:latest
16-
options: >-
17-
--privileged
13+
runs-on: spacetimedb-new-runner-2
1814
steps:
1915
- name: Checkout repository
2016
uses: actions/checkout@v3

.github/workflows/docs-test.yaml

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

88
jobs:
99
build:
10-
runs-on: spacetimedb-new-runner
11-
container:
12-
image: localhost:5000/spacetimedb-ci:latest
13-
options: >-
14-
--privileged
10+
runs-on: spacetimedb-new-runner-2
1511
steps:
1612
- name: Checkout repository
1713
uses: actions/checkout@v3

.github/workflows/package.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
include:
17-
- name: x86_64 Linux
18-
target: x86_64-unknown-linux-gnu
19-
runner: spacetimedb-new-runner
20-
container:
21-
image: localhost:5000/spacetimedb-ci:latest
22-
options: >-
23-
--privileged
17+
- { name: x86_64 Linux, target: x86_64-unknown-linux-gnu, runner: spacetimedb-new-runner-2 }
2418
- { name: aarch64 Linux, target: aarch64-unknown-linux-gnu, runner: arm-runner }
2519
# Disabled because musl builds weren't working and we didn't want to investigate. See https://github.com/clockworklabs/SpacetimeDB/pull/2964.
2620
# - { name: x86_64 Linux musl, target: x86_64-unknown-linux-musl, runner: bare-metal, container: alpine }
@@ -32,7 +26,6 @@ jobs:
3226

3327
name: Build CLI for ${{ matrix.name }}
3428
runs-on: ${{ matrix.runner }}
35-
container: ${{ matrix.container || '' }}
3629

3730
steps:
3831
- name: Checkout
@@ -41,12 +34,6 @@ jobs:
4134
- name: Show arch
4235
run: uname -a
4336

44-
- name: Install ubuntu dependencies
45-
if: matrix.container == 'debian:bookworm'
46-
run: |
47-
apt-get update -y
48-
apt-get install -y gcc g++ bash curl perl git make
49-
5037
- name: Install musl dependencies
5138
# TODO: Should we use `matrix.container == 'alpine'` instead of the `endsWith` check?
5239
if: endsWith(matrix.target, '-musl')

.github/workflows/typescript-lint.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ on:
99

1010
jobs:
1111
build:
12-
runs-on: spacetimedb-new-runner
13-
container:
14-
image: localhost:5000/spacetimedb-ci:latest
15-
options: --privileged
16-
17-
12+
runs-on: spacetimedb-new-runner-2
1813
steps:
1914
- name: Checkout repository
2015
uses: actions/checkout@v4

.github/workflows/typescript-test.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ concurrency:
1313

1414
jobs:
1515
build-and-test:
16-
runs-on: spacetimedb-new-runner
17-
container:
18-
image: localhost:5000/spacetimedb-ci:latest
19-
options: --privileged
20-
env:
21-
CARGO_TARGET_DIR: ${{ github.workspace }}/target
22-
16+
runs-on: spacetimedb-new-runner-2
2317
steps:
2418
- name: Checkout repository
2519
uses: actions/checkout@v4

.github/workflows/upgrade-version-check.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ permissions: read-all
88

99
jobs:
1010
version_upgrade_check:
11-
runs-on: spacetimedb-new-runner
12-
container:
13-
image: localhost:5000/spacetimedb-ci:latest
14-
options: --privileged
11+
runs-on: spacetimedb-new-runner-2
1512
steps:
1613
- name: Checkout
1714
uses: actions/checkout@v3

0 commit comments

Comments
 (0)