Fix SteamNetworkingUtils() interface for SteamAPI dedicated server #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows | |
| on: [push, pull_request] | |
| jobs: | |
| build-and-test-windows: | |
| name: ${{ matrix.os-version }} ${{ matrix.crypto }} | |
| runs-on: windows-${{ matrix.os-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Windows Server 2019 has been retired. The Windows Server 2019 image has been removed as of 2025-06-30. For more details, see https://github.com/actions/runner-images/issues/12045 | |
| os-version: [2022, 2025] | |
| crypto: [OpenSSL, BCrypt] | |
| env: | |
| VCPKG_ROOT: ${{ github.workspace }}/vcpkg | |
| VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg-bincache | |
| VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/vcpkg-bincache,readwrite | |
| steps: | |
| - uses: actions/checkout@main | |
| - name: Setup mock IPs | |
| run: py -3 tests/test_p2p.py --setup-mock-ips | |
| shell: cmd | |
| # Mark all directories as safe so checkouts performed in CMakeLists.txt don't cause "unsafe repository" errors. | |
| # See https://github.com/actions/checkout/issues/766 | |
| - name: Configure Git | |
| run: git config --global --add safe.directory '*' | |
| shell: cmd | |
| - uses: lukka/get-cmake@latest | |
| # Setup MSVC command prompt environment vars. | |
| # We must do this before setting up our local vcpkg, | |
| # Because it will set VCPKG_ROOT to point to some global | |
| # install of vcpkg, and we don't want that | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - name: set VCPKG_ROOT | |
| run: | | |
| "VCPKG_ROOT=${{ github.workspace }}/vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| shell: pwsh | |
| - name: Setup local vcpkg | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git "${{ env.VCPKG_ROOT }}" | |
| cd /d "${{ env.VCPKG_ROOT }}" | |
| git checkout 522253caf47268c1724f486a035e927a42a90092 | |
| call bootstrap-vcpkg.bat -disableMetrics | |
| shell: cmd | |
| - name: Ensure vcpkg cache directories exist | |
| run: | | |
| New-Item -ItemType Directory -Path "${{ env.VCPKG_ROOT }}/downloads" -Force | Out-Null | |
| New-Item -ItemType Directory -Path "${{ env.VCPKG_DEFAULT_BINARY_CACHE }}" -Force | Out-Null | |
| shell: pwsh | |
| - name: Restore vcpkg caches | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ env.VCPKG_ROOT }}/downloads | |
| ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
| key: vcpkg-${{ runner.os }}-${{ matrix.os-version }}-${{ matrix.crypto }}-${{ env.VCToolsVersion }}-522253caf47268c1724f486a035e927a42a90092-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: | | |
| vcpkg-${{ runner.os }}-${{ matrix.os-version }}-${{ matrix.crypto }}-${{ env.VCToolsVersion }}- | |
| vcpkg-${{ runner.os }}-${{ matrix.os-version }}-${{ matrix.crypto }}- | |
| - name: vcpkg check / install dependencies | |
| working-directory: '${{ github.workspace }}' | |
| run: '"${{env.VCPKG_ROOT}}\vcpkg" install --vcpkg-root "${{env.VCPKG_ROOT}}" --triplet=x64-windows' | |
| shell: cmd | |
| - name: Configure CMake (RelWithDebInfo) | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -S .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON "-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DUSE_CRYPTO=${{matrix.crypto}} | |
| shell: cmd | |
| - name: Build (RelWithDebInfo) | |
| working-directory: '${{ github.workspace }}/build' | |
| run: ninja | |
| shell: cmd | |
| - name: Test crypto | |
| working-directory: '${{ github.workspace }}/build/bin' | |
| run: test_crypto.exe | |
| shell: cmd | |
| - name: Test connection | |
| working-directory: '${{ github.workspace }}/build/bin' | |
| run: test_connection.exe suite-quick | |
| shell: cmd | |
| - name: Test p2p | |
| working-directory: '${{ github.workspace }}/build/bin' | |
| run: py -3 test_p2p.py --spewlevel=debug --loglevel-p2prendezvous=debug | |
| shell: cmd | |
| - name: Configure CMake (Release) | |
| run: | | |
| mkdir build-release | |
| cd build-release | |
| cmake -S .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON "-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DUSE_CRYPTO=${{matrix.crypto}} | |
| shell: cmd | |
| - name: Build (Release) | |
| working-directory: '${{ github.workspace }}/build-release' | |
| run: ninja | |
| shell: cmd | |
| - name: Configure CMake (Debug) | |
| run: | | |
| mkdir build-debug | |
| cd build-debug | |
| cmake -S .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON "-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DUSE_CRYPTO=${{matrix.crypto}} | |
| shell: cmd | |
| - name: Build (Debug) | |
| working-directory: '${{ github.workspace }}/build-debug' | |
| run: ninja | |
| shell: cmd |