@@ -342,24 +342,8 @@ jobs:
342342 - uses : dsherret/rust-toolchain-file@v1
343343 - name : Set default rust toolchain
344344 run : rustup default $(rustup show active-toolchain | cut -d' ' -f1)
345- - name : Set up Python env
346- run : |
347- test -d venv || python3 -m venv venv
348- venv/bin/pip3 install argparse toml
349345 - name : Run checks
350- run : |
351- set -ueo pipefail
352- FAILED=0
353- ROOTS=(spacetimedb spacetimedb-sdk)
354- CRATES=$(venv/bin/python3 tools/find-publish-list.py --recursive --directories --quiet "${ROOTS[@]}")
355- for crate_dir in $CRATES; do
356- if ! venv/bin/python3 tools/crate-publish-checks.py "${crate_dir}"; then
357- FAILED=$(( $FAILED + 1 ))
358- fi
359- done
360- if [ $FAILED -gt 0 ]; then
361- exit 1
362- fi
346+ run : cargo ci publish-checks
363347
364348 update :
365349 name : Test spacetimedb-update flow (${{ matrix.target }})
@@ -1160,13 +1144,12 @@ jobs:
11601144 restore-keys : |
11611145 ${{ runner.os }}-pnpm-store-
11621146
1163- - name : Install dependencies
1164- working-directory : docs
1165- run : pnpm install
1147+ - uses : dsherret/rust-toolchain-file@v1
1148+ - name : Set default rust toolchain
1149+ run : rustup default $(rustup show active-toolchain | cut -d' ' -f1)
11661150
11671151 - name : Docusaurus build
1168- working-directory : docs
1169- run : pnpm build
1152+ run : cargo ci docs
11701153
11711154 typescript-test :
11721155 name : TypeScript - Tests
@@ -1198,14 +1181,6 @@ jobs:
11981181 restore-keys : |
11991182 ${{ runner.os }}-pnpm-store-
12001183
1201- - name : Build module library and SDK
1202- working-directory : crates/bindings-typescript
1203- run : pnpm build
1204-
1205- - name : Run module library and SDK tests
1206- working-directory : crates/bindings-typescript
1207- run : pnpm test
1208-
12091184 # - name: Extract SpacetimeDB branch name from file
12101185 # id: extract-branch
12111186 # run: |
@@ -1245,76 +1220,38 @@ jobs:
12451220 save-if : false
12461221 prefix-key : v1
12471222
1248- # This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a.
1249- # ChatGPT suspects that this could be due to different build invocations using the same target dir,
1250- # and this makes sense to me because we only see it in this job where we mix `cargo build -p` with
1251- # `cargo build --manifest-path` (which apparently build different dependency trees).
1252- # However, we've been unable to fix it so... /shrug
1253- - name : Check v8 outputs
1254- run : |
1255- find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true
1256- if ! [ -f "${CARGO_TARGET_DIR}"/debug/gn_out/obj/librusty_v8.a ]; then
1257- echo "Could not find v8 output file librusty_v8.a; rebuilding manually."
1258- cargo clean -p v8 || true
1259- cargo build -p v8
1260- fi
1261- if ! [ -f "${CARGO_TARGET_DIR}"/release/gn_out/obj/librusty_v8.a ]; then
1262- echo "Could not find v8 output file librusty_v8.a; rebuilding manually."
1263- cargo clean --release -p v8 || true
1264- cargo build --release -p v8
1265- fi
1266-
1267- - name : Install SpacetimeDB CLI from the local checkout
1268- run : |
1269- export CARGO_HOME="$HOME/.cargo"
1270- echo "$CARGO_HOME/bin" >> "$GITHUB_PATH"
1271- cargo install --force --path crates/cli --locked --message-format=short
1272- cargo install --force --path crates/standalone --locked --message-format=short
1273- # Add a handy alias using the old binary name, so that we don't have to rewrite all scripts (incl. in submodules).
1274- ln -sf $CARGO_HOME/bin/spacetimedb-cli $CARGO_HOME/bin/spacetime
1275- # Clear any existing information
1276- spacetime server clear -y
1277-
1278- - name : Generate client bindings
1279- working-directory : templates/chat-react-ts
1280- run : |
1281- pnpm generate
1282-
1283- - name : Check for changes
1284- working-directory : templates/chat-react-ts
1285- run : |
1286- "${GITHUB_WORKSPACE}"/tools/check-diff.sh src/module_bindings || {
1287- echo "Error: Bindings are dirty. Please generate bindings again and commit them to this branch."
1288- exit 1
1289- }
1290-
1291- # - name: Start SpacetimeDB
1292- # run: |
1293- # spacetime start &
1294- # disown
1295-
1296- # - name: Publish module to SpacetimeDB
1297- # working-directory: SpacetimeDB/templates/quickstart-chat-typescript/spacetimedb
1223+ # # This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a.
1224+ # # ChatGPT suspects that this could be due to different build invocations using the same target dir,
1225+ # # and this makes sense to me because we only see it in this job where we mix `cargo build -p` with
1226+ # # `cargo build --manifest-path` (which apparently build different dependency trees).
1227+ # # However, we've been unable to fix it so... /shrug
1228+ # - name: Check v8 outputs
12981229 # run: |
1299- # spacetime logout && spacetime login --server-issued-login local
1300- # spacetime publish -s local quickstart-chat -c -y
1230+ # find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true
1231+ # if ! [ -f "${CARGO_TARGET_DIR}"/debug/gn_out/obj/librusty_v8.a ]; then
1232+ # echo "Could not find v8 output file librusty_v8.a; rebuilding manually."
1233+ # cargo clean -p v8 || true
1234+ # cargo build -p v8
1235+ # fi
1236+ # if ! [ -f "${CARGO_TARGET_DIR}"/release/gn_out/obj/librusty_v8.a ]; then
1237+ # echo "Could not find v8 output file librusty_v8.a; rebuilding manually."
1238+ # cargo clean --release -p v8 || true
1239+ # cargo build --release -p v8
1240+ # fi
13011241
1302- # - name: Publish module to SpacetimeDB
1303- # working-directory: SpacetimeDB/templates/quickstart-chat-typescript/spacetimedb
1242+ # - name: Install SpacetimeDB CLI from the local checkout
13041243 # run: |
1305- # spacetime logs quickstart-chat
1306-
1307- - name : Check that quickstart-chat builds
1308- working-directory : templates/chat-react-ts
1309- run : pnpm build
1310-
1311- - name : Check that templates build
1312- working-directory : templates/
1313- run : pnpm -r --filter "./**" run build
1314-
1315- - name : Check that subdirectories build
1316- working-directory : crates/bindings-typescript
1317- run : pnpm -r --filter "./**" run build
1244+ # export CARGO_HOME="$HOME/.cargo"
1245+ # echo "$CARGO_HOME/bin" >> "$GITHUB_PATH"
1246+ # cargo install --force --path crates/cli --locked --message-format=short
1247+ # cargo install --force --path crates/standalone --locked --message-format=short
1248+ # # Add a handy alias using the old binary name, so that we don't have to rewrite all scripts (incl. in submodules).
1249+ # ln -sf $CARGO_HOME/bin/spacetimedb-cli $CARGO_HOME/bin/spacetime
1250+ # # Clear any existing information
1251+ # spacetime server clear -y
1252+
1253+ - name : Run TypeScript tests
1254+ run : cargo ci typescript-test
13181255
13191256 # - name: Run quickstart-chat tests
13201257 # working-directory: examples/quickstart-chat
0 commit comments