Skip to content

Commit 2b8b82b

Browse files
committed
Merge remote-tracking branch 'origin/master' into phoebe/table-non-full-pages-heap
2 parents e0e3d2c + 13a2ffd commit 2b8b82b

188 files changed

Lines changed: 8615 additions & 1356 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/workflows/ci.yml

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,63 @@ jobs:
265265
source ~/emsdk/emsdk_env.sh
266266
cargo ci test
267267
268+
keynote_bench:
269+
needs: [lints]
270+
name: Keynote Bench
271+
runs-on: spacetimedb-benchmark-runner
272+
timeout-minutes: 60
273+
env:
274+
CARGO_TARGET_DIR: ${{ github.workspace }}/target
275+
steps:
276+
- name: Find Git ref
277+
env:
278+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
279+
run: |
280+
PR_NUMBER="${{ github.event.inputs.pr_number || null }}"
281+
if test -n "${PR_NUMBER}"; then
282+
GIT_REF="$( gh pr view --repo clockworklabs/SpacetimeDB $PR_NUMBER --json headRefName --jq .headRefName )"
283+
else
284+
GIT_REF="${{ github.ref }}"
285+
fi
286+
echo "GIT_REF=${GIT_REF}" >>"$GITHUB_ENV"
287+
288+
- name: Checkout sources
289+
uses: actions/checkout@v4
290+
with:
291+
ref: ${{ env.GIT_REF }}
292+
293+
- uses: dsherret/rust-toolchain-file@v1
294+
- name: Set default rust toolchain
295+
run: rustup default $(rustup show active-toolchain | cut -d' ' -f1)
296+
297+
- name: Cache Rust dependencies
298+
uses: Swatinem/rust-cache@v2
299+
with:
300+
workspaces: ${{ github.workspace }}
301+
shared-key: spacetimedb
302+
save-if: false
303+
prefix-key: v1
304+
305+
- name: Build keynote benchmark binaries
306+
run: cargo build --release -p spacetimedb-cli -p spacetimedb-standalone
307+
308+
# Node 24 is the current Active LTS line.
309+
- name: Set up Node.js
310+
uses: actions/setup-node@v4
311+
with:
312+
node-version: 24
313+
314+
- uses: ./.github/actions/setup-pnpm
315+
with:
316+
run_install: true
317+
318+
- name: Build TypeScript SDK
319+
run: pnpm build
320+
working-directory: crates/bindings-typescript
321+
322+
- name: Run keynote-2 benchmark regression check
323+
run: cargo ci keynote-bench
324+
268325
lints:
269326
name: Lints
270327
runs-on: spacetimedb-new-runner-2
@@ -689,12 +746,6 @@ jobs:
689746
key: Unity-${{ github.head_ref }}
690747
restore-keys: Unity-
691748

692-
- name: Login to DockerHub
693-
uses: docker/login-action@v2
694-
with:
695-
username: ${{ vars.DOCKERHUB_USERNAME }}
696-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
697-
698749
- name: Run Unity tests
699750
uses: game-ci/unity-test-runner@v4
700751
with:
@@ -747,7 +798,7 @@ jobs:
747798

748799
- name: Run .NET tests
749800
working-directory: sdks/csharp
750-
run: dotnet test -warnaserror --no-restore
801+
run: dotnet test -warnaserror --no-restore SpacetimeDB.ClientSDK.csproj
751802

752803
- name: Verify C# formatting
753804
working-directory: sdks/csharp
@@ -836,13 +887,26 @@ jobs:
836887
&& (github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork) }}
837888
permissions:
838889
contents: read
890+
pull-requests: read
839891
runs-on: ubuntu-latest
840892
env:
841893
TARGET_OWNER: clockworklabs
842894
TARGET_REPO: SpacetimeDBPrivate
843895
steps:
896+
# Skip the private dispatch entirely when only `docs/` is touched. The job
897+
# itself still completes successfully so required-status-check gating is
898+
# satisfied without spending private-runner time on a docs-only change.
899+
- name: Detect non-docs changes
900+
id: filter
901+
uses: dorny/paths-filter@v3
902+
with:
903+
filters: |
904+
non_docs:
905+
- '!docs/**'
906+
844907
- id: dispatch
845908
name: Trigger tests
909+
if: steps.filter.outputs.non_docs == 'true'
846910
uses: actions/github-script@v7
847911
with:
848912
github-token: ${{ secrets.SPACETIMEDB_PRIVATE_TOKEN }}
@@ -906,6 +970,7 @@ jobs:
906970
core.setOutput('run_url', runUrl);
907971

908972
- name: Wait for Internal Tests to complete
973+
if: steps.filter.outputs.non_docs == 'true'
909974
uses: actions/github-script@v7
910975
with:
911976
github-token: ${{ secrets.SPACETIMEDB_PRIVATE_TOKEN }}
@@ -943,7 +1008,7 @@ jobs:
9431008
}
9441009

9451010
- name: Cancel invoked run if workflow cancelled
946-
if: ${{ cancelled() }}
1011+
if: ${{ cancelled() && steps.dispatch.outputs.run_id }}
9471012
uses: actions/github-script@v7
9481013
with:
9491014
github-token: ${{ secrets.SPACETIMEDB_PRIVATE_TOKEN }}

.github/workflows/docker.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ jobs:
4040
uses: docker/login-action@v2
4141
with:
4242
username: ${{ vars.DOCKERHUB_USERNAME }}
43-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
43+
# Docker Hub access tokens are passed to docker/login-action via the password input.
44+
password: ${{ secrets.DOCKERHUB_TOKEN }}
4445
- name: Build and push
4546
uses: docker/build-push-action@v4
4647
with:
@@ -101,7 +102,8 @@ jobs:
101102
uses: docker/login-action@v2
102103
with:
103104
username: ${{ vars.DOCKERHUB_USERNAME }}
104-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
105+
# Docker Hub access tokens are passed to docker/login-action via the password input.
106+
password: ${{ secrets.DOCKERHUB_TOKEN }}
105107
- name: Build and push
106108
uses: docker/build-push-action@v4
107109
with:

.github/workflows/tag-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
uses: docker/login-action@v2
1515
with:
1616
username: ${{ vars.DOCKERHUB_USERNAME }}
17-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
17+
# Docker Hub access tokens are passed to docker/login-action via the password input.
18+
password: ${{ secrets.DOCKERHUB_TOKEN }}
1819

1920
- name: Retag the image
2021
run: |

0 commit comments

Comments
 (0)