Merge branch '3.3.5' into Omrogg #23
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 x64 | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| env: | |
| CMAKE_BUILD_TYPE: RelWithDebInfo | |
| MYSQL_ROOT_DIR: C:/Program Files/MySQL/MySQL Server 8.0 | |
| OPENSSL_ROOT_DIR: C:/libs/openssl | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set reusable strings | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
| - name: Get current OpenSSL version | |
| id: openssl-info | |
| run: | | |
| $VersionsUrl = "https://api.github.com/repos/slproweb/opensslhashes/contents/win32_openssl_hashes.json" | |
| $Headers = @{ | |
| Accept="application/vnd.github.raw+json" | |
| Authorization="Bearer ${{ secrets.GITHUB_TOKEN }}" | |
| } | |
| $openSSL = (Invoke-RestMethod $VersionsUrl -Headers $Headers).files.PSObject.Properties | | |
| Select-Object -ExpandProperty Value | | |
| Where-Object { $_.arch -eq 'INTEL' } | | |
| Where-Object { $_.bits -eq '64' } | | |
| Where-Object { $_.light -eq $false } | | |
| Where-Object { $_.installer -eq 'exe' } | | |
| Sort-Object -Descending @{ Expression = { [version]$_.basever } } | | |
| Select-Object -First 1 | |
| [System.String]::Format("cache-key=openssl-{0}-win-{1}-{2}", $openSSL.basever, $openSSL.arch, $openSSL.bits) >> $env:GITHUB_OUTPUT | |
| [System.String]::Format("url={0}", $openSSL.url) >> $env:GITHUB_OUTPUT | |
| - name: Cache OpenSSL | |
| id: cache-openssl | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.OPENSSL_ROOT_DIR }} | |
| key: ${{ steps.openssl-info.outputs.cache-key }} | |
| - name: Download and install Openssl 3.x | |
| if: ${{ steps.cache-openssl.outputs.cache-hit != 'true' }} | |
| run: | | |
| (New-Object System.Net.WebClient).DownloadFile("${{ steps.openssl-info.outputs.url }}", "${{ env.TEMP }}\openssl.exe") | |
| Start-Process -Wait -FilePath "${{ env.TEMP }}\openssl.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES",/DIR=${{ env.OPENSSL_ROOT_DIR }} | |
| # Quick Openssl install test | |
| & ${{ env.OPENSSL_ROOT_DIR }}/bin/openssl.exe version | |
| - name: Download and install Boost | |
| uses: MarkusJx/install-boost@v2 | |
| id: install-boost | |
| with: | |
| boost_version: 1.84.0 | |
| link: static | |
| platform_version: 2022 | |
| toolset: msvc | |
| - name: Initialize Visual Studio Environment | |
| uses: egor-tensin/vs-shell@v2 | |
| with: | |
| arch: x64 | |
| - name: Configure CMake | |
| env: | |
| BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | |
| run: > | |
| cmake -GNinja -S ${{ github.workspace }} -B ${{ steps.strings.outputs.build-output-dir }} | |
| -DWITH_WARNINGS_AS_ERRORS=ON -DTOOLS=ON | |
| - name: Build | |
| run: | | |
| cmake --build ${{ steps.strings.outputs.build-output-dir }} | |
| - name: Copy Dependencies | |
| run: | | |
| cd ${{ steps.strings.outputs.build-output-dir }}/bin/${{ env.CMAKE_BUILD_TYPE }} | |
| copy "${{ env.MYSQL_ROOT_DIR }}/lib/libmysql.dll" libmysql.dll | |
| # mysql may depend on a different version of openssl so copy its dlls first (override later with openssl's own if same version) | |
| Copy-Item -Path "${{ env.MYSQL_ROOT_DIR }}/bin/*" -Include libcrypto*,libssl* -Destination . | |
| Copy-Item -Path "${{ env.OPENSSL_ROOT_DIR }}/bin/*" -Include libcrypto*,libssl*,legacy* -Destination . | |
| - name: Check binaries | |
| run: | | |
| cd ${{ steps.strings.outputs.build-output-dir }}/bin/${{ env.CMAKE_BUILD_TYPE }} | |
| ./authserver --version | |
| ./worldserver --version | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ${{ steps.strings.outputs.build-output-dir }}/bin/${{ env.CMAKE_BUILD_TYPE }} | |
| name: TrinityCore335Win64VS2022 | |
| # Set a custom retention for artifacts | |
| #retention-days: 7 |