Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
601ce51
[bfops/ci-caching]: CI - Cache more of our build outputs
bfops Oct 28, 2025
818bdf0
[bfops/ci-caching]: empty commit to bump CI
bfops Oct 28, 2025
85fd6f9
[bfops/ci-caching]: empty commit to bump CI
bfops Oct 28, 2025
20bfe62
[bfops/ci-caching]: empty commit to bump CI
bfops Oct 28, 2025
fa1b9ca
[bfops/ci-caching]: try simpler run
bfops Nov 12, 2025
643ff44
[bfops/ci-caching]: env vars in other workflows
bfops Nov 12, 2025
0a0e222
[bfops/ci-caching]: try cache refactor
bfops Nov 12, 2025
644d5b1
[bfops/ci-caching]: docker slim
bfops Nov 12, 2025
de21a67
[bfops/ci-caching]: back to docker
bfops Nov 12, 2025
0bdfd34
[bfops/ci-caching]: Merge remote-tracking branch 'origin/master' into…
bfops Nov 12, 2025
6a4391f
[bfops/ci-caching]: slim
bfops Nov 13, 2025
d3dc60f
Use new runner for testsuite
jdetter Nov 13, 2025
db4f1a7
[bfops/ci-caching]: slimmer
bfops Nov 13, 2025
8f0e79d
Run job in container
jdetter Nov 13, 2025
eefdd0b
Use custom container
jdetter Nov 13, 2025
71980d3
Use local container
jdetter Nov 13, 2025
f5e5c06
[bfops/ci-caching]: update correct dockerfile
bfops Nov 13, 2025
3d22d05
updated workflow
jdetter Nov 13, 2025
62a4f7e
Fix run for fallocate test
jdetter Nov 13, 2025
bea3a3e
[bfops/ci-caching]: fix
bfops Nov 13, 2025
18f280d
[bfops/ci-caching]: slim down
bfops Nov 13, 2025
3b5e57d
[bfops/ci-caching]: reduce ci
bfops Nov 13, 2025
ac437f8
Run smoketests on the custom runner
jdetter Nov 13, 2025
3adead2
[bfops/ci-caching]: debugging
bfops Nov 13, 2025
bb4aff8
[bfops/ci-caching]: output
bfops Nov 13, 2025
f2d184b
[bfops/ci-caching]: reduce
bfops Nov 13, 2025
beb7dbc
[bfops/ci-caching]: more
bfops Nov 13, 2025
04d575d
[bfops/ci-caching]: fix
bfops Nov 13, 2025
b468015
[bfops/ci-caching]: confusing
bfops Nov 13, 2025
bf00263
[bfops/ci-caching]: maybe
bfops Nov 13, 2025
58c284c
[bfops/ci-caching]: review
bfops Nov 13, 2025
ce882d4
[bfops/ci-caching]: review
bfops Nov 13, 2025
fa624f9
Rerun CI
jdetter Nov 13, 2025
06d5417
[bfops/ci-caching]: maybe?
bfops Nov 13, 2025
7568036
[bfops/ci-caching]: more
bfops Nov 13, 2025
139f853
[bfops/ci-caching]: debug
bfops Nov 13, 2025
1e4f47f
[bfops/ci-caching]: more
bfops Nov 13, 2025
e3efd65
[bfops/ci-caching]: no ignore
bfops Nov 13, 2025
e3afbda
[bfops/ci-caching]: reduce
bfops Nov 13, 2025
22eaec5
[bfops/ci-caching]: remove volume
bfops Nov 13, 2025
7aa773b
[bfops/ci-caching]: fix
bfops Nov 13, 2025
7742d30
[bfops/ci-caching]: logs
bfops Nov 13, 2025
ee08d47
[bfops/ci-caching]: WIP
bfops Nov 13, 2025
d3bb169
[bfops/ci-caching]: update
bfops Nov 13, 2025
0a75792
[bfops/ci-caching]: fix
bfops Nov 13, 2025
dbc13c5
[bfops/ci-caching]: absolute
bfops Nov 13, 2025
2b37cc1
[bfops/ci-caching]: update
bfops Nov 13, 2025
359e55c
[bfops/ci-caching]: cache more
bfops Nov 13, 2025
d167bc0
[bfops/ci-caching]: empty commit to bump CI
bfops Nov 13, 2025
7ba5a74
Potential fix
jdetter Nov 13, 2025
d50a347
One-liner
jdetter Nov 13, 2025
9e92535
Indenting fix
jdetter Nov 13, 2025
4cd95dc
Use docker in docker
jdetter Nov 13, 2025
29b0859
Fix copy/paste issue
jdetter Nov 13, 2025
b8769b7
Add debug step
jdetter Nov 13, 2025
5112401
Remove debug
jdetter Nov 13, 2025
a910289
[bfops/ci-caching]: restore
bfops Nov 14, 2025
6a32b0a
[bfops/ci-caching]: fix target dir
bfops Nov 14, 2025
905892c
[bfops/ci-caching]: tweak
bfops Nov 14, 2025
7b9ea8c
[bfops/ci-caching]: review
bfops Nov 14, 2025
729aff5
[bfops/ci-caching]: stop caching for test spacetimedb-update because …
bfops Nov 14, 2025
c8d92cc
[bfops/ci-caching]: empty
bfops Nov 14, 2025
6ef59eb
Few docker updates
jdetter Nov 14, 2025
325901f
Let's give the unreal engine testsuite a try
jdetter Nov 14, 2025
14a2f1f
Fix
jdetter Nov 14, 2025
4ec0cfe
Let's try the Unity tests as well
jdetter Nov 14, 2025
04b25fa
Try unity testsuite again
jdetter Nov 14, 2025
27bb5c0
Use start docker so that the testsuite can access docker
jdetter Nov 14, 2025
84e344e
Rebuild
jdetter Nov 14, 2025
5458647
Rebuild again
jdetter Nov 14, 2025
96090a0
Use cargo home instead
jdetter Nov 14, 2025
c3faf0c
Fix cgroups error
jdetter Nov 14, 2025
bb2462e
Remove debug
jdetter Nov 14, 2025
4d33efd
All tests are passing
jdetter Nov 14, 2025
c96eeef
Merge branch 'master' into jdetter/use-new-runner
jdetter Nov 14, 2025
8384f9a
Try sequential testing for UnrealEngine
jdetter Nov 14, 2025
2ddb8a1
Merge remote-tracking branch 'origin/jdetter/use-new-runner' into jde…
jdetter Nov 14, 2025
f9bd412
Merge branch 'master' into jdetter/use-new-runner
jdetter Nov 17, 2025
5eec82c
Serial test
jdetter Nov 17, 2025
d6ac573
Use --test-threads properly
jdetter Nov 17, 2025
5552c9a
Update comment
jdetter Nov 17, 2025
7213e91
Restored runner line
jdetter Nov 17, 2025
d9208b4
[bfops/ci-caching]: revert
bfops Nov 17, 2025
bc73a14
[bfops/ci-caching]: use custom docker-compose file
bfops Nov 17, 2025
a01d261
[bfops/ci-caching]: reduce
bfops Nov 17, 2025
642d3f0
[bfops/ci-caching]: comment
bfops Nov 17, 2025
46fd69a
[bfops/ci-caching]: fix compose invoke
bfops Nov 17, 2025
4b3d28b
[bfops/ci-caching]: fix
bfops Nov 17, 2025
e87402a
[bfops/ci-caching]: fix
bfops Nov 17, 2025
9b6c337
[bfops/ci-caching]: fix
bfops Nov 17, 2025
1494ee4
[bfops/ci-caching]: fix compose file
bfops Nov 17, 2025
8c22386
Eliminated some options in running the unreal tests
jdetter Nov 17, 2025
b7ea06f
Merge branch 'master' into bfops/ci-caching
bfops Nov 17, 2025
c3ebef0
[bfops/ci-caching]: revert docker changes to see how long things take
bfops Nov 17, 2025
4139aae
[bfops/ci-caching]: Merge branch 'bfops/ci-caching' of github.com:clo…
bfops Nov 17, 2025
99b147c
Revert "[bfops/ci-caching]: revert docker changes to see how long thi…
bfops Nov 17, 2025
ce31ca5
[bfops/ci-caching]: simpler?
bfops Nov 17, 2025
e3b0ebd
[bfops/ci-caching]: Merge remote-tracking branch 'origin/jdetter/use-…
bfops Nov 17, 2025
0ac4e03
Merge branch 'master' into bfops/ci-caching
bfops Nov 17, 2025
ebf74ae
Merge branch 'master' into bfops/ci-caching
jdetter Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Minimal Dockerfile that just wraps pre-built binaries, so we can test the server inside docker
FROM rust:1.90.0
RUN mkdir -p /stdb/data
COPY ./target/debug/spacetimedb-standalone ./target/debug/spacetimedb-cli /usr/local/bin/
COPY ./crates/standalone/config.toml /stdb/data/config.toml
RUN ln -s /usr/local/bin/spacetimedb-cli /usr/local/bin/spacetime
15 changes: 15 additions & 0 deletions .github/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
node:
labels:
app: spacetimedb
build:
context: ../
dockerfile: .github/Dockerfile
ports:
- "3000:3000"
# Postgres
- "5432:5432"
entrypoint: spacetime start --pg-port 5432
privileged: true
environment:
RUST_BACKTRACE: 1
61 changes: 57 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ jobs:
container: null
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container }}

env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
steps:
- name: Find Git ref
env:
Expand All @@ -53,6 +54,15 @@ jobs:
with:
ref: ${{ env.GIT_REF }}
- uses: dsherret/rust-toolchain-file@v1
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ github.workspace }}
shared-key: spacetimedb
cache-on-failure: true
cache-all-crates: true
cache-workspace-crates: true

- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
Expand All @@ -71,21 +81,25 @@ jobs:
if: runner.os == 'Windows'
run: choco install psql -y --no-progress
shell: powershell
- name: Build crates
run: cargo build -p spacetimedb-cli -p spacetimedb-standalone -p spacetimedb-update
- name: Start Docker daemon
if: runner.os == 'Linux'
run: /usr/local/bin/start-docker.sh

- name: Build and start database (Linux)
if: runner.os == 'Linux'
run: docker compose up -d
run: |
# Our .dockerignore omits `target`, which our CI Dockerfile needs.
rm .dockerignore
docker compose -f .github/docker-compose.yml up -d
- name: Build and start database (Windows)
if: runner.os == 'Windows'
run: |
# Fail properly if any individual command fails
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true

cargo build -p spacetimedb-cli -p spacetimedb-standalone -p spacetimedb-update
Start-Process target/debug/spacetimedb-cli.exe -ArgumentList 'start --pg-port 5432'
cd modules
# the sdk-manifests on windows-latest are messed up, so we need to update them
Expand All @@ -101,7 +115,7 @@ jobs:
run: python -m smoketests ${{ matrix.smoketest_args }} -x clear_database replication teams
- name: Stop containers (Linux)
if: always() && runner.os == 'Linux'
run: docker compose down
run: docker compose -f .github/docker-compose.yml down

test:
name: Test Suite
Expand All @@ -110,6 +124,8 @@ jobs:
image: localhost:5000/spacetimedb-ci:latest
options: >-
--privileged
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
steps:
- name: Find Git ref
env:
Expand All @@ -129,6 +145,13 @@ jobs:
ref: ${{ env.GIT_REF }}

- uses: dsherret/rust-toolchain-file@v1
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ github.workspace }}
shared-key: spacetimedb
# Let the smoketests job save the cache since it builds the most things
save-if: false

- uses: actions/setup-dotnet@v3
with:
Expand Down Expand Up @@ -179,13 +202,23 @@ jobs:
image: localhost:5000/spacetimedb-ci:latest
options: >-
--privileged
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
steps:
- name: Checkout sources
uses: actions/checkout@v3

- uses: dsherret/rust-toolchain-file@v1
- run: echo ::add-matcher::.github/workflows/rust_matcher.json

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ github.workspace }}
shared-key: spacetimedb
# Let the smoketests job save the cache since it builds the most things
save-if: false

- uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
Expand Down Expand Up @@ -222,12 +255,22 @@ jobs:
image: localhost:5000/spacetimedb-ci:latest
options: >-
--privileged
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
steps:
- uses: actions/checkout@v3

- uses: dsherret/rust-toolchain-file@v1
- run: echo ::add-matcher::.github/workflows/rust_matcher.json

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ github.workspace }}
shared-key: spacetimedb
# Let the smoketests job save the cache since it builds the most things
save-if: false

- name: Run bindgen tests
run: cargo test -p spacetimedb-codegen

Expand Down Expand Up @@ -408,6 +451,8 @@ jobs:
image: localhost:5000/spacetimedb-ci:latest
options: >-
--privileged
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
steps:
- name: Find Git ref
env:
Expand Down Expand Up @@ -451,6 +496,14 @@ jobs:

- uses: dsherret/rust-toolchain-file@v1

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ github.workspace }}
shared-key: spacetimedb
# Let the smoketests job save the cache since it builds the most things
save-if: false

- name: Check for docs change
run: |
cargo run --features markdown-docs -p spacetimedb-cli > docs/docs/cli-reference.md
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/csharp-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
group: unity-test-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
timeout-minutes: 30
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
steps:
- name: Checkout repository
id: checkout-stdb
Expand Down Expand Up @@ -70,26 +72,18 @@ jobs:

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
id: cache-rust-deps
with:
workspaces: demo/Blackholio/server-rust
key: ${{ steps.checkout-stdb.outputs.commit }}
# Cache Rust deps even if unit tests have failed.
cache-on-failure: true
# Cache the CLI as well.
cache-all-crates: true
workspaces: ${{ github.workspace }}
shared-key: spacetimedb
# Let the main CI job save the cache since it builds the most things
save-if: false

- name: Install SpacetimeDB CLI from the local checkout
# Rebuild only if we didn't get a precise cache hit.
if: steps.cache-rust-deps.outputs.cache-hit == 'false'
run: |
cargo install --force --path crates/cli --locked --message-format=short
cargo install --force --path crates/standalone --locked --message-format=short
# Add a handy alias using the old binary name, so that we don't have to rewrite all scripts (incl. in submodules).
ln -sf $CARGO_HOME/bin/spacetimedb-cli $CARGO_HOME/bin/spacetime
env:
# Share the target directory with our local project to avoid rebuilding same SpacetimeDB crates twice.
CARGO_TARGET_DIR: demo/Blackholio/server-rust/target

- name: Check quickstart-chat bindings are up to date
working-directory: sdks/csharp
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/typescript-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ concurrency:
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target

steps:
- name: Checkout repository
Expand Down Expand Up @@ -81,10 +83,10 @@ jobs:
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
modules/quickstart-chat
shared-key: quickstart-chat-test
workspaces: ${{ github.workspace }}
shared-key: spacetimedb
# Let the main CI job save the cache since it builds the most things
save-if: false

- name: Install SpacetimeDB CLI from the local checkout
run: |
Expand Down
2 changes: 1 addition & 1 deletion smoketests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
REMOTE_SERVER = False

# default value can be overridden by `--compose-file` flag
COMPOSE_FILE = "./docker-compose.yml"
COMPOSE_FILE = ".github/docker-compose.yml"

# this will be initialized by main()
STDB_CONFIG = ''
Expand Down
Loading