fix(scripts/warrior): Heroic Leap deals no landing damage #42
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: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| concurrency: | |
| group: windows-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| MYSQL_VERSION: "8.4.9" | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| name: Windows 2022 - MSVC 2022 - RelWithDebInfo | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # ------------------------------------------------------------------- | |
| # Install dependencies via Chocolatey | |
| # openssl - installs to C:\Program Files\OpenSSL\ | |
| # boost-msvc-14.3 - installs pre-built Boost for VS 2022 (toolset 14.3) | |
| # ------------------------------------------------------------------- | |
| - name: Install OpenSSL and Boost | |
| run: choco install openssl boost-msvc-14.3 --no-progress -y | |
| - name: Set dependency paths | |
| run: | | |
| $ssl = "C:\Program Files\OpenSSL" | |
| if (-not (Test-Path $ssl)) { Write-Error "OpenSSL not found at $ssl"; exit 1 } | |
| echo "OPENSSL_ROOT_DIR=$ssl" >> $env:GITHUB_ENV | |
| Write-Host "OpenSSL: $ssl" | |
| $boost = Get-ChildItem "C:\local" -Filter "boost_*" -Directory -ErrorAction SilentlyContinue | | |
| Sort-Object Name -Descending | Select-Object -First 1 -ExpandProperty FullName | |
| if (-not $boost) { Write-Error "Boost not found under C:\local"; exit 1 } | |
| echo "BOOST_ROOT=$boost" >> $env:GITHUB_ENV | |
| Write-Host "Boost: $boost" | |
| # ------------------------------------------------------------------- | |
| # MySQL 8.4 connector - download the server ZIP which contains the | |
| # client headers and libmysql.dll needed to build against. | |
| # cdn.mysql.com is the direct-download CDN (no Oracle redirect chain). | |
| # dev.mysql.com/get/Downloads/... is kept as a fallback. | |
| # -UseBasicParsing is required on headless Windows Server runners. | |
| # After download, verify the file is a ZIP (not an HTML error page). | |
| # ------------------------------------------------------------------- | |
| - name: Cache MySQL ${{ env.MYSQL_VERSION }} connector | |
| id: cache-mysql | |
| uses: actions/cache@v4 | |
| with: | |
| path: C:\mysql | |
| key: mysql-${{ env.MYSQL_VERSION }}-winx64 | |
| - name: Download MySQL ${{ env.MYSQL_VERSION }} | |
| if: steps.cache-mysql.outputs.cache-hit != 'true' | |
| run: | | |
| $ver = "${{ env.MYSQL_VERSION }}" | |
| $file = "mysql-${ver}-winx64.zip" | |
| $urls = @( | |
| "https://cdn.mysql.com/Downloads/MySQL-8.4/${file}", | |
| "https://dev.mysql.com/get/Downloads/MySQL-8.4/${file}" | |
| ) | |
| $downloaded = $false | |
| foreach ($url in $urls) { | |
| Write-Host "Trying: $url" | |
| try { | |
| Invoke-WebRequest -Uri $url -OutFile mysql.zip -UseBasicParsing -TimeoutSec 300 -ErrorAction Stop | |
| # Verify the download is actually a ZIP and not an HTML error page | |
| $magic = [System.IO.File]::ReadAllBytes("mysql.zip")[0..1] | |
| if ($magic[0] -eq 0x50 -and $magic[1] -eq 0x4B) { | |
| $downloaded = $true | |
| Write-Host "Downloaded from $url" | |
| break | |
| } else { | |
| Write-Host "Got non-ZIP response from $url (HTML error page?), trying next" | |
| Remove-Item mysql.zip -Force | |
| } | |
| } catch { | |
| Write-Host "Failed: $_" | |
| } | |
| } | |
| if (-not $downloaded) { Write-Error "All MySQL download URLs failed"; exit 1 } | |
| Expand-Archive mysql.zip -DestinationPath C:\mysql-tmp | |
| Move-Item "C:\mysql-tmp\mysql-${ver}-winx64" "C:\mysql" | |
| # ------------------------------------------------------------------- | |
| # Configure | |
| # ------------------------------------------------------------------- | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build | |
| -G "Visual Studio 17 2022" | |
| -A x64 | |
| -DSCRIPTS=static | |
| -DTOOLS=ON | |
| -DSERVERS=ON | |
| -DWITH_WARNINGS=ON | |
| -DMYSQL_ROOT_DIR="C:\mysql" | |
| env: | |
| BOOST_ROOT: ${{ env.BOOST_ROOT }} | |
| OPENSSL_ROOT_DIR: ${{ env.OPENSSL_ROOT_DIR }} | |
| # ------------------------------------------------------------------- | |
| # Build | |
| # ------------------------------------------------------------------- | |
| - name: Build | |
| run: cmake --build build --config RelWithDebInfo --parallel 2 | |
| # ------------------------------------------------------------------- | |
| # Package - collect binaries, configs, and required runtime DLLs | |
| # ------------------------------------------------------------------- | |
| - name: Package artifacts | |
| run: | | |
| $out = "dist" | |
| New-Item -ItemType Directory -Force $out | Out-Null | |
| Copy-Item "build\bin\RelWithDebInfo\*.exe" $out | |
| Copy-Item "build\bin\RelWithDebInfo\*.dll" $out -ErrorAction SilentlyContinue | |
| if (Test-Path "build\bin\RelWithDebInfo\configs") { | |
| Copy-Item "build\bin\RelWithDebInfo\configs" "$out\configs" -Recurse | |
| } | |
| Copy-Item "C:\mysql\lib\libmysql.dll" $out | |
| $ssl = $env:OPENSSL_ROOT_DIR | |
| Get-ChildItem "$ssl\bin\*.dll" | Copy-Item -Destination $out | |
| Compress-Archive "$out\*" "ArgusCore-Win64-${{ github.sha }}.zip" | |
| Get-ChildItem $out -Filter *.pdb -Recurse | Remove-Item -Force | |
| Compress-Archive "$out\*" "ArgusCore-Win64-${{ github.sha }}-NoSymbols.zip" | |
| - name: Upload artifact (with symbols) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ArgusCore-Win64-${{ github.sha }} | |
| path: ArgusCore-Win64-${{ github.sha }}.zip | |
| retention-days: 30 | |
| - name: Upload artifact (no symbols) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ArgusCore-Win64-${{ github.sha }}-NoSymbols | |
| path: ArgusCore-Win64-${{ github.sha }}-NoSymbols.zip | |
| retention-days: 30 |