Skip to content

Commit

Permalink
[release/v1.0.0-rc1-hotfix4]: Migrate C# client-side reducer enum to …
Browse files Browse the repository at this point in the history
…the new syntax (#2033)
  • Loading branch information
RReverser authored and bfops committed Dec 6, 2024
1 parent 1babcfc commit 39ebaea
Show file tree
Hide file tree
Showing 8 changed files with 314 additions and 368 deletions.
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions crates/bindings-csharp/Runtime/Internal/Autogen/Typespace.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 39ebaea

Please sign in to comment.