Skip to content

Commit 0ee9c40

Browse files
committed
[bfops/cancel-internal-tests]: Merge remote-tracking branch 'origin/jdetter/use-new-runner' into bfops/cancel-internal-tests
2 parents 461b73c + 8c22386 commit 0ee9c40

2 files changed

Lines changed: 54 additions & 13 deletions

File tree

.github/workflows/ci.yml

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,19 @@ jobs:
2222
name: Smoketests
2323
strategy:
2424
matrix:
25+
runner: [spacetimedb-new-runner, windows-latest]
2526
include:
26-
- { runner: spacetimedb-runner, smoketest_args: --docker }
27-
- { runner: windows-latest, smoketest_args: --no-build-cli }
28-
runner: [ spacetimedb-runner, windows-latest ]
27+
- runner: spacetimedb-new-runner
28+
smoketest_args: --docker
29+
container:
30+
image: localhost:5000/spacetimedb-ci:latest
31+
options: --privileged
32+
- runner: windows-latest
33+
smoketest_args: --no-build-cli
34+
container: null
2935
runs-on: ${{ matrix.runner }}
36+
container: ${{ matrix.container }}
37+
3038
steps:
3139
- name: Find Git ref
3240
env:
@@ -63,6 +71,10 @@ jobs:
6371
if: runner.os == 'Windows'
6472
run: choco install psql -y --no-progress
6573
shell: powershell
74+
- name: Start Docker daemon
75+
if: runner.os == 'Linux'
76+
run: /usr/local/bin/start-docker.sh
77+
6678
- name: Build and start database (Linux)
6779
if: runner.os == 'Linux'
6880
run: docker compose up -d
@@ -93,7 +105,11 @@ jobs:
93105

94106
test:
95107
name: Test Suite
96-
runs-on: spacetimedb-runner
108+
runs-on: spacetimedb-new-runner
109+
container:
110+
image: localhost:5000/spacetimedb-ci:latest
111+
options: >-
112+
--privileged
97113
steps:
98114
- name: Find Git ref
99115
env:
@@ -140,8 +156,9 @@ jobs:
140156
#Note: Unreal tests will be run separately
141157
run: cargo test --all -- --skip unreal
142158

159+
# The fallocate tests have been flakely when running in parallel
143160
- name: Run fallocate tests
144-
run: cargo test -p spacetimedb-durability --features fallocate
161+
run: cargo test -p spacetimedb-durability --features fallocate -- --test-threads=1
145162

146163
- name: Check that the test outputs are up-to-date
147164
run: bash tools/check-diff.sh
@@ -157,7 +174,11 @@ jobs:
157174

158175
lints:
159176
name: Lints
160-
runs-on: spacetimedb-runner
177+
runs-on: spacetimedb-new-runner
178+
container:
179+
image: localhost:5000/spacetimedb-ci:latest
180+
options: >-
181+
--privileged
161182
steps:
162183
- name: Checkout sources
163184
uses: actions/checkout@v3
@@ -196,7 +217,11 @@ jobs:
196217
197218
wasm_bindings:
198219
name: Build and test wasm bindings
199-
runs-on: spacetimedb-runner
220+
runs-on: spacetimedb-new-runner
221+
container:
222+
image: localhost:5000/spacetimedb-ci:latest
223+
options: >-
224+
--privileged
200225
steps:
201226
- uses: actions/checkout@v3
202227

@@ -221,7 +246,11 @@ jobs:
221246

222247
publish_checks:
223248
name: Check that packages are publishable
224-
runs-on: ubuntu-latest
249+
runs-on: spacetimedb-new-runner
250+
container:
251+
image: localhost:5000/spacetimedb-ci:latest
252+
options: >-
253+
--privileged
225254
permissions: read-all
226255
steps:
227256
- uses: actions/checkout@v3
@@ -289,7 +318,7 @@ jobs:
289318
name: Unreal Engine Tests
290319
# 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
291320
# a custom runner.
292-
runs-on: spacetimedb-runner
321+
runs-on: spacetimedb-new-runner
293322
# Skip if this is an external contribution. GitHub secrets will be empty, so the step would fail anyway.
294323
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }}
295324
container:
@@ -368,13 +397,17 @@ jobs:
368397
369398
cd "$GITHUB_WORKSPACE/sdks/unreal"
370399
cargo --version
371-
cargo test
400+
cargo test -- --test-threads=1
372401
'
373402
374403
cli_docs:
375404
name: Check CLI docs
376405
permissions: read-all
377-
runs-on: ubuntu-latest
406+
runs-on: spacetimedb-new-runner
407+
container:
408+
image: localhost:5000/spacetimedb-ci:latest
409+
options: >-
410+
--privileged
378411
steps:
379412
- name: Find Git ref
380413
env:

.github/workflows/csharp-test.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ concurrency:
1212

1313
jobs:
1414
unity-testsuite:
15-
runs-on: spacetimedb-runner
15+
runs-on: spacetimedb-new-runner
16+
container:
17+
image: localhost:5000/spacetimedb-ci:latest
18+
options: >-
19+
--privileged
20+
--cgroupns=host
1621
# Cancel any previous testsuites running on the same PR and/or ref.
1722
concurrency:
1823
group: unity-test-${{ github.event.pull_request.number || github.ref }}
@@ -81,7 +86,7 @@ jobs:
8186
cargo install --force --path crates/cli --locked --message-format=short
8287
cargo install --force --path crates/standalone --locked --message-format=short
8388
# Add a handy alias using the old binary name, so that we don't have to rewrite all scripts (incl. in submodules).
84-
ln -sf $HOME/.cargo/bin/spacetimedb-cli $HOME/.cargo/bin/spacetime
89+
ln -sf $CARGO_HOME/bin/spacetimedb-cli $CARGO_HOME/bin/spacetime
8590
env:
8691
# Share the target directory with our local project to avoid rebuilding same SpacetimeDB crates twice.
8792
CARGO_TARGET_DIR: demo/Blackholio/server-rust/target
@@ -157,6 +162,9 @@ jobs:
157162
key: Unity-${{ github.head_ref }}
158163
restore-keys: Unity-
159164

165+
# We need this to support "Docker in Docker"
166+
- name: Start Docker daemon
167+
run: /usr/local/bin/start-docker.sh
160168
- name: Run Unity tests
161169
uses: game-ci/unity-test-runner@v4
162170
with:

0 commit comments

Comments
 (0)