name: .NET port on: push: paths: ['dotnet/**', 'clients/apple/dotnet/**', 'core/**', 'server/**', 'tests/**', 'third_party/**', 'cmake/**', 'CMakeLists.txt', 'vcpkg.json', '.github/workflows/dotnet.yml'] pull_request: paths: ['dotnet/**', 'clients/apple/dotnet/**', 'core/**', 'server/**', 'tests/**', 'third_party/**', 'cmake/**', 'CMakeLists.txt', 'vcpkg.json', '.github/workflows/dotnet.yml'] workflow_dispatch: jobs: test: strategy: fail-fast: false matrix: os: [windows-latest, ubuntu-24.04, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 with: global-json-file: dotnet/global.json cache: true cache-dependency-path: dotnet/**/packages.lock.json - name: Build and stage native codec/DSP shell: pwsh run: ./dotnet/build-native.ps1 - run: dotnet restore dotnet/VoiceCat.slnx --locked-mode - run: dotnet build dotnet/VoiceCat.slnx -c Release --no-restore - run: dotnet test dotnet/VoiceCat.slnx -c Release --no-build - shell: pwsh run: ./dotnet/check-licenses.ps1 apple-client: runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 with: global-json-file: dotnet/global.json cache: true cache-dependency-path: dotnet/**/packages.lock.json - name: Install Apple workloads run: dotnet workload install macos ios --version 10.0.401 - name: Build and stage native codec/DSP shell: pwsh run: ./dotnet/build-native.ps1 - name: Build and stage static iOS codec/DSP run: ./dotnet/build-native-ios.sh - name: Restore managed Apple clients run: dotnet restore clients/apple/dotnet/VoiceCat.Apple.slnx - name: Build managed AppKit and UIKit clients run: dotnet build clients/apple/dotnet/VoiceCat.Apple.slnx -c Debug --no-restore cpp-conformance: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: submodules: true - uses: actions/setup-dotnet@v4 with: global-json-file: dotnet/global.json - uses: actions/cache@v4 with: path: ~/.cache/vcpkg key: dotnet-oracle-linux-${{ hashFiles('vcpkg.json', 'vcpkg') }} - name: Install C++ build dependencies run: | sudo apt-get update sudo apt-get install -y build-essential cmake ninja-build curl zip unzip tar pkg-config autoconf autoconf-archive automake libtool nasm python3 ./vcpkg/bootstrap-vcpkg.sh -disableMetrics - name: Build and verify both implementations run: | cmake --preset dev -DVOICECAT_BUILD_DOTNET_ORACLE=ON cmake --build --preset dev ctest --preset dev ./build/dev/bin/voicecat-dotnet-oracle build/dev/cpp-wire.json diff -u dotnet/tests/VoiceCat.Tests/Fixtures/cpp-wire.json build/dev/cpp-wire.json ./build/dev/bin/voicecat-dotnet-password-oracle build/dev/cpp-passwords.json diff -u dotnet/tests/VoiceCat.Tests/Fixtures/cpp-passwords.json build/dev/cpp-passwords.json ./build/dev/bin/voicecat-dotnet-dsp-oracle build/dev/cpp-noise.json pwsh -File dotnet/compare-dsp-fixtures.ps1 dotnet/tests/VoiceCat.Tests/Fixtures/cpp-noise.json build/dev/cpp-noise.json pwsh -File dotnet/build-native.ps1 dotnet restore dotnet/VoiceCat.slnx --locked-mode VOICECAT_TLS_ORACLE="$PWD/build/dev/bin/voicecat-dotnet-tls-oracle" VOICECAT_DATABASE_ORACLE="$PWD/build/dev/bin/voicecat-dotnet-database-oracle" VOICECAT_VOICE_ORACLE="$PWD/build/dev/bin/voicecat-dotnet-voice-oracle" VOICECAT_VCCLI="$PWD/build/dev/bin/vccli" dotnet test dotnet/VoiceCat.slnx -c Release --no-restore