diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7d2f058ea1..7e10029bac3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,904 +18,8 @@ concurrency: cancel-in-progress: true jobs: - smoketests: - needs: [lints] - name: Smoketests (${{ matrix.name }}) - strategy: - matrix: - include: - - name: Linux - runner: spacetimedb-new-runner-2 - - name: Windows - runner: windows-latest - runs-on: ${{ matrix.runner }} - timeout-minutes: 120 - env: - CARGO_TARGET_DIR: ${{ github.workspace }}/target - steps: - - name: Find Git ref - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - PR_NUMBER="${{ github.event.inputs.pr_number || null }}" - if test -n "${PR_NUMBER}"; then - GIT_REF="$( gh pr view --repo clockworklabs/SpacetimeDB $PR_NUMBER --json headRefName --jq .headRefName )" - else - GIT_REF="${{ github.ref }}" - fi - echo "GIT_REF=${GIT_REF}" >>"$GITHUB_ENV" - - - name: Checkout sources - uses: actions/checkout@v4 - with: - ref: ${{ env.GIT_REF }} - - - uses: dsherret/rust-toolchain-file@v1 - - name: Set default rust toolchain - run: rustup default $(rustup show active-toolchain | cut -d' ' -f1) - - - name: Cache Rust dependencies - uses: Swatinem/rust-cache@v2 - with: - workspaces: ${{ github.workspace }} - shared-key: spacetimedb - cache-on-failure: false - cache-all-crates: true - cache-workspace-crates: true - prefix-key: v1 - - - uses: actions/setup-dotnet@v4 - with: - global-json-file: global.json - - # nodejs and pnpm are required for the typescript quickstart smoketest - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - uses: pnpm/action-setup@v4 - with: - run_install: true - - - name: Install psql (Windows) - if: runner.os == 'Windows' - run: choco install psql -y --no-progress - shell: powershell - - - name: Update dotnet workloads - if: runner.os == 'Windows' - run: | - # Fail properly if any individual command fails - $ErrorActionPreference = 'Stop' - $PSNativeCommandUseErrorActionPreference = $true - - cd modules - # the sdk-manifests on windows-latest are messed up, so we need to update them - dotnet workload config --update-mode manifests - dotnet workload update - - - name: Override NuGet packages - shell: bash - run: | - dotnet pack -c Release crates/bindings-csharp/BSATN.Runtime - dotnet pack -c Release crates/bindings-csharp/Runtime - cd sdks/csharp - ./tools~/write-nuget-config.sh ../.. - - # This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a. - # ChatGPT suspects that this could be due to different build invocations using the same target dir, - # and this makes sense to me because we only see it in this job where we mix `cargo build -p` with - # `cargo build --manifest-path` (which apparently build different dependency trees). - # However, we've been unable to fix it so... /shrug - - name: Check v8 outputs - shell: bash - run: | - find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true - if ! [ -f "${CARGO_TARGET_DIR}"/debug/gn_out/obj/librusty_v8.a ]; then - echo "Could not find v8 output file librusty_v8.a; rebuilding manually." - cargo clean -p v8 || true - cargo build -p v8 - fi - - - name: Install cargo-nextest - uses: taiki-e/install-action@nextest - - - name: Run smoketests - # --test-threads=1 eliminates contention in the C# tests where they fight over bindings - # build artifacts. - # It also seemed to improve performance a fair amount (11m -> 6m) - run: cargo ci smoketests -- --test-threads=1 - - smoketests-python: - needs: [lints] - name: Smoketests (Python Legacy) (${{matrix.name}}) - strategy: - matrix: - include: - - name: Linux - runner: spacetimedb-new-runner-2 - smoketest_args: --docker - - name: Windows - runner: windows-latest - smoketest_args: --no-build-cli - runs-on: ${{ matrix.runner }} - timeout-minutes: 120 - env: - CARGO_TARGET_DIR: ${{ github.workspace }}/target - steps: - - name: Find Git ref - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - PR_NUMBER="${{ github.event.inputs.pr_number || null }}" - if test -n "${PR_NUMBER}"; then - GIT_REF="$( gh pr view --repo clockworklabs/SpacetimeDB $PR_NUMBER --json headRefName --jq .headRefName )" - else - GIT_REF="${{ github.ref }}" - fi - echo "GIT_REF=${GIT_REF}" >>"$GITHUB_ENV" - - name: Checkout sources - uses: actions/checkout@v4 - with: - ref: ${{ env.GIT_REF }} - - uses: dsherret/rust-toolchain-file@v1 - - name: Set default rust toolchain - run: rustup default $(rustup show active-toolchain | cut -d' ' -f1) - - name: Cache Rust dependencies - uses: Swatinem/rust-cache@v2 - with: - workspaces: ${{ github.workspace }} - shared-key: spacetimedb - cache-on-failure: false - cache-all-crates: true - cache-workspace-crates: true - prefix-key: v1 - - # This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a. - # ChatGPT suspects that this could be due to different build invocations using the same target dir, - # and this makes sense to me because we only see it in this job where we mix `cargo build -p` with - # `cargo build --manifest-path` (which apparently build different dependency trees). - # However, we've been unable to fix it so... /shrug - - name: Check v8 outputs - shell: bash - run: | - find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true - if ! [ -f "${CARGO_TARGET_DIR}"/debug/gn_out/obj/librusty_v8.a ]; then - echo "Could not find v8 output file librusty_v8.a; rebuilding manually." - cargo clean -p v8 || true - cargo build -p v8 - fi - - - uses: actions/setup-dotnet@v4 - with: - global-json-file: global.json - - - name: Override NuGet packages - shell: bash - run: | - dotnet pack -c Release crates/bindings-csharp/BSATN.Runtime - dotnet pack -c Release crates/bindings-csharp/Runtime - cd sdks/csharp - ./tools~/write-nuget-config.sh ../.. - - # nodejs and pnpm are required for the typescript quickstart smoketest - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - - - uses: pnpm/action-setup@v4 - with: - run_install: true - - - name: Install psql (Windows) - 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: Build and start database (Linux) - if: runner.os == 'Linux' - 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 - - 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 - dotnet workload config --update-mode manifests - dotnet workload update - - - uses: actions/setup-python@v5 - with: { python-version: "3.12" } - if: runner.os == 'Windows' - - - name: Install python deps - run: python -m pip install -r smoketests/requirements.txt - - - name: Run Python smoketests - # Note: clear_database and replication only work in private - run: python -m smoketests ${{ matrix.smoketest_args }} -x clear_database replication teams - - - name: Stop containers (Linux) - if: always() && runner.os == 'Linux' - run: docker compose -f .github/docker-compose.yml down - - test: - needs: [lints] - name: Test Suite - runs-on: spacetimedb-new-runner-2 - - env: - CARGO_TARGET_DIR: ${{ github.workspace }}/target - steps: - - name: Find Git ref - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - PR_NUMBER="${{ github.event.inputs.pr_number || null }}" - if test -n "${PR_NUMBER}"; then - GIT_REF="$( gh pr view --repo clockworklabs/SpacetimeDB $PR_NUMBER --json headRefName --jq .headRefName )" - else - GIT_REF="${{ github.ref }}" - fi - echo "GIT_REF=${GIT_REF}" >>"$GITHUB_ENV" - - - name: Checkout sources - uses: actions/checkout@v4 - 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 - # Let the smoketests job save the cache since it builds the most things - save-if: false - prefix-key: v1 - - - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - - - uses: pnpm/action-setup@v4 - with: - run_install: true - - # Install cmake and emscripten for C++ module compilation tests. - - name: Install cmake and emscripten - run: | - sudo apt-get update - sudo apt-get install -y cmake - git clone https://github.com/emscripten-core/emsdk.git ~/emsdk - cd ~/emsdk - ./emsdk install 4.0.21 - ./emsdk activate 4.0.21 - - - name: Build typescript module sdk - working-directory: crates/bindings-typescript - run: pnpm build - - # Source emsdk environment to make emcc (Emscripten compiler) available in PATH. - - name: Run tests - run: | - source ~/emsdk/emsdk_env.sh - cargo ci test - - lints: - name: Lints - runs-on: spacetimedb-new-runner-2 - 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 - prefix-key: v1 - - - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - name: Run ci lint - run: cargo ci lint - - wasm_bindings: - name: Build and test wasm bindings - runs-on: spacetimedb-new-runner-2 - 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 - prefix-key: v1 - - - name: Run bindgen tests - run: cargo ci wasm-bindings - - publish_checks: - name: Check that packages are publishable - runs-on: spacetimedb-new-runner-2 - permissions: read-all - steps: - - uses: actions/checkout@v3 - - name: Set up Python env - run: | - test -d venv || python3 -m venv venv - venv/bin/pip3 install argparse toml - - name: Run checks - run: | - set -ueo pipefail - FAILED=0 - ROOTS=(spacetimedb spacetimedb-sdk) - CRATES=$(venv/bin/python3 tools/find-publish-list.py --recursive --directories --quiet "${ROOTS[@]}") - for crate_dir in $CRATES; do - if ! venv/bin/python3 tools/crate-publish-checks.py "${crate_dir}"; then - FAILED=$(( $FAILED + 1 )) - fi - done - if [ $FAILED -gt 0 ]; then - exit 1 - fi - - update: - name: Test spacetimedb-update flow (${{ matrix.target }}) - permissions: read-all - strategy: - matrix: - include: - - { target: x86_64-unknown-linux-gnu, runner: spacetimedb-new-runner-2 } - - { target: aarch64-unknown-linux-gnu, runner: arm-runner } - - { target: aarch64-apple-darwin, runner: macos-latest } - - { target: x86_64-pc-windows-msvc, runner: windows-latest } - runs-on: ${{ matrix.runner }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Rust - uses: dsherret/rust-toolchain-file@v1 - - - name: Install rust target - run: rustup target add ${{ matrix.target }} - - - name: Install packages - if: ${{ matrix.runner == 'arm-runner' }} - shell: bash - run: sudo apt install -y libssl-dev - - - name: Build spacetimedb-update - run: cargo build --features github-token-auth --target ${{ matrix.target }} -p spacetimedb-update - if: runner.os == 'Windows' - - - name: Run self-install - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - ROOT_DIR="$(mktemp -d)" - # NOTE(bfops): We need the `github-token-auth` feature because we otherwise tend to get ratelimited when we try to fetch `/releases/latest`. - # My best guess is that, on the GitHub runners, the "anonymous" ratelimit is shared by *all* users of that runner (I think this because it - # happens very frequently on the `macos-runner`, but we haven't seen it on any others). - cargo run --features github-token-auth --target ${{ matrix.target }} -p spacetimedb-update -- self-install --root-dir="${ROOT_DIR}" --yes - "${ROOT_DIR}"/spacetime --root-dir="${ROOT_DIR}" help - if: runner.os == 'Windows' - - - name: Test spacetimedb-update - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: cargo ci update-flow --target=${{ matrix.target }} --github-token-auth - if: runner.os != 'Windows' - - unreal_engine_tests: - name: Unreal Engine Tests - # This can't go on e.g. ubuntu-latest because that runner runs out of disk space. ChatGPT suggested that the general solution tends to be to use - # a custom runner. - runs-on: spacetimedb-new-runner-2 - # Disable the tests because they are very flaky at the moment. - # TODO: Remove this line and re-enable the `if` line just below here. - if: false - # Skip if this is an external contribution. GitHub secrets will be empty, so the step would fail anyway. - # if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }} - container: - image: ghcr.io/epicgames/unreal-engine:dev-5.6 - credentials: - # Note(bfops): I don't think that `github.actor` needs to match the user that the token is for, because I'm using a token for my account and - # it seems to be totally happy. - # However, the token needs to be for a user that has access to the EpicGames org (see - # https://dev.epicgames.com/documentation/en-us/unreal-engine/downloading-source-code-in-unreal-engine?application_version=5.6) - username: ${{ github.actor }} - password: ${{ secrets.GHCR_TOKEN }} - # Run as root because otherwise we get permission denied for various directories inside the container. I tried doing dances to allow it to run - # without this (reassigning env vars and stuff), but was unable to get it to work and it felt like an uphill battle. - options: --user 0:0 - steps: - # Uncomment this before merging so that it will run properly if run manually through the GH actions flow. It was playing weird with rolled back - # commits though. - # - name: Find Git ref - # env: - # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # shell: bash - # run: | - # PR_NUMBER="${{ github.event.inputs.pr_number || null }}" - # if test -n "${PR_NUMBER}"; then - # GIT_REF="$( gh pr view --repo clockworklabs/SpacetimeDB $PR_NUMBER --json headRefName --jq .headRefName )" - # else - # GIT_REF="${{ github.ref }}" - # fi - # echo "GIT_REF=${GIT_REF}" >>"$GITHUB_ENV" - - name: Checkout sources - uses: actions/checkout@v4 - with: - ref: ${{ env.GIT_REF }} - - uses: dsherret/rust-toolchain-file@v1 - - name: Run Unreal Engine tests - working-directory: sdks/unreal - env: - UE_ROOT_PATH: /home/ue4/UnrealEngine - run: | - - apt-get update - apt-get install -y acl curl ca-certificates - - REPO="$GITHUB_WORKSPACE" - # Let ue4 read/write the workspace & tool caches without changing ownership - for p in "$REPO" "${RUNNER_TEMP:-/__t}" "${RUNNER_TOOL_CACHE:-/__t}"; do - [ -d "$p" ] && setfacl -R -m u:ue4:rwX -m d:u:ue4:rwX "$p" || true - done - - # Rust tool caches live under the runner tool cache so they persist - export CARGO_HOME="${RUNNER_TOOL_CACHE:-/__t}/cargo" - export RUSTUP_HOME="${RUNNER_TOOL_CACHE:-/__t}/rustup" - mkdir -p "$CARGO_HOME" "$RUSTUP_HOME" - chown -R ue4:ue4 "$CARGO_HOME" "$RUSTUP_HOME" - - # Make sure the UE build script is executable (and parents traversable) - UE_DIR="${UE_ROOT_PATH:-/home/ue4/UnrealEngine}" - chmod a+rx "$UE_DIR" "$UE_DIR/Engine" "$UE_DIR/Engine/Build" "$UE_DIR/Engine/Build/BatchFiles/Linux" || true - chmod a+rx "$UE_DIR/Engine/Build/BatchFiles/Linux/Build.sh" || true - - # Run the build & tests as ue4 (who owns the UE tree) - sudo -E -H -u ue4 env \ - HOME=/home/ue4 \ - XDG_CONFIG_HOME=/home/ue4/.config \ - CARGO_HOME="$CARGO_HOME" \ - RUSTUP_HOME="$RUSTUP_HOME" \ - PATH="$CARGO_HOME/bin:$PATH" \ - bash -lc ' - set -euxo pipefail - # Install rustup for ue4 if needed (uses the shared caches) - if ! command -v cargo >/dev/null 2>&1; then - curl -sSf https://sh.rustup.rs | sh -s -- -y - fi - rustup show >/dev/null - git config --global --add safe.directory "$GITHUB_WORKSPACE" || true - - cd "$GITHUB_WORKSPACE/sdks/unreal" - cargo --version - cargo test -- --test-threads=1 - ' - - ci_command_docs: - name: Check CI command docs - runs-on: spacetimedb-new-runner-2 - steps: - - name: Find Git ref - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - PR_NUMBER="${{ github.event.inputs.pr_number || null }}" - if test -n "${PR_NUMBER}"; then - GIT_REF="$( gh pr view --repo clockworklabs/SpacetimeDB $PR_NUMBER --json headRefName --jq .headRefName )" - else - GIT_REF="${{ github.ref }}" - fi - echo "GIT_REF=${GIT_REF}" >>"$GITHUB_ENV" - - - name: Checkout sources - uses: actions/checkout@v4 - with: - ref: ${{ env.GIT_REF }} - - - uses: dsherret/rust-toolchain-file@v1 - - - name: Check for docs change - run: cargo ci self-docs --check - - cli_docs: - name: Check CLI docs - permissions: read-all - runs-on: spacetimedb-new-runner-2 - env: - CARGO_TARGET_DIR: ${{ github.workspace }}/target - steps: - - name: Find Git ref - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - PR_NUMBER="${{ github.event.inputs.pr_number || null }}" - if test -n "${PR_NUMBER}"; then - GIT_REF="$( gh pr view --repo clockworklabs/SpacetimeDB $PR_NUMBER --json headRefName --jq .headRefName )" - else - GIT_REF="${{ github.ref }}" - fi - echo "GIT_REF=${GIT_REF}" >>"$GITHUB_ENV" - - - name: Checkout sources - uses: actions/checkout@v4 - with: - ref: ${{ env.GIT_REF }} - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - - - uses: pnpm/action-setup@v4 - with: - run_install: true - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - 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 - prefix-key: v1 - - - name: Check for docs change - run: | - cargo ci cli-docs - - llm_ci_check: - name: Verify LLM benchmark is up to date - permissions: - contents: read - runs-on: ubuntu-latest - # Disable the tests because they are causing us headaches with merge conflicts and re-runs etc. - if: false - steps: - # Build the tool from master to ensure consistent hash computation - # with the llm-benchmark-update workflow (which also uses master's tool). - - name: Checkout master (build tool from trusted code) - uses: actions/checkout@v4 - with: - ref: master - fetch-depth: 1 - - - uses: dtolnay/rust-toolchain@stable - - uses: Swatinem/rust-cache@v2 - - - name: Install llm-benchmark tool from master - run: | - cargo install --path tools/xtask-llm-benchmark --locked - command -v llm_benchmark - - # Now checkout the PR branch to verify its benchmark files - - name: Checkout PR branch - uses: actions/checkout@v4 - with: - clean: false - - - name: Run hash check (both langs) - run: llm_benchmark ci-check - - unity-testsuite: - needs: [lints] - # Skip if this is an external contribution. - # The license secrets will be empty, so the step would fail anyway. - if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }} - permissions: - contents: read - checks: write - runs-on: spacetimedb-unity-runner - timeout-minutes: 30 - env: - CARGO_TARGET_DIR: ${{ github.workspace }}/target - steps: - - name: Checkout repository - id: checkout-stdb - uses: actions/checkout@v4 - - # Run cheap .NET tests first. If those fail, no need to run expensive Unity tests. - - - name: Setup dotnet - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - name: Override NuGet packages - run: | - dotnet pack crates/bindings-csharp/BSATN.Runtime - dotnet pack crates/bindings-csharp/Runtime - - # Write out the nuget config file to `nuget.config`. This causes the spacetimedb-csharp-sdk repository - # to be aware of the local versions of the `bindings-csharp` packages in SpacetimeDB, and use them if - # available. Otherwise, `spacetimedb-csharp-sdk` will use the NuGet versions of the packages. - # This means that (if version numbers match) we will test the local versions of the C# packages, even - # if they're not pushed to NuGet. - # See https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file for more info on the config file. - cd sdks/csharp - ./tools~/write-nuget-config.sh ../.. - - - name: Restore .NET solution - working-directory: sdks/csharp - run: dotnet restore --configfile NuGet.Config SpacetimeDB.ClientSDK.sln - - # Now, setup the Unity tests. - - name: Patch spacetimedb dependency in Cargo.toml - working-directory: demo/Blackholio/server-rust - run: | - sed -i "s|spacetimedb *=.*|spacetimedb = \{ path = \"../../../crates/bindings\" \}|" Cargo.toml - cat Cargo.toml - - - name: Install Rust toolchain - uses: dsherret/rust-toolchain-file@v1 - - - name: Cache Rust dependencies - uses: Swatinem/rust-cache@v2 - with: - workspaces: ${{ github.workspace }} - shared-key: spacetimedb - # Let the main CI job save the cache since it builds the most things - save-if: false - prefix-key: v1 - - # This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a. - # ChatGPT suspects that this could be due to different build invocations using the same target dir, - # and this makes sense to me because we only see it in this job where we mix `cargo build -p` with - # `cargo build --manifest-path` (which apparently build different dependency trees). - # However, we've been unable to fix it so... /shrug - - name: Check v8 outputs - run: | - find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true - if ! [ -f "${CARGO_TARGET_DIR}"/release/gn_out/obj/librusty_v8.a ]; then - echo "Could not find v8 output file librusty_v8.a; rebuilding manually." - cargo clean --release -p v8 || true - cargo build --release -p v8 - fi - - - name: Install SpacetimeDB CLI from the local checkout - 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 - - - name: Generate client bindings - working-directory: demo/Blackholio/server-rust - run: bash ./generate.sh -y - - - name: Check for changes - run: | - tools/check-diff.sh demo/Blackholio/client-unity/Assets/Scripts/autogen || { - echo 'Error: Bindings are dirty. Please run `demo/Blackholio/server-rust/generate.sh`.' - exit 1 - } - - - name: Hydrate Unity SDK DLLs - run: cargo ci dlls - - - name: Check Unity meta files - uses: DeNA/unity-meta-check@v3 - with: - enable_pr_comment: ${{ github.event_name == 'pull_request' }} - target_path: sdks/csharp - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - - - name: Start SpacetimeDB - run: | - spacetime start & - disown - - - name: Publish unity-tests module to SpacetimeDB - working-directory: demo/Blackholio/server-rust - run: | - spacetime logout && spacetime login --server-issued-login local - bash ./publish.sh - - - name: Patch com.clockworklabs.spacetimedbsdk dependency in manifest.json - working-directory: demo/Blackholio/client-unity/Packages - run: | - yq e -i '.dependencies["com.clockworklabs.spacetimedbsdk"] = "file:../../../../sdks/csharp"' manifest.json - cat manifest.json - - - uses: actions/cache@v3 - with: - path: demo/Blackholio/client-unity/Library - key: Unity-${{ github.head_ref }} - restore-keys: Unity- - - - name: Run Unity tests - uses: game-ci/unity-test-runner@v4 - with: - unityVersion: 2022.3.32f1 # Adjust Unity version to a valid tag - projectPath: demo/Blackholio/client-unity # Path to the Unity project subdirectory - githubToken: ${{ secrets.GITHUB_TOKEN }} - testMode: playmode - useHostNetwork: true - artifactsPath: "" - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - - csharp-testsuite: - needs: [lints] - runs-on: spacetimedb-new-runner-2 - timeout-minutes: 30 - env: - CARGO_TARGET_DIR: ${{ github.workspace }}/target - steps: - - name: Checkout repository - id: checkout-stdb - uses: actions/checkout@v4 - - # Run cheap .NET tests first. If those fail, no need to run expensive Unity tests. - - - name: Setup dotnet - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - name: Override NuGet packages - run: | - dotnet pack crates/bindings-csharp/BSATN.Runtime - dotnet pack crates/bindings-csharp/Runtime - - # Write out the nuget config file to `nuget.config`. This causes the spacetimedb-csharp-sdk repository - # to be aware of the local versions of the `bindings-csharp` packages in SpacetimeDB, and use them if - # available. Otherwise, `spacetimedb-csharp-sdk` will use the NuGet versions of the packages. - # This means that (if version numbers match) we will test the local versions of the C# packages, even - # if they're not pushed to NuGet. - # See https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file for more info on the config file. - cd sdks/csharp - ./tools~/write-nuget-config.sh ../.. - - - name: Restore .NET solution - working-directory: sdks/csharp - run: dotnet restore --configfile NuGet.Config SpacetimeDB.ClientSDK.sln - - - name: Run .NET tests - working-directory: sdks/csharp - run: dotnet test -warnaserror --no-restore - - - name: Verify C# formatting - working-directory: sdks/csharp - run: dotnet format --no-restore --verify-no-changes SpacetimeDB.ClientSDK.sln - - - name: Install Rust toolchain - uses: dsherret/rust-toolchain-file@v1 - - - name: Cache Rust dependencies - uses: Swatinem/rust-cache@v2 - with: - workspaces: ${{ github.workspace }} - shared-key: spacetimedb - # Let the main CI job save the cache since it builds the most things - save-if: false - prefix-key: v1 - - # This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a. - # ChatGPT suspects that this could be due to different build invocations using the same target dir, - # and this makes sense to me because we only see it in this job where we mix `cargo build -p` with - # `cargo build --manifest-path` (which apparently build different dependency trees). - # However, we've been unable to fix it so... /shrug - - name: Check v8 outputs - run: | - find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true - if ! [ -f "${CARGO_TARGET_DIR}"/debug/gn_out/obj/librusty_v8.a ]; then - echo "Could not find v8 output file librusty_v8.a; rebuilding manually." - cargo clean -p v8 || true - cargo build -p v8 - fi - find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true - if ! [ -f "${CARGO_TARGET_DIR}"/release/gn_out/obj/librusty_v8.a ]; then - echo "Could not find v8 output file librusty_v8.a; rebuilding manually." - cargo clean --release -p v8 || true - cargo build --release -p v8 - fi - - - name: Install SpacetimeDB CLI from the local checkout - 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 - - - name: Check quickstart-chat bindings are up to date - working-directory: sdks/csharp - run: | - bash tools~/gen-quickstart.sh - "${GITHUB_WORKSPACE}"/tools/check-diff.sh examples~/quickstart-chat || { - echo 'Error: quickstart-chat bindings have changed. Please run `sdks/csharp/tools~/gen-quickstart.sh`.' - exit 1 - } - - - name: Check client-api bindings are up to date - working-directory: sdks/csharp - run: | - bash tools~/gen-client-api.sh - "${GITHUB_WORKSPACE}"/tools/check-diff.sh src/SpacetimeDB/ClientApi || { - echo 'Error: Client API bindings are dirty. Please run `sdks/csharp/tools~/gen-client-api.sh`.' - exit 1 - } - - - name: Start SpacetimeDB - run: | - spacetime start & - disown - - - name: Run regression tests - run: | - bash sdks/csharp/tools~/run-regression-tests.sh - tools/check-diff.sh sdks/csharp/examples~/regression-tests || { - echo 'Error: Bindings are dirty. Please run `sdks/csharp/tools~/gen-regression-tests.sh`.' - exit 1 - } - internal-tests: name: Internal Tests - needs: [lints] # Skip if not a PR or a push to master # Skip if this is an external contribution. GitHub secrets will be empty, so the step would fail anyway. if: ${{ (github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master')) @@ -934,20 +38,21 @@ jobs: github-token: ${{ secrets.SPACETIMEDB_PRIVATE_TOKEN }} script: | const workflowId = 'ci.yml'; - const targetRef = 'master'; + const targetRef = 'bfops/smarter-internal-tests'; const targetOwner = process.env.TARGET_OWNER; const targetRepo = process.env.TARGET_REPO; // Use the ref for pull requests because the head sha is brittle (github does some extra dance where it merges in master). const publicRef = (context.eventName === 'pull_request') ? context.payload.pull_request.head.ref : context.sha; + const publicPrNumber = context.payload.pull_request?.number ?? context.payload.inputs?.pr_number; const preDispatch = new Date().toISOString(); - + // Dispatch the workflow in the target repository await github.rest.actions.createWorkflowDispatch({ owner: targetOwner, repo: targetRepo, workflow_id: workflowId, ref: targetRef, - inputs: { public_ref: publicRef } + inputs: { public_ref: publicRef, public_pr_number: String(publicPrNumber) } }); const sleep = (ms) => new Promise(r => setTimeout(r, ms)); diff --git a/Cargo.lock b/Cargo.lock index f2dadefeaf0..3d6cafa6669 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -449,7 +449,7 @@ name = "basic-rs-template-module" version = "0.1.0" dependencies = [ "log", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", ] [[package]] @@ -457,7 +457,7 @@ name = "benchmarks-module" version = "0.1.0" dependencies = [ "anyhow", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", ] [[package]] @@ -1111,7 +1111,7 @@ dependencies = [ [[package]] name = "connect_disconnect_client" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "spacetimedb-sdk", @@ -3559,7 +3559,7 @@ name = "keynote-benchmarks" version = "0.1.0" dependencies = [ "log", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", ] [[package]] @@ -3956,7 +3956,7 @@ version = "0.0.0" dependencies = [ "anyhow", "log", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", ] [[package]] @@ -5124,7 +5124,7 @@ name = "perf-test-module" version = "0.1.0" dependencies = [ "log", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", ] [[package]] @@ -5532,12 +5532,12 @@ dependencies = [ [[package]] name = "procedure-client" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "env_logger 0.10.2", "serde_json", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-sdk", "test-counter", ] @@ -5741,7 +5741,7 @@ name = "quickstart-chat-module" version = "0.1.0" dependencies = [ "log", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", ] [[package]] @@ -6838,7 +6838,7 @@ dependencies = [ "anyhow", "log", "paste", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", ] [[package]] @@ -6848,7 +6848,7 @@ dependencies = [ "anyhow", "log", "paste", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", ] [[package]] @@ -6858,12 +6858,12 @@ dependencies = [ "anyhow", "log", "paste", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", ] [[package]] name = "sdk-unreal-test-harness" -version = "1.12.0" +version = "3.0.0" dependencies = [ "serial_test", "spacetimedb-testing", @@ -7309,7 +7309,7 @@ name = "spacetime-module" version = "0.1.0" dependencies = [ "log", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", ] [[package]] @@ -7332,7 +7332,7 @@ dependencies = [ [[package]] name = "spacetimedb" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "bytemuck", @@ -7345,17 +7345,17 @@ dependencies = [ "rand 0.8.5", "scoped-tls", "serde_json", - "spacetimedb-bindings-macro 1.12.0", - "spacetimedb-bindings-sys 1.12.0", - "spacetimedb-lib 1.12.0", - "spacetimedb-primitives 1.12.0", + "spacetimedb-bindings-macro 3.0.0", + "spacetimedb-bindings-sys 3.0.0", + "spacetimedb-lib 3.0.0", + "spacetimedb-primitives 3.0.0", "spacetimedb-query-builder", "trybuild", ] [[package]] name = "spacetimedb-auth" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "serde", @@ -7363,12 +7363,12 @@ dependencies = [ "serde_with", "spacetimedb-data-structures", "spacetimedb-jsonwebtoken", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", ] [[package]] name = "spacetimedb-bench" -version = "1.12.0" +version = "3.0.0" dependencies = [ "ahash 0.8.12", "anyhow", @@ -7398,11 +7398,11 @@ dependencies = [ "spacetimedb-data-structures", "spacetimedb-datastore", "spacetimedb-execution", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-paths", - "spacetimedb-primitives 1.12.0", + "spacetimedb-primitives 3.0.0", "spacetimedb-query", - "spacetimedb-sats 1.12.0", + "spacetimedb-sats 3.0.0", "spacetimedb-schema", "spacetimedb-standalone", "spacetimedb-table", @@ -7431,13 +7431,13 @@ dependencies = [ [[package]] name = "spacetimedb-bindings-macro" -version = "1.12.0" +version = "3.0.0" dependencies = [ "heck 0.4.1", "humantime", "proc-macro2", "quote", - "spacetimedb-primitives 1.12.0", + "spacetimedb-primitives 3.0.0", "syn 2.0.107", ] @@ -7452,14 +7452,14 @@ dependencies = [ [[package]] name = "spacetimedb-bindings-sys" -version = "1.12.0" +version = "3.0.0" dependencies = [ - "spacetimedb-primitives 1.12.0", + "spacetimedb-primitives 3.0.0", ] [[package]] name = "spacetimedb-cli" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "base64 0.21.7", @@ -7504,9 +7504,9 @@ dependencies = [ "spacetimedb-data-structures", "spacetimedb-fs-utils", "spacetimedb-jsonwebtoken", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-paths", - "spacetimedb-primitives 1.12.0", + "spacetimedb-primitives 3.0.0", "spacetimedb-schema", "syntect", "tabled", @@ -7531,7 +7531,7 @@ dependencies = [ [[package]] name = "spacetimedb-client-api" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "async-stream", @@ -7570,7 +7570,7 @@ dependencies = [ "spacetimedb-data-structures", "spacetimedb-datastore", "spacetimedb-jsonwebtoken", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-paths", "spacetimedb-schema", "tempfile", @@ -7588,7 +7588,7 @@ dependencies = [ [[package]] name = "spacetimedb-client-api-messages" -version = "1.12.0" +version = "3.0.0" dependencies = [ "bytes", "bytestring", @@ -7602,16 +7602,16 @@ dependencies = [ "serde_json", "serde_with", "smallvec", - "spacetimedb-lib 1.12.0", - "spacetimedb-primitives 1.12.0", - "spacetimedb-sats 1.12.0", + "spacetimedb-lib 3.0.0", + "spacetimedb-primitives 3.0.0", + "spacetimedb-sats 3.0.0", "strum", "thiserror 1.0.69", ] [[package]] name = "spacetimedb-codegen" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -7620,15 +7620,15 @@ dependencies = [ "itertools 0.12.1", "regex", "spacetimedb-data-structures", - "spacetimedb-lib 1.12.0", - "spacetimedb-primitives 1.12.0", + "spacetimedb-lib 3.0.0", + "spacetimedb-primitives 3.0.0", "spacetimedb-schema", "spacetimedb-testing", ] [[package]] name = "spacetimedb-commitlog" -version = "1.12.0" +version = "3.0.0" dependencies = [ "async-stream", "bitflags 2.10.0", @@ -7649,8 +7649,8 @@ dependencies = [ "spacetimedb-commitlog", "spacetimedb-fs-utils", "spacetimedb-paths", - "spacetimedb-primitives 1.12.0", - "spacetimedb-sats 1.12.0", + "spacetimedb-primitives 3.0.0", + "spacetimedb-sats 3.0.0", "tempfile", "thiserror 1.0.69", "tokio", @@ -7661,7 +7661,7 @@ dependencies = [ [[package]] name = "spacetimedb-core" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "arrayvec", @@ -7744,14 +7744,14 @@ dependencies = [ "spacetimedb-fs-utils", "spacetimedb-jsonwebtoken", "spacetimedb-jwks", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-memory-usage", "spacetimedb-metrics", "spacetimedb-paths", "spacetimedb-physical-plan", - "spacetimedb-primitives 1.12.0", + "spacetimedb-primitives 3.0.0", "spacetimedb-query", - "spacetimedb-sats 1.12.0", + "spacetimedb-sats 3.0.0", "spacetimedb-schema", "spacetimedb-snapshot", "spacetimedb-subscription", @@ -7787,7 +7787,7 @@ dependencies = [ [[package]] name = "spacetimedb-data-structures" -version = "1.12.0" +version = "3.0.0" dependencies = [ "ahash 0.8.12", "crossbeam-queue", @@ -7803,7 +7803,7 @@ dependencies = [ [[package]] name = "spacetimedb-datastore" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "bytes", @@ -7823,11 +7823,11 @@ dependencies = [ "spacetimedb-data-structures", "spacetimedb-durability", "spacetimedb-execution", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-metrics", "spacetimedb-paths", - "spacetimedb-primitives 1.12.0", - "spacetimedb-sats 1.12.0", + "spacetimedb-primitives 3.0.0", + "spacetimedb-sats 3.0.0", "spacetimedb-schema", "spacetimedb-snapshot", "spacetimedb-table", @@ -7838,7 +7838,7 @@ dependencies = [ [[package]] name = "spacetimedb-durability" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "futures", @@ -7848,7 +7848,7 @@ dependencies = [ "spacetimedb-commitlog", "spacetimedb-fs-utils", "spacetimedb-paths", - "spacetimedb-sats 1.12.0", + "spacetimedb-sats 3.0.0", "tempfile", "thiserror 1.0.69", "tokio", @@ -7857,22 +7857,22 @@ dependencies = [ [[package]] name = "spacetimedb-execution" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "itertools 0.12.1", "spacetimedb-expr", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-physical-plan", - "spacetimedb-primitives 1.12.0", - "spacetimedb-sats 1.12.0", + "spacetimedb-primitives 3.0.0", + "spacetimedb-sats 3.0.0", "spacetimedb-sql-parser", "spacetimedb-table", ] [[package]] name = "spacetimedb-expr" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "bigdecimal", @@ -7880,11 +7880,11 @@ dependencies = [ "derive_more 0.99.20", "ethnum", "pretty_assertions", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", "spacetimedb-data-structures", - "spacetimedb-lib 1.12.0", - "spacetimedb-primitives 1.12.0", - "spacetimedb-sats 1.12.0", + "spacetimedb-lib 3.0.0", + "spacetimedb-primitives 3.0.0", + "spacetimedb-sats 3.0.0", "spacetimedb-schema", "spacetimedb-sql-parser", "thiserror 1.0.69", @@ -7892,7 +7892,7 @@ dependencies = [ [[package]] name = "spacetimedb-fs-utils" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "fs2", @@ -7906,7 +7906,7 @@ dependencies = [ [[package]] name = "spacetimedb-guard" -version = "1.12.0" +version = "3.0.0" dependencies = [ "portpicker", "reqwest 0.12.24", @@ -7964,7 +7964,7 @@ dependencies = [ [[package]] name = "spacetimedb-lib" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "bitflags 2.10.0", @@ -7983,17 +7983,17 @@ dependencies = [ "ron", "serde", "serde_json", - "spacetimedb-bindings-macro 1.12.0", + "spacetimedb-bindings-macro 3.0.0", "spacetimedb-memory-usage", "spacetimedb-metrics", - "spacetimedb-primitives 1.12.0", - "spacetimedb-sats 1.12.0", + "spacetimedb-primitives 3.0.0", + "spacetimedb-sats 3.0.0", "thiserror 1.0.69", ] [[package]] name = "spacetimedb-memory-usage" -version = "1.12.0" +version = "3.0.0" dependencies = [ "decorum", "ethnum", @@ -8003,7 +8003,7 @@ dependencies = [ [[package]] name = "spacetimedb-metrics" -version = "1.12.0" +version = "3.0.0" dependencies = [ "arrayvec", "itertools 0.12.1", @@ -8013,7 +8013,7 @@ dependencies = [ [[package]] name = "spacetimedb-paths" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "chrono", @@ -8029,7 +8029,7 @@ dependencies = [ [[package]] name = "spacetimedb-pg" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "async-trait", @@ -8040,14 +8040,14 @@ dependencies = [ "pgwire", "spacetimedb-client-api", "spacetimedb-client-api-messages", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "thiserror 1.0.69", "tokio", ] [[package]] name = "spacetimedb-physical-plan" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "derive_more 0.99.20", @@ -8055,8 +8055,8 @@ dependencies = [ "pretty_assertions", "spacetimedb-data-structures", "spacetimedb-expr", - "spacetimedb-lib 1.12.0", - "spacetimedb-primitives 1.12.0", + "spacetimedb-lib 3.0.0", + "spacetimedb-primitives 3.0.0", "spacetimedb-schema", "spacetimedb-sql-parser", "spacetimedb-table", @@ -8076,7 +8076,7 @@ dependencies = [ [[package]] name = "spacetimedb-primitives" -version = "1.12.0" +version = "3.0.0" dependencies = [ "bitflags 2.10.0", "either", @@ -8089,7 +8089,7 @@ dependencies = [ [[package]] name = "spacetimedb-query" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "itertools 0.12.1", @@ -8097,9 +8097,9 @@ dependencies = [ "spacetimedb-client-api-messages", "spacetimedb-execution", "spacetimedb-expr", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-physical-plan", - "spacetimedb-primitives 1.12.0", + "spacetimedb-primitives 3.0.0", "spacetimedb-schema", "spacetimedb-sql-parser", "spacetimedb-table", @@ -8107,9 +8107,9 @@ dependencies = [ [[package]] name = "spacetimedb-query-builder" -version = "1.12.0" +version = "3.0.0" dependencies = [ - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", ] [[package]] @@ -8140,7 +8140,7 @@ dependencies = [ [[package]] name = "spacetimedb-sats" -version = "1.12.0" +version = "3.0.0" dependencies = [ "ahash 0.8.12", "anyhow", @@ -8166,17 +8166,17 @@ dependencies = [ "serde_json", "sha3", "smallvec", - "spacetimedb-bindings-macro 1.12.0", + "spacetimedb-bindings-macro 3.0.0", "spacetimedb-memory-usage", "spacetimedb-metrics", - "spacetimedb-primitives 1.12.0", + "spacetimedb-primitives 3.0.0", "thiserror 1.0.69", "uuid", ] [[package]] name = "spacetimedb-schema" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "derive_more 0.99.20", @@ -8193,10 +8193,10 @@ dependencies = [ "serial_test", "smallvec", "spacetimedb-data-structures", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-memory-usage", - "spacetimedb-primitives 1.12.0", - "spacetimedb-sats 1.12.0", + "spacetimedb-primitives 3.0.0", + "spacetimedb-sats 3.0.0", "spacetimedb-sql-parser", "spacetimedb-testing", "termcolor", @@ -8207,7 +8207,7 @@ dependencies = [ [[package]] name = "spacetimedb-sdk" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anymap", "base64 0.21.7", @@ -8226,10 +8226,10 @@ dependencies = [ "rand 0.9.2", "spacetimedb-client-api-messages", "spacetimedb-data-structures", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-metrics", "spacetimedb-query-builder", - "spacetimedb-sats 1.12.0", + "spacetimedb-sats 3.0.0", "spacetimedb-schema", "spacetimedb-testing", "thiserror 1.0.69", @@ -8239,7 +8239,7 @@ dependencies = [ [[package]] name = "spacetimedb-smoketests" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "assert_cmd", @@ -8257,7 +8257,7 @@ dependencies = [ [[package]] name = "spacetimedb-snapshot" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "blake3", @@ -8275,10 +8275,10 @@ dependencies = [ "spacetimedb-datastore", "spacetimedb-durability", "spacetimedb-fs-utils", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-paths", - "spacetimedb-primitives 1.12.0", - "spacetimedb-sats 1.12.0", + "spacetimedb-primitives 3.0.0", + "spacetimedb-sats 3.0.0", "spacetimedb-schema", "spacetimedb-table", "tempfile", @@ -8291,17 +8291,17 @@ dependencies = [ [[package]] name = "spacetimedb-sql-parser" -version = "1.12.0" +version = "3.0.0" dependencies = [ "derive_more 0.99.20", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "sqlparser", "thiserror 1.0.69", ] [[package]] name = "spacetimedb-standalone" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "async-trait", @@ -8326,7 +8326,7 @@ dependencies = [ "spacetimedb-client-api-messages", "spacetimedb-core", "spacetimedb-datastore", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-paths", "spacetimedb-pg", "spacetimedb-schema", @@ -8343,22 +8343,22 @@ dependencies = [ [[package]] name = "spacetimedb-subscription" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "spacetimedb-data-structures", "spacetimedb-execution", "spacetimedb-expr", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-physical-plan", - "spacetimedb-primitives 1.12.0", + "spacetimedb-primitives 3.0.0", "spacetimedb-query", "spacetimedb-schema", ] [[package]] name = "spacetimedb-table" -version = "1.12.0" +version = "3.0.0" dependencies = [ "ahash 0.8.12", "blake3", @@ -8376,17 +8376,17 @@ dependencies = [ "rand 0.9.2", "smallvec", "spacetimedb-data-structures", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-memory-usage", - "spacetimedb-primitives 1.12.0", - "spacetimedb-sats 1.12.0", + "spacetimedb-primitives 3.0.0", + "spacetimedb-sats 3.0.0", "spacetimedb-schema", "thiserror 1.0.69", ] [[package]] name = "spacetimedb-testing" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "bytes", @@ -8404,7 +8404,7 @@ dependencies = [ "spacetimedb-client-api", "spacetimedb-core", "spacetimedb-data-structures", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-paths", "spacetimedb-schema", "spacetimedb-standalone", @@ -8415,7 +8415,7 @@ dependencies = [ [[package]] name = "spacetimedb-update" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "bytes", @@ -8440,7 +8440,7 @@ dependencies = [ [[package]] name = "spacetimedb-vm" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "arrayvec", @@ -8450,9 +8450,9 @@ dependencies = [ "smallvec", "spacetimedb-data-structures", "spacetimedb-execution", - "spacetimedb-lib 1.12.0", - "spacetimedb-primitives 1.12.0", - "spacetimedb-sats 1.12.0", + "spacetimedb-lib 3.0.0", + "spacetimedb-primitives 3.0.0", + "spacetimedb-sats 3.0.0", "spacetimedb-schema", "spacetimedb-table", "tempfile", @@ -8528,7 +8528,7 @@ dependencies = [ [[package]] name = "sqltest" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "async-trait", @@ -8547,8 +8547,8 @@ dependencies = [ "rust_decimal", "spacetimedb-core", "spacetimedb-datastore", - "spacetimedb-lib 1.12.0", - "spacetimedb-sats 1.12.0", + "spacetimedb-lib 3.0.0", + "spacetimedb-sats 3.0.0", "spacetimedb-vm", "sqllogictest", "sqllogictest-engines", @@ -8943,7 +8943,7 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "test-client" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "env_logger 0.10.2", @@ -8955,7 +8955,7 @@ dependencies = [ [[package]] name = "test-counter" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "spacetimedb-data-structures", @@ -9685,7 +9685,7 @@ version = "0.1.0" dependencies = [ "anyhow", "log", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", ] [[package]] @@ -9887,11 +9887,11 @@ dependencies = [ [[package]] name = "view-client" -version = "1.12.0" +version = "3.0.0" dependencies = [ "anyhow", "env_logger 0.10.2", - "spacetimedb-lib 1.12.0", + "spacetimedb-lib 3.0.0", "spacetimedb-sdk", "test-counter", ] @@ -11076,7 +11076,7 @@ dependencies = [ "reqwest 0.12.24", "serde", "serde_json", - "spacetimedb 1.12.0", + "spacetimedb 3.0.0", "spacetimedb-data-structures", "spacetimedb-guard", "tempfile", diff --git a/Cargo.toml b/Cargo.toml index 369cb19b669..ad5ce5626b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -103,46 +103,46 @@ inherits = "release" debug = true [workspace.package] -version = "1.12.0" +version = "3.0.0" edition = "2021" # update rust-toolchain.toml too! rust-version = "1.93.0" [workspace.dependencies] -spacetimedb = { path = "crates/bindings", version = "=1.12.0" } -spacetimedb-auth = { path = "crates/auth", version = "=1.12.0" } -spacetimedb-bindings-macro = { path = "crates/bindings-macro", version = "=1.12.0" } -spacetimedb-bindings-sys = { path = "crates/bindings-sys", version = "=1.12.0" } -spacetimedb-cli = { path = "crates/cli", version = "=1.12.0" } -spacetimedb-client-api = { path = "crates/client-api", version = "=1.12.0" } -spacetimedb-client-api-messages = { path = "crates/client-api-messages", version = "=1.12.0" } -spacetimedb-codegen = { path = "crates/codegen", version = "=1.12.0" } -spacetimedb-commitlog = { path = "crates/commitlog", version = "=1.12.0" } -spacetimedb-core = { path = "crates/core", version = "=1.12.0" } -spacetimedb-data-structures = { path = "crates/data-structures", version = "=1.12.0" } -spacetimedb-datastore = { path = "crates/datastore", version = "=1.12.0" } -spacetimedb-durability = { path = "crates/durability", version = "=1.12.0" } -spacetimedb-execution = { path = "crates/execution", version = "=1.12.0" } -spacetimedb-expr = { path = "crates/expr", version = "=1.12.0" } -spacetimedb-guard = { path = "crates/guard", version = "=1.12.0" } -spacetimedb-lib = { path = "crates/lib", default-features = false, version = "=1.12.0" } -spacetimedb-memory-usage = { path = "crates/memory-usage", version = "=1.12.0", default-features = false } -spacetimedb-metrics = { path = "crates/metrics", version = "=1.12.0" } -spacetimedb-paths = { path = "crates/paths", version = "=1.12.0" } -spacetimedb-pg = { path = "crates/pg", version = "=1.12.0" } -spacetimedb-physical-plan = { path = "crates/physical-plan", version = "=1.12.0" } -spacetimedb-primitives = { path = "crates/primitives", version = "=1.12.0" } -spacetimedb-query = { path = "crates/query", version = "=1.12.0" } -spacetimedb-sats = { path = "crates/sats", version = "=1.12.0" } -spacetimedb-schema = { path = "crates/schema", version = "=1.12.0" } -spacetimedb-standalone = { path = "crates/standalone", version = "=1.12.0" } -spacetimedb-sql-parser = { path = "crates/sql-parser", version = "=1.12.0" } -spacetimedb-table = { path = "crates/table", version = "=1.12.0" } -spacetimedb-vm = { path = "crates/vm", version = "=1.12.0" } -spacetimedb-fs-utils = { path = "crates/fs-utils", version = "=1.12.0" } -spacetimedb-snapshot = { path = "crates/snapshot", version = "=1.12.0" } -spacetimedb-subscription = { path = "crates/subscription", version = "=1.12.0" } -spacetimedb-query-builder = { path = "crates/query-builder", version = "=1.12.0" } +spacetimedb = { path = "crates/bindings", version = "=3.0.0" } +spacetimedb-auth = { path = "crates/auth", version = "=3.0.0" } +spacetimedb-bindings-macro = { path = "crates/bindings-macro", version = "=3.0.0" } +spacetimedb-bindings-sys = { path = "crates/bindings-sys", version = "=3.0.0" } +spacetimedb-cli = { path = "crates/cli", version = "=3.0.0" } +spacetimedb-client-api = { path = "crates/client-api", version = "=3.0.0" } +spacetimedb-client-api-messages = { path = "crates/client-api-messages", version = "=3.0.0" } +spacetimedb-codegen = { path = "crates/codegen", version = "=3.0.0" } +spacetimedb-commitlog = { path = "crates/commitlog", version = "=3.0.0" } +spacetimedb-core = { path = "crates/core", version = "=3.0.0" } +spacetimedb-data-structures = { path = "crates/data-structures", version = "=3.0.0" } +spacetimedb-datastore = { path = "crates/datastore", version = "=3.0.0" } +spacetimedb-durability = { path = "crates/durability", version = "=3.0.0" } +spacetimedb-execution = { path = "crates/execution", version = "=3.0.0" } +spacetimedb-expr = { path = "crates/expr", version = "=3.0.0" } +spacetimedb-guard = { path = "crates/guard", version = "=3.0.0" } +spacetimedb-lib = { path = "crates/lib", default-features = false, version = "=3.0.0" } +spacetimedb-memory-usage = { path = "crates/memory-usage", version = "=3.0.0", default-features = false } +spacetimedb-metrics = { path = "crates/metrics", version = "=3.0.0" } +spacetimedb-paths = { path = "crates/paths", version = "=3.0.0" } +spacetimedb-pg = { path = "crates/pg", version = "=3.0.0" } +spacetimedb-physical-plan = { path = "crates/physical-plan", version = "=3.0.0" } +spacetimedb-primitives = { path = "crates/primitives", version = "=3.0.0" } +spacetimedb-query = { path = "crates/query", version = "=3.0.0" } +spacetimedb-sats = { path = "crates/sats", version = "=3.0.0" } +spacetimedb-schema = { path = "crates/schema", version = "=3.0.0" } +spacetimedb-standalone = { path = "crates/standalone", version = "=3.0.0" } +spacetimedb-sql-parser = { path = "crates/sql-parser", version = "=3.0.0" } +spacetimedb-table = { path = "crates/table", version = "=3.0.0" } +spacetimedb-vm = { path = "crates/vm", version = "=3.0.0" } +spacetimedb-fs-utils = { path = "crates/fs-utils", version = "=3.0.0" } +spacetimedb-snapshot = { path = "crates/snapshot", version = "=3.0.0" } +spacetimedb-subscription = { path = "crates/subscription", version = "=3.0.0" } +spacetimedb-query-builder = { path = "crates/query-builder", version = "=3.0.0" } # Prevent `ahash` from pulling in `getrandom` by disabling default features. # Modules use `getrandom02` and we need to prevent an incompatible version