[Feat] LFG queue, role check and status #1042
Workflow file for this run
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 Build (MSVC) | |
| on: | |
| push: | |
| branches: [ master, united, devel ] | |
| pull_request: | |
| branches: [ master, united ] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: windows-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| OPENSSL_VERSION: 3.6.3 | |
| OPENSSL_SHA512: 120A2E9A3E8B961484CB94D52F85D48DC2C8AF777B5B3B9E26BF49B4408797281F7C0FB2D543FD7796B3C3232ADFAA0F675E7122C0E5C4225B3B02E767197AC6 | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| env: | |
| BUILD_DIR: ${{ github.workspace }}\..\build-msvc | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 1 | |
| # Bump the -vN suffix to force a re-install of OpenSSL. | |
| - name: Cache OpenSSL | |
| id: cache-openssl | |
| uses: actions/cache@v4 | |
| with: | |
| path: C:\Program Files\OpenSSL-Win64 | |
| key: ${{ runner.os }}-openssl-${{ env.OPENSSL_VERSION }}-v1 | |
| - name: Install full OpenSSL (developer) | |
| if: steps.cache-openssl.outputs.cache-hit != 'true' | |
| shell: powershell | |
| run: | | |
| $versionSlug = $env:OPENSSL_VERSION.Replace('.', '_') | |
| $installer = Join-Path $env:RUNNER_TEMP "Win64OpenSSL-$versionSlug.exe" | |
| $url = "https://slproweb.com/download/Win64OpenSSL-$versionSlug.exe" | |
| Write-Host "Downloading OpenSSL $env:OPENSSL_VERSION for development..." | |
| curl.exe --fail --location --retry 3 --output $installer $url | |
| if ($LASTEXITCODE -ne 0) { | |
| throw "OpenSSL download failed with exit code $LASTEXITCODE" | |
| } | |
| $actualHash = (Get-FileHash -Algorithm SHA512 $installer).Hash | |
| if ($actualHash -ne $env:OPENSSL_SHA512) { | |
| throw "OpenSSL installer checksum mismatch: $actualHash" | |
| } | |
| $installArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Program Files\OpenSSL-Win64"' | |
| $process = Start-Process -FilePath $installer -ArgumentList $installArgs -Wait -PassThru | |
| if ($process.ExitCode -ne 0) { | |
| throw "OpenSSL installer failed with exit code $($process.ExitCode)" | |
| } | |
| - name: Verify OpenSSL major version | |
| shell: powershell | |
| run: | | |
| $openssl = "C:\Program Files\OpenSSL-Win64\bin\openssl.exe" | |
| if (-not (Test-Path $openssl)) { | |
| throw "OpenSSL executable not found at $openssl" | |
| } | |
| $version = & $openssl version | |
| Write-Host "Installed OpenSSL version: $version" | |
| if ($version -notmatch '^OpenSSL 3\.') { | |
| throw "Windows CI requires OpenSSL 3.x, found: $version" | |
| } | |
| - name: Configure OpenSSL environment | |
| shell: bash | |
| run: | | |
| root="C:/Program Files/OpenSSL-Win64" | |
| if [ -d "$root/lib/VC" ]; then | |
| echo "OPENSSL_ROOT_DIR=$root" >> "$GITHUB_ENV" | |
| echo "OPENSSL_INCLUDE_DIR=$root/include" >> "$GITHUB_ENV" | |
| echo "OPENSSL_CRYPTO_LIBRARY=$root/lib/VC/libcrypto64MT.lib" >> "$GITHUB_ENV" | |
| echo "OPENSSL_SSL_LIBRARY=$root/lib/VC/libssl64MT.lib" >> "$GITHUB_ENV" | |
| # SlProWeb installs provider DLLs beside openssl.exe, while its | |
| # compiled MODULESDIR still names the default installation path. | |
| echo "OPENSSL_MODULES=$root/bin" >> "$GITHUB_ENV" | |
| echo "$root/bin" >> "$GITHUB_PATH" | |
| else | |
| echo "::error::OpenSSL developer libraries not found" | |
| exit 1 | |
| fi | |
| # Supplies the toolchain and the Windows SDK together, which is why there | |
| # is no separate setup-windows10-sdk step. | |
| - name: Setup MSVC environment | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Compiler cache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| variant: sccache | |
| key: windows-msvc | |
| max-size: 500M | |
| # Never the socket tests: they bind real listeners and dominate the | |
| # suite's wall-clock. A human asks for them, CI does not. | |
| - name: Configure | |
| shell: bash | |
| run: > | |
| cmake -S . -B "$BUILD_DIR" -G Ninja | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DCMAKE_INSTALL_PREFIX="$BUILD_DIR/install" | |
| -DCMAKE_C_COMPILER_LAUNCHER=sccache | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=sccache | |
| -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR" | |
| -DBUILD_TOOLS=1 | |
| -DBUILD_MANGOSD=1 | |
| -DBUILD_REALMD=1 | |
| -DWITH_TESTS=1 | |
| -DWITH_NET_TESTS=0 | |
| -DSOAP=1 | |
| -DSCRIPT_LIB_ELUNA=1 | |
| -DSCRIPT_LIB_SD3=1 | |
| -DPLAYERBOTS=0 | |
| -DPCH=1 | |
| - name: Build | |
| shell: bash | |
| run: cmake --build "$BUILD_DIR" --parallel | |
| - name: Test | |
| shell: bash | |
| run: ctest --test-dir "$BUILD_DIR" --output-on-failure | |
| - name: Verify the working tree is clean | |
| shell: bash | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "::error::the build modified the source tree" | |
| git status --porcelain | |
| exit 1 | |
| fi |