Skip to content

Commit bca944d

Browse files
committed
Merge branch 'master' into noa/unconflate-budget-and-energy
2 parents e33ecd0 + dd4ac18 commit bca944d

697 files changed

Lines changed: 26626 additions & 51515 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.

.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ rustflags = ["--cfg", "tokio_unstable"]
55
bump-versions = "run -p upgrade-version --"
66
llm = "run --package xtask-llm-benchmark --bin llm_benchmark --"
77
ci = "run -p ci --"
8+
regen = "run -p regen --"
89
smoketest = "ci smoketests --"
910
smoketests = "smoketest"
1011
lint = "ci lint --"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Set up pnpm
2+
description: Install pnpm and configure repository package-age policy before any install
3+
inputs:
4+
run_install:
5+
description: Run pnpm install after configuring pnpm
6+
required: false
7+
default: "false"
8+
runs:
9+
using: composite
10+
steps:
11+
- uses: pnpm/action-setup@v4
12+
13+
- name: Configure pnpm package age policy
14+
shell: bash
15+
run: pnpm config set --global minimumReleaseAge 1440
16+
17+
- name: Install dependencies
18+
if: inputs.run_install == 'true'
19+
shell: bash
20+
run: pnpm install

.github/workflows/attach-artifacts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v4
1919

20-
- name: Download artifacts from private base URL
20+
- name: Download artifacts from AWS base URL
2121
env:
2222
RELEASE_TAG: ${{ github.event.inputs.release_tag }}
23-
BASE_URL: ${{ secrets.ARTIFACT_BASE_URL }}
23+
BASE_URL: https://${{ vars.AWS_BUCKET }}.s3.amazonaws.com/refs/tags
2424
run: |
2525
set -euo pipefail
2626

.github/workflows/benchmarks.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ on:
22
push:
33
branches:
44
- master
5-
- jgilles/fix-callgrind-again
65

76
workflow_dispatch:
87
inputs:
@@ -24,8 +23,10 @@ jobs:
2423
benchmark:
2524
name: run criterion benchmarks
2625
runs-on: benchmarks-runner
26+
# disable until we fix the benchmarks
27+
if: false
2728
# filter for a comment containing 'benchmarks please'
28-
if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, 'benchmarks please')) }}
29+
#if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, 'benchmarks please')) }}
2930
env:
3031
PR_NUMBER: ${{ github.event.inputs.pr_number || github.event.issue.number || null }}
3132
steps:
@@ -185,8 +186,10 @@ jobs:
185186
container:
186187
image: rust:1.93.0
187188
options: --privileged
189+
# disable until we fix the benchmarks
190+
if: false
188191
# filter for a comment containing 'benchmarks please'
189-
if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, 'benchmarks please')) }}
192+
#if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, 'benchmarks please')) }}
190193
env:
191194
PR_NUMBER: ${{ github.event.inputs.pr_number || github.event.issue.number || null }}
192195
steps:

.github/workflows/ci.yml

Lines changed: 36 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
with:
8181
node-version: 18
8282

83-
- uses: pnpm/action-setup@v4
83+
- uses: ./.github/actions/setup-pnpm
8484
with:
8585
run_install: true
8686

@@ -221,7 +221,7 @@ jobs:
221221
with:
222222
node-version: 22
223223

224-
- uses: pnpm/action-setup@v4
224+
- uses: ./.github/actions/setup-pnpm
225225
with:
226226
run_install: true
227227

@@ -297,7 +297,7 @@ jobs:
297297
with:
298298
node-version: 22
299299

300-
- uses: pnpm/action-setup@v4
300+
- uses: ./.github/actions/setup-pnpm
301301
with:
302302
run_install: true
303303

@@ -524,7 +524,7 @@ jobs:
524524
with:
525525
node-version: 22
526526

527-
- uses: pnpm/action-setup@v4
527+
- uses: ./.github/actions/setup-pnpm
528528
with:
529529
run_install: true
530530

@@ -558,39 +558,6 @@ jobs:
558558
run: |
559559
cargo ci cli-docs
560560
561-
llm_ci_check:
562-
name: Verify LLM benchmark is up to date
563-
permissions:
564-
contents: read
565-
runs-on: ubuntu-latest
566-
# Disable the tests because they are causing us headaches with merge conflicts and re-runs etc.
567-
if: false
568-
steps:
569-
# Build the tool from master to ensure consistent hash computation
570-
# with the llm-benchmark-update workflow (which also uses master's tool).
571-
- name: Checkout master (build tool from trusted code)
572-
uses: actions/checkout@v4
573-
with:
574-
ref: master
575-
fetch-depth: 1
576-
577-
- uses: dtolnay/rust-toolchain@stable
578-
- uses: Swatinem/rust-cache@v2
579-
580-
- name: Install llm-benchmark tool from master
581-
run: |
582-
cargo install --path tools/xtask-llm-benchmark --locked
583-
command -v llm_benchmark
584-
585-
# Now checkout the PR branch to verify its benchmark files
586-
- name: Checkout PR branch
587-
uses: actions/checkout@v4
588-
with:
589-
clean: false
590-
591-
- name: Run hash check (both langs)
592-
run: llm_benchmark ci-check
593-
594561
unity-testsuite:
595562
needs: [lints]
596563
# Skip if this is an external contribution.
@@ -689,7 +656,7 @@ jobs:
689656
}
690657
691658
- name: Hydrate Unity SDK DLLs
692-
run: cargo ci dlls
659+
run: cargo regen csharp dlls
693660

694661
- name: Check Unity meta files
695662
uses: DeNA/unity-meta-check@v3
@@ -722,12 +689,6 @@ jobs:
722689
key: Unity-${{ github.head_ref }}
723690
restore-keys: Unity-
724691

725-
- name: Login to DockerHub
726-
uses: docker/login-action@v2
727-
with:
728-
username: ${{ vars.DOCKERHUB_USERNAME }}
729-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
730-
731692
- name: Run Unity tests
732693
uses: game-ci/unity-test-runner@v4
733694
with:
@@ -780,7 +741,7 @@ jobs:
780741

781742
- name: Run .NET tests
782743
working-directory: sdks/csharp
783-
run: dotnet test -warnaserror --no-restore
744+
run: dotnet test -warnaserror --no-restore SpacetimeDB.ClientSDK.csproj
784745

785746
- name: Verify C# formatting
786747
working-directory: sdks/csharp
@@ -830,10 +791,9 @@ jobs:
830791
ln -sf $CARGO_HOME/bin/spacetimedb-cli $CARGO_HOME/bin/spacetime
831792
832793
- name: Check quickstart-chat bindings are up to date
833-
working-directory: sdks/csharp
834794
run: |
835-
bash tools~/gen-quickstart.sh
836-
"${GITHUB_WORKSPACE}"/tools/check-diff.sh examples~/quickstart-chat || {
795+
bash sdks/csharp/tools~/gen-quickstart.sh
796+
tools/check-diff.sh templates/chat-console-cs/module_bindings || {
837797
echo 'Error: quickstart-chat bindings have changed. Please run `sdks/csharp/tools~/gen-quickstart.sh`.'
838798
exit 1
839799
}
@@ -889,14 +849,18 @@ jobs:
889849
const publicRef = (context.eventName === 'pull_request') ? context.payload.pull_request.head.ref : context.sha;
890850
const publicPrNumber = context.payload.pull_request?.number ?? context.payload.inputs?.pr_number;
891851
const preDispatch = new Date().toISOString();
852+
const inputs = { public_ref: publicRef };
853+
if (publicPrNumber) {
854+
inputs.public_pr_number = String(publicPrNumber);
855+
}
892856
893857
// Dispatch the workflow in the target repository
894858
await github.rest.actions.createWorkflowDispatch({
895859
owner: targetOwner,
896860
repo: targetRepo,
897861
workflow_id: workflowId,
898862
ref: targetRef,
899-
inputs: { public_ref: publicRef, public_pr_number: String(publicPrNumber) }
863+
inputs,
900864
});
901865
902866
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
@@ -1093,7 +1057,7 @@ jobs:
10931057
with:
10941058
node-version: '22'
10951059

1096-
- uses: pnpm/action-setup@v4
1060+
- uses: ./.github/actions/setup-pnpm
10971061
with:
10981062
run_install: true
10991063

@@ -1130,7 +1094,7 @@ jobs:
11301094
with:
11311095
node-version: 22
11321096

1133-
- uses: pnpm/action-setup@v4
1097+
- uses: ./.github/actions/setup-pnpm
11341098
with:
11351099
run_install: true
11361100

@@ -1228,3 +1192,24 @@ jobs:
12281192
# - name: Print rows in the user table
12291193
# if: always()
12301194
# run: spacetime sql quickstart-chat "SELECT * FROM user"
1195+
1196+
version_upgrade_check:
1197+
runs-on: spacetimedb-new-runner-2
1198+
steps:
1199+
- name: Checkout
1200+
uses: actions/checkout@v3
1201+
- uses: dsherret/rust-toolchain-file@v1
1202+
- name: Set default rust toolchain
1203+
run: rustup default $(rustup show active-toolchain | cut -d' ' -f1)
1204+
# pnpm is required for regenerating the typescript bindings
1205+
- name: Set up Node.js
1206+
uses: actions/setup-node@v4
1207+
with:
1208+
node-version: 20
1209+
- uses: ./.github/actions/setup-pnpm
1210+
with:
1211+
run_install: true
1212+
- name: Verify that upgrade-version still works
1213+
run: cargo ci version-upgrade-check
1214+
- name: Show diff
1215+
run: git diff HEAD

.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/docs-publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
node-version: '22'
2222

23-
- uses: pnpm/action-setup@v4
23+
- uses: ./.github/actions/setup-pnpm
2424
with:
2525
run_install: true
2626

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Docs / Update llms files
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
branches:
9+
- docs/release
10+
paths:
11+
- 'docs/docs/**'
12+
- 'skills/**'
13+
workflow_dispatch: # Allow manual trigger
14+
15+
jobs:
16+
update-llms:
17+
runs-on: spacetimedb-new-runner-2
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
with:
22+
ref: docs/release
23+
24+
- name: Set up Node.js
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: '22'
28+
29+
- uses: ./.github/actions/setup-pnpm
30+
with:
31+
run_install: true
32+
33+
- name: Get pnpm store directory
34+
working-directory: sdks/typescript
35+
shell: bash
36+
run: |
37+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
38+
39+
- uses: actions/cache@v4
40+
name: Setup pnpm cache
41+
with:
42+
path: ${{ env.STORE_PATH }}
43+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
44+
restore-keys: |
45+
${{ runner.os }}-pnpm-store-
46+
47+
- name: Install dependencies
48+
working-directory: docs
49+
run: pnpm install
50+
51+
- name: Docusaurus build
52+
working-directory: docs
53+
run: pnpm build
54+
55+
- name: Generate llms files
56+
working-directory: docs
57+
run: node scripts/generate-llms.mjs
58+
59+
- name: Commit updated llms files
60+
working-directory: docs
61+
run: |
62+
git config user.name "github-actions[bot]"
63+
git config user.email "github-actions[bot]@users.noreply.github.com"
64+
git add static/llms.md
65+
git diff --staged --quiet && echo "No changes" && exit 0
66+
git commit -m "Update llms files from docs build"
67+
git push

0 commit comments

Comments
 (0)