Skip to content

Commit 8ac99af

Browse files
committed
Merge master
2 parents 5d0f67c + 85095cf commit 8ac99af

2,407 files changed

Lines changed: 247890 additions & 50288 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ LICENSE.txt @cloutiertyler
77
/crates/client-api-messages/src/websocket.rs @centril @gefjon
88

99
/crates/cli/src/ @bfops @cloutiertyler @jdetter
10+
/tools/ci/ @bfops @cloutiertyler @jdetter
11+
/tools/upgrade-version/ @bfops @jdetter
12+
/tools/license-check/ @bfops @jdetter
13+
/.github/ @bfops @jdetter
1014

1115
/crates/sdk/examples/quickstart-chat/ @gefjon
1216
/modules/quickstart-chat/ @gefjon

.github/GREMLINS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# GREMLINS.md — Who Lives in the Pipes
2+
3+
This file documents the automated agents and bots that operate on this repository.
4+
5+
## Clawd 🔧
6+
7+
- **What:** Anti-entropy gremlin / CI watchdog
8+
- **GitHub account:** `clockwork-labs-bot`
9+
- **Discord channel:** #gremlins (CL - SpacetimeDB)
10+
- **Powered by:** [OpenClaw](https://github.com/openclaw/openclaw) + Claude
11+
12+
### What Clawd does
13+
14+
- **Monitors CI** — watches for failures, flaky tests, and regressions
15+
- **Reviews PRs** — comments on obvious bugs (never approves)
16+
- **Surfaces stale PRs** — finds approved PRs that just need a rebase
17+
- **Documents testing** — creates and maintains `DEVELOP.md` files explaining CI and test infrastructure
18+
- **Alerts the team** — posts findings in #gremlins, pings DevOps when something needs attention
19+
20+
### What Clawd does NOT do
21+
22+
- Approve or merge PRs
23+
- Take any destructive action (delete branches, close PRs, force push)
24+
- Modify production infrastructure
25+
26+
### Contacting Clawd
27+
28+
- Mention `@Openclaw` in #gremlins on Discord
29+
- Tag `@clockwork-labs-bot` on GitHub PRs/issues
30+
31+
---
32+
33+
*To add a new gremlin, document it here.*

.github/workflows/ci.yml

Lines changed: 64 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
timeout-minutes: 120
3333
env:
3434
CARGO_TARGET_DIR: ${{ github.workspace }}/target
35+
SPACETIMEDB_CPP_DIR: ${{ github.workspace }}/crates/bindings-cpp
3536
steps:
3637
- name: Find Git ref
3738
env:
@@ -79,6 +80,25 @@ jobs:
7980
with:
8081
run_install: true
8182

83+
# Install emscripten for C++ module compilation tests.
84+
- name: Install emscripten (Linux)
85+
if: runner.os == 'Linux'
86+
shell: bash
87+
run: |
88+
git clone https://github.com/emscripten-core/emsdk.git ~/emsdk
89+
cd ~/emsdk
90+
./emsdk install 4.0.21
91+
./emsdk activate 4.0.21
92+
93+
- name: Install emscripten (Windows)
94+
if: runner.os == 'Windows'
95+
shell: pwsh
96+
run: |
97+
git clone https://github.com/emscripten-core/emsdk.git $env:USERPROFILE\emsdk
98+
cd $env:USERPROFILE\emsdk
99+
.\emsdk install 4.0.21
100+
.\emsdk activate 4.0.21
101+
82102
- name: Install psql (Windows)
83103
if: runner.os == 'Windows'
84104
run: choco install psql -y --no-progress
@@ -122,11 +142,34 @@ jobs:
122142
- name: Install cargo-nextest
123143
uses: taiki-e/install-action@nextest
124144

125-
- name: Run smoketests
126-
# --test-threads=1 eliminates contention in the C# tests where they fight over bindings
127-
# build artifacts.
128-
# It also seemed to improve performance a fair amount (11m -> 6m)
129-
run: cargo ci smoketests -- --test-threads=1
145+
# --test-threads=1 eliminates contention in the C# tests where they fight over bindings
146+
# build artifacts.
147+
# It also seemed to improve performance a fair amount (11m -> 6m)
148+
- name: Run smoketests (Linux)
149+
if: runner.os == 'Linux'
150+
shell: bash
151+
run: |
152+
if [ -f ~/emsdk/emsdk_env.sh ]; then
153+
source ~/emsdk/emsdk_env.sh
154+
fi
155+
cargo ci smoketests -- --test-threads=1
156+
157+
# Due to Emscripten PATH issues this was separated to make sure OpenSSL still builds correctly
158+
- name: Run smoketests (Windows)
159+
if: runner.os == 'Windows'
160+
shell: pwsh
161+
run: |
162+
if (Test-Path "$env:USERPROFILE\emsdk\emsdk_env.ps1") {
163+
& "$env:USERPROFILE\emsdk\emsdk_env.ps1" | Out-Null
164+
}
165+
cargo ci smoketests -- --test-threads=1
166+
167+
- name: Check for changes
168+
run: |
169+
tools/check-diff.sh crates/smoketests || {
170+
echo 'Error: There is a diff in the smoketests directory.'
171+
exit 1
172+
}
130173
131174
smoketests-python:
132175
needs: [lints]
@@ -806,6 +849,12 @@ jobs:
806849
key: Unity-${{ github.head_ref }}
807850
restore-keys: Unity-
808851

852+
- name: Login to DockerHub
853+
uses: docker/login-action@v2
854+
with:
855+
username: ${{ vars.DOCKERHUB_USERNAME }}
856+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
857+
809858
- name: Run Unity tests
810859
uses: game-ci/unity-test-runner@v4
811860
with:
@@ -903,7 +952,7 @@ jobs:
903952
export CARGO_HOME="$HOME/.cargo"
904953
echo "$CARGO_HOME/bin" >> "$GITHUB_PATH"
905954
cargo install --force --path crates/cli --locked --message-format=short
906-
cargo install --force --path crates/standalone --locked --message-format=short
955+
cargo install --force --path crates/standalone --features allow_loopback_http_for_tests --locked --message-format=short
907956
# Add a handy alias using the old binary name, so that we don't have to rewrite all scripts (incl. in submodules).
908957
ln -sf $CARGO_HOME/bin/spacetimedb-cli $CARGO_HOME/bin/spacetime
909958
@@ -916,14 +965,15 @@ jobs:
916965
exit 1
917966
}
918967
919-
- name: Check client-api bindings are up to date
920-
working-directory: sdks/csharp
921-
run: |
922-
bash tools~/gen-client-api.sh
923-
"${GITHUB_WORKSPACE}"/tools/check-diff.sh src/SpacetimeDB/ClientApi || {
924-
echo 'Error: Client API bindings are dirty. Please run `sdks/csharp/tools~/gen-client-api.sh`.'
925-
exit 1
926-
}
968+
# TODO: Re-enable this once csharp is using the v2 ws api.
969+
# - name: Check client-api bindings are up to date
970+
# working-directory: sdks/csharp
971+
# run: |
972+
# bash tools~/gen-client-api.sh
973+
# "${GITHUB_WORKSPACE}"/tools/check-diff.sh src/SpacetimeDB/ClientApi || {
974+
# echo 'Error: Client API bindings are dirty. Please run `sdks/csharp/tools~/gen-client-api.sh`.'
975+
# exit 1
976+
# }
927977

928978
- name: Start SpacetimeDB
929979
run: |

.github/workflows/package.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
include:
17-
- { name: x86_64 Linux, target: x86_64-unknown-linux-gnu, runner: spacetimedb-new-runner-2 }
17+
# WARNING - do not upgrade this runner to 24.04 or the self hosted runners because it will break downloads for
18+
# anyone who uses a linux distro that doesn't have glibc >= GLIBC_2.38
19+
- { name: x86_64 Linux, target: x86_64-unknown-linux-gnu, runner: ubuntu-22.04 }
1820
- { name: aarch64 Linux, target: aarch64-unknown-linux-gnu, runner: arm-runner }
1921
# Disabled because musl builds weren't working and we didn't want to investigate. See https://github.com/clockworklabs/SpacetimeDB/pull/2964.
2022
# - { name: x86_64 Linux musl, target: x86_64-unknown-linux-musl, runner: bare-metal, container: alpine }

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ new.json
225225
*.pem
226226
.ok.sql
227227

228+
# Intermediate file generated when updating the external client SDKs' WS format bindings
229+
crates/client-api-messages/ws_schema.json
230+
228231
# Test data
229232
!crates/core/testdata/
230233

@@ -234,6 +237,10 @@ new.json
234237
# C++ build data
235238
modules/benchmarks-cpp/build/
236239
modules/module-test-cpp/build/
240+
modules/sdk-test-cpp/build/
241+
modules/sdk-test-connect-disconnect-cpp/build/
242+
modules/sdk-test-procedure-cpp/build/
243+
modules/sdk-test-view-cpp/build/
237244

238245
# Symlinked output from `nix build`
239246
result
@@ -253,3 +260,7 @@ nul
253260
# csharp SDK packages
254261
/sdks/csharp/packages/
255262
/sdks/csharp/packages.meta
263+
264+
# AI agent config
265+
.codex
266+
.claude

0 commit comments

Comments
 (0)