2026-09-19 22:40:48 +02:00
|
|
|
# Building and testing
|
2026-06-16 16:30:07 +02:00
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
## Prerequisites
|
2026-09-15 17:54:16 +02:00
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
- .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
|
2026-09-15 17:54:16 +02:00
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
Dependencies and NuGet lock files are committed. GPL/LGPL dependencies are forbidden.
|
|
|
|
|
|
|
|
|
|
## Managed core, server, CLI, and tests
|
|
|
|
|
|
|
|
|
|
From the repository root:
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-09-15 22:51:33 +02:00
|
|
|
./dotnet/build-native.ps1
|
2026-09-15 17:54:16 +02:00
|
|
|
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
|
2026-09-19 22:40:48 +02:00
|
|
|
./dotnet/check-licenses.ps1
|
2026-09-15 17:54:16 +02:00
|
|
|
```
|
|
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
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`.
|
2026-09-15 17:54:16 +02:00
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
Equivalent direct native build:
|
2026-06-16 16:30:07 +02:00
|
|
|
|
|
|
|
|
```bash
|
2026-09-19 22:40:48 +02:00
|
|
|
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
|
2026-07-03 10:42:42 +01:00
|
|
|
```
|
2026-06-16 16:30:07 +02:00
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
## Run locally
|
2026-07-03 10:42:42 +01:00
|
|
|
|
|
|
|
|
```bash
|
2026-09-19 22:40:48 +02:00
|
|
|
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
|
2026-06-16 16:30:07 +02:00
|
|
|
```
|
|
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
Both commands support `--help`. The CLI also supports deterministic two-process text and tone
|
|
|
|
|
checks used by the managed test suite.
|
2026-07-03 10:42:42 +01:00
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
## Windows client
|
2026-06-18 17:36:47 +02:00
|
|
|
|
|
|
|
|
```powershell
|
2026-09-19 22:40:48 +02:00
|
|
|
./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
|
2026-06-18 17:36:47 +02:00
|
|
|
```
|
|
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
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`.
|
2026-06-18 17:36:47 +02:00
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
## Apple clients
|
2026-06-18 17:36:47 +02:00
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
On Apple Silicon with the SDK/workload versions documented in
|
|
|
|
|
`clients/apple/dotnet/README.md`:
|
2026-09-19 15:43:37 +02:00
|
|
|
|
|
|
|
|
```bash
|
2026-09-19 22:40:48 +02:00
|
|
|
./dotnet/build-native.ps1
|
2026-09-19 15:43:37 +02:00
|
|
|
./dotnet/build-native-ios.sh
|
|
|
|
|
dotnet restore clients/apple/dotnet/VoiceCat.Apple.slnx
|
2026-09-19 22:40:48 +02:00
|
|
|
dotnet build clients/apple/dotnet/VoiceCat.Apple.slnx -c Debug --no-restore
|
2026-09-19 15:43:37 +02:00
|
|
|
```
|
|
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
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.
|
2026-06-19 02:19:38 +02:00
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
## Server publishing
|
2026-06-19 02:19:38 +02:00
|
|
|
|
2026-09-20 01:15:52 +02:00
|
|
|
`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.
|
2026-09-19 22:40:48 +02:00
|
|
|
`Dockerfile`, Compose configuration, and systemd packaging use the managed server. Validate a
|
|
|
|
|
published binary with its TLS `--health-check`, preferably including `--expect-fingerprint`.
|
2026-06-19 02:19:38 +02:00
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
## CI and release expectations
|
2026-06-19 02:19:38 +02:00
|
|
|
|
2026-09-19 22:40:48 +02:00
|
|
|
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`.
|