Retire legacy implementations and flatten managed layout
Build and test / test (macos-latest) (push) Canceled after 0s
Build and test / test (ubuntu-24.04) (push) Canceled after 0s
Build and test / test (windows-latest) (push) Canceled after 0s
Build and test / apple-client (push) Canceled after 0s

This commit is contained in:
2026-09-21 00:11:32 +02:00
parent dd811a0bb8
commit 08e6c5930a
422 changed files with 252 additions and 38242 deletions
+24 -70
View File
@@ -1,88 +1,42 @@
# Building and testing
## Prerequisites
- .NET SDK selected by `dotnet/global.json`
- CMake and a C compiler for the Opus/RNNoise shim
- PowerShell for the cross-platform build scripts
- Xcode plus the pinned .NET macOS/iOS workloads for Apple clients
Dependencies and NuGet lock files are committed. GPL/LGPL dependencies are forbidden.
## Managed core, server, CLI, and tests
VoiceCat requires the .NET SDK selected by `global.json`, PowerShell, CMake, and a C compiler.
Apple clients additionally require macOS, Xcode, and the pinned .NET macOS/iOS workloads.
From the repository root:
```bash
./dotnet/build-native.ps1
dotnet restore dotnet/VoiceCat.slnx --locked-mode
dotnet build dotnet/VoiceCat.slnx -c Release --no-restore
dotnet test dotnet/VoiceCat.slnx -c Release --no-build
./dotnet/check-licenses.ps1
```powershell
./scripts/build-native.ps1
dotnet restore VoiceCat.slnx --locked-mode
dotnet build VoiceCat.slnx -c Release --no-restore
dotnet test VoiceCat.slnx -c Release --no-build
./scripts/check-licenses.ps1
```
The native script builds `native/media`, fetches checksum-pinned Opus 1.5.2, compiles vendored
RNNoise, and stages the resulting library and notices in `dotnet/artifacts/native`.
`build-native.ps1` builds the narrow Opus/RNNoise shim in `native/media` and stages it under
`artifacts/native`. NuGet dependencies and lock files are committed; GPL/LGPL dependencies are
forbidden and the approved license set is enforced by `scripts/check-licenses.ps1`.
Equivalent direct native build:
```bash
cmake -S native/media -B dotnet/artifacts/native-build -DCMAKE_BUILD_TYPE=Release
cmake --build dotnet/artifacts/native-build --target voicecat_media --parallel 2
cmake --install dotnet/artifacts/native-build --component DotnetMedia \
--prefix dotnet/artifacts/native
```
## Run locally
```bash
dotnet run --project dotnet/src/VoiceCat.Server -- --data-dir ./voicecat-data
dotnet run --project dotnet/src/VoiceCat.Cli -- \
--host 127.0.0.1 --port 8384 --nickname Alice --trust-first
```
Both commands support `--help`. The CLI also supports deterministic two-process text and tone
checks used by the managed test suite.
## Windows client
Run the server and CLI locally with:
```powershell
./dotnet/build-native.ps1
dotnet restore clients/windows/VoiceCat.slnx --locked-mode
dotnet build clients/windows/VoiceCat.slnx -c Release --no-restore
./clients/windows/publish-client.ps1
dotnet run --project src/VoiceCat.Server -- --data-dir ./voicecat-data
dotnet run --project src/VoiceCat.Cli -- --host 127.0.0.1 --nickname Local --trust-first
```
The supported app references `VoiceCat.Managed` and the managed core. Published output must
contain `voicecat_media.dll` and must not contain the retired `voicecat.dll`.
Build the Windows client with `clients/windows/VoiceCat.slnx` and publish it with
`clients/windows/publish-client.ps1`.
## Apple clients
On Apple Silicon with the SDK/workload versions documented in
`clients/apple/dotnet/README.md`:
On macOS, stage the native libraries and build the Apple clients with:
```bash
./dotnet/build-native.ps1
./dotnet/build-native-ios.sh
dotnet restore clients/apple/dotnet/VoiceCat.Apple.slnx
dotnet build clients/apple/dotnet/VoiceCat.Apple.slnx -c Debug --no-restore
./scripts/build-native.ps1
./scripts/build-native-ios.sh
dotnet restore clients/apple/VoiceCat.Apple.slnx
dotnet build clients/apple/VoiceCat.Apple.slnx -c Debug --no-restore
```
The iOS build invokes the standalone project in `native/apple/broadcast` and embeds its appex.
Use `clients/apple/dotnet/build-ios-device.sh` and `deploy-ios-device.sh` for signed device
builds. Use `clients/apple/dotnet/publish-macos.sh --dry-run` for an ad-hoc validated macOS
bundle; its environment variables enable Developer ID signing and notarization.
See `clients/apple/README.md` and `docs/ios-deploy.md` for signing and device workflows.
## Server publishing
`dotnet/publish-server.ps1` produces locked self-contained Windows and Linux artifacts in one
command. Pass `-Runtime win-x64` or `-Runtime linux-x64` to publish only one target.
`Dockerfile`, Compose configuration, and systemd packaging use the managed server. Validate a
published binary with its TLS `--health-check`, preferably including `--expect-fingerprint`.
## CI and release expectations
CI builds the native shim, managed solution, tests, licenses, and managed Apple clients. The
old C++ implementation is not a conformance target. Release validation additionally includes
real devices, screen readers, sustained calls, signing/notarization, container execution, and
a server soak; see `roadmap.md`.
Publish self-contained server binaries with `scripts/publish-server.ps1`. Generated native,
client, and server artifacts live under `artifacts/`.