Skip to content

Commit

Permalink
Merge branch 'master' into drogus/add-health-route
Browse files Browse the repository at this point in the history
  • Loading branch information
drogus authored Dec 16, 2024
2 parents 487f917 + 9211708 commit bdb6489
Show file tree
Hide file tree
Showing 673 changed files with 30,866 additions and 16,442 deletions.
7 changes: 5 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/crates/core/src/db/datastore/traits.rs @cloutiertyler
/rust-toolchain.toml @jdetter @cloutiertyler
/rust-toolchain.toml @cloutiertyler
/.github/CODEOWNERS @cloutiertyler
LICENSE.txt @cloutiertyler
/crates/client-api-messages/src/websocket.rs @centril @gefjon
/crates/cli/src/ @bfops @jdetter @cloutiertyler

/crates/cli/src/ @bfops @cloutiertyler
/crates/cli/src/subcommands/generate/ # No owners
/crates/cli/src/subcommands/generate/mod.rs @bfops @cloutiertyler # These codeowners should be the same as the "root" CLI codeowners
16 changes: 12 additions & 4 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
# summary PR" step). otherwise, we can use a fully shallow checkout
fetch-depth: ${{ env.PR_NUMBER && 1 || 2 }}

- name: Install stable toolchain
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -85,6 +85,13 @@ jobs:
target: wasm32-unknown-unknown
override: true

- name: Install .NET toolchain
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.x"
env:
DOTNET_INSTALL_DIR: ~/.dotnet

- name: Build
working-directory: crates/bench/
run: |
Expand All @@ -111,9 +118,10 @@ jobs:
echo "Running benchmarks with sqlite"
fi
pushd crates/bench
rm -rf .spacetime
cargo bench --bench generic -- --save-baseline "$BASELINE_NAME" "$BENCH_FILTER"
# sticker price benchmark
cargo bench --bench generic -- --save-baseline "$BASELINE_NAME" 'stdb_module/disk/update_bulk'
cargo bench --bench generic -- --save-baseline "$BASELINE_NAME" 'stdb_module/.*/disk/update_bulk'
cargo bench --bench special -- --save-baseline "$BASELINE_NAME"
cargo run --bin summarize pack "$BASELINE_NAME"
popd
Expand Down Expand Up @@ -191,7 +199,7 @@ jobs:
- name: Install valgrind & iai-callgrind-runner
run: |
apt-get update
apt-get install -y valgrind protobuf-compiler bash sudo curl gh
apt-get install -y valgrind protobuf-compiler bash sudo curl gh
cargo install --git https://github.com/clockworklabs/iai-callgrind.git --branch main iai-callgrind-runner
git config --global --add safe.directory /__w/SpacetimeDB/SpacetimeDB
Expand Down Expand Up @@ -287,6 +295,7 @@ jobs:
echo "Running master callgrind benchmarks"
fi
pushd crates/bench
rm -rf .spacetime
cargo bench --bench callgrind -- --save-summary pretty-json
cargo run --bin summarize pack-callgrind "$BASELINE_NAME"
popd
Expand Down Expand Up @@ -341,4 +350,3 @@ jobs:
echo "Letting anybody touch our git repo, in order to avoid breaking other jobs"
echo "This is necessary because we are running as root inside a docker image"
chmod -R a+rw .
41 changes: 9 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,49 +120,26 @@ jobs:
run: |
sudo mkdir /stdb
sudo chmod 777 /stdb
- name: Checkout C# SDK
uses: actions/checkout@v4
with:
repository: clockworklabs/spacetimedb-csharp-sdk
ref: staging
path: spacetimedb-csharp-sdk

- name: C# SDK tests
- name: Setup NuGet override for C# SDK
working-directory: spacetimedb-csharp-sdk
run: |
( cd crates/bindings-csharp/BSATN.Runtime && dotnet pack )
cd spacetimedb-csharp-sdk
# 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,
# and https://tldp.org/LDP/abs/html/here-docs.html for more info on this bash feature.
cat >nuget.config <<EOF
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!-- Local NuGet repositories -->
<add key="Local SpacetimeDB.BSATN.Runtime" value="../crates/bindings-csharp/BSATN.Runtime/bin/Release" />
</packageSources>
<packageSourceMapping>
<!-- Ensure that SpacetimeDB.BSATN.Runtime is used from the local folder. -->
<!-- Otherwise we risk an outdated version being quietly pulled from NuGet for testing. -->
<packageSource key="Local SpacetimeDB.BSATN.Runtime">
<package pattern="SpacetimeDB.BSATN.Runtime" />
</packageSource>
<!-- Fallback to NuGet for other packages. -->
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>
EOF
dotnet pack ../crates/bindings-csharp/BSATN.Runtime
./tools~/write-nuget-config.sh ..
# clear package caches, so we get fresh ones even if version numbers haven't changed
dotnet nuget locals all --clear
dotnet test
- name: Run C# SDK tests
working-directory: spacetimedb-csharp-sdk
run: dotnet test

lints:
name: Lints
Expand Down
Loading

0 comments on commit bdb6489

Please sign in to comment.