name: .NET port on: push: paths: ['dotnet/**', 'core/**', 'server/**', 'tests/**', 'cmake/**', 'CMakeLists.txt', 'vcpkg.json', '.github/workflows/dotnet.yml'] pull_request: paths: ['dotnet/**', 'core/**', 'server/**', 'tests/**', '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 - 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 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 dotnet restore dotnet/VoiceCat.slnx --locked-mode dotnet test dotnet/VoiceCat.slnx -c Release --no-restore