mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-12 10:48:19 -04:00
c3848d53db
# Description of Changes (jdetter): Github marked Ryan's PR as merged because I rebased it without updating the base branch first - my bad. Original PR: https://github.com/clockworklabs/SpacetimeDB/pull/4120 This PR fixes C#-related CI failures when testing against `v1.12.0` before the corresponding NuGet packages are available on nuget.org. * CI: Ensure local C# NuGet packages are used consistently * Pack `crates/bindings-csharp/{BSATN.Runtime,Runtime}` with `-c Release` so the configured local package sources (`bin/Release`) actually contain the `.nupkg`s. * Run `./sdks/csharp/tools~/write-nuget-config.sh` in CI to generate a `NuGet.Config` that maps `SpacetimeDB.BSATN.Runtime` / `SpacetimeDB.Runtime` to those local sources (with `nuget.org` as fallback for non-SpacetimeDB dependencies). * Add an explicit `dotnet restore --configfile NuGet.Config` step before tests, and `run dotnet test --no-restore`, so restore always uses the intended config and does not “accidentally” restore from `nuget.org`. * `write-nuget-config.sh`: Make NuGet config discovery + mapping deterministic * Write `NuGet.Config` (capitalized) and include `<clear />` + an explicit `nuget.org` source to avoid inherited sources and to keep `PackageSourceMapping` functional. * Also write a repo-root `NuGet.Config` so `dotnet publish/pack` invoked from templates (outside `sdks/csharp/`) still discovers the same override behavior. * Smoketests quickstart: avoid `PackageSourceMapping` restore failures * Ensure smoketest helper packing uses `Release`, and when repo-root `NuGet.Config` exists, perform `dotnet restore --configfile ...` + `dotnet pack --no-restore` so pack/restore are evaluated with the same sources/mapping. * When editing configs, prefer `NuGet.Config` casing for Linux discovery and ensure `nuget.org` exists as a source for the fallback mapping. # API and ABI breaking changes No changes # Expected complexity level and risk 1 # Testing - [X] Locally tested concept after simulating local repro. - [x] Confirmed CI passes in this branch --------- Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io> Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>