From 9dfeb0ca93db9a149ddb5cec8a8439f0d20b54be Mon Sep 17 00:00:00 2001 From: Michael Serajnik Date: Thu, 14 May 2026 10:47:19 +0200 Subject: [PATCH] CI: Consolidate Linux and Windows releases into one tag. (#3408) --- .github/workflows/ci-build.yaml | 16 +++- ...-release.yaml => development-release.yaml} | 70 +++++++++++++--- .../windows-development-release.yaml | 83 ------------------- README.md | 3 +- 4 files changed, 72 insertions(+), 100 deletions(-) rename .github/workflows/{linux-development-release.yaml => development-release.yaml} (65%) delete mode 100644 .github/workflows/windows-development-release.yaml diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index 2503f1bf8..4e633b862 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -136,7 +136,13 @@ jobs: cd "$GITHUB_WORKSPACE" mkdir -p build cd build - cmake -DBUILD_EXTRACTORS=1 -DENABLE_MAILSENDER=1 -DBUILD_WARNINGS_AS_ERROR=1 -DSUPPORTED_CLIENT_BUILD="${{ matrix.client_build }}" -G "Visual Studio 17 2022" -A x64 .. + cmake ../ \ + -DBUILD_EXTRACTORS=1 \ + -DENABLE_MAILSENDER=1 \ + -DBUILD_WARNINGS_AS_ERROR=1 \ + -DSUPPORTED_CLIENT_BUILD="${{ matrix.client_build }}" \ + -G "Visual Studio 17 2022" \ + -A x64 "/c/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" "MaNGOS.sln" //p:Platform=x64 //p:Configuration=Release //m - name: Build and install on Windows (MinGW) @@ -146,5 +152,11 @@ jobs: set -euo pipefail mkdir -p build cd build - cmake -DBUILD_EXTRACTORS=1 -DENABLE_MAILSENDER=1 -DBUILD_WARNINGS_AS_ERROR=1 -DSUPPORTED_CLIENT_BUILD="${{ matrix.client_build }}" -DCMAKE_BUILD_TYPE=Release -G Ninja .. + cmake ../ \ + -DBUILD_EXTRACTORS=1 \ + -DENABLE_MAILSENDER=1 \ + -DBUILD_WARNINGS_AS_ERROR=1 \ + -DSUPPORTED_CLIENT_BUILD="${{ matrix.client_build }}" \ + -DCMAKE_BUILD_TYPE=Release \ + -G Ninja cmake --build . --parallel diff --git a/.github/workflows/linux-development-release.yaml b/.github/workflows/development-release.yaml similarity index 65% rename from .github/workflows/linux-development-release.yaml rename to .github/workflows/development-release.yaml index 091982e88..507ab10fc 100644 --- a/.github/workflows/linux-development-release.yaml +++ b/.github/workflows/development-release.yaml @@ -1,5 +1,5 @@ -# Build and publish the Linux development release on pushes to development. -name: Linux Development Release +# Build and publish the development release on pushes to development. +name: Development Release on: push: @@ -18,11 +18,11 @@ on: - 'sql/**' concurrency: - group: linux-development-release-${{ github.ref }} + group: development-release-${{ github.ref }} cancel-in-progress: true jobs: - build: + build-linux: name: Build Linux development release runs-on: ubuntu-24.04 permissions: @@ -105,9 +105,48 @@ jobs: name: linux-development-build path: "${{ github.workspace }}/bin/${{ env.ARCHIVE_FILENAME }}" + build-windows: + name: Build Windows development release + runs-on: windows-2022 + permissions: + contents: read + + steps: + - name: Check out repository + uses: actions/checkout@v6 + + - name: Build release binaries + shell: bash # Windows runners default to PowerShell. + run: | + set -euo pipefail + mkdir -p build + cd build + cmake ../ \ + -DBUILD_EXTRACTORS=1 \ + -DBUILD_WARNINGS_AS_ERROR=1 \ + -G "Visual Studio 17 2022" \ + -A x64 + "/c/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" "MaNGOS.sln" //p:Platform=x64 //p:Configuration=Release //m + + - name: Set release archive filename + run: | + echo "ARCHIVE_FILENAME=dev-windows-amd64-$(git rev-parse --short HEAD).zip" >> $env:GITHUB_ENV + + - name: Create release archive + shell: bash # Windows runners default to PowerShell. + run: | + set -euo pipefail + ./.github/scripts/package-windows-release.sh x64 "$ARCHIVE_FILENAME" + + - name: Upload release artifact + uses: actions/upload-artifact@v7 + with: + name: windows-development-build + path: "${{ github.workspace }}/bin/${{ env.ARCHIVE_FILENAME }}" + publish: - name: Publish Linux development release - needs: build + name: Publish development release + needs: [build-linux, build-windows] runs-on: ubuntu-24.04 permissions: contents: write @@ -118,19 +157,24 @@ jobs: with: fetch-depth: 0 - - name: Download release artifact + - name: Download Linux release artifact uses: actions/download-artifact@v8 with: - pattern: linux-development-build - merge-multiple: true + name: linux-development-build + path: release-assets + + - name: Download Windows release artifact + uses: actions/download-artifact@v8 + with: + name: windows-development-build path: release-assets - name: Write release notes preamble run: | - cat >linux-release-notes.md <<'RELEASE_NOTES' - ## Compatibility + cat >release-notes.md <<'RELEASE_NOTES' + ## Linux compatibility - This Linux development build is for `amd64` systems using `glibc` 2.39 or newer. + The Linux build is for `amd64` systems using `glibc` 2.39 or newer. It is built on Ubuntu 24.04 and bundles non-`glibc` runtime libraries. It is not expected to run on Alpine/`musl` or older `glibc` systems. @@ -139,4 +183,4 @@ jobs: - name: Publish release snapshot env: GH_TOKEN: ${{ github.token }} - run: ./.github/scripts/publish-moving-release.sh linux_latest "Linux Development Build" release-assets linux-release-notes.md + run: ./.github/scripts/publish-moving-release.sh latest "Development Build" release-assets release-notes.md diff --git a/.github/workflows/windows-development-release.yaml b/.github/workflows/windows-development-release.yaml deleted file mode 100644 index 00e29b94c..000000000 --- a/.github/workflows/windows-development-release.yaml +++ /dev/null @@ -1,83 +0,0 @@ -# Build and publish the Windows development release on pushes to development. -name: Windows Development Release - -on: - push: - branches: - - development - paths-ignore: - - '.github/ISSUE_TEMPLATE.md' - - '.github/ISSUE_TEMPLATE/**' - - '.github/PULL_REQUEST_TEMPLATE.md' - - '.github/workflows/development-db-dump.yaml' - - '.github/workflows/pr-sql-check.yaml' - - '.gitignore' - - 'CONTRIBUTING.md' - - 'LICENSE' - - 'README.md' - - 'sql/**' - -concurrency: - group: windows-development-release-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - name: Build Windows development release - runs-on: windows-2022 - permissions: - contents: read - - steps: - - name: Check out repository - uses: actions/checkout@v6 - - - name: Build release binaries - shell: bash # Windows runners default to PowerShell. - run: | - set -euo pipefail - mkdir -p build - cd build - cmake -DBUILD_EXTRACTORS=1 -DBUILD_WARNINGS_AS_ERROR=1 -G "Visual Studio 17 2022" -A x64 .. - "/c/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" "MaNGOS.sln" //p:Platform=x64 //p:Configuration=Release //m - - - name: Set release archive filename - run: | - echo "ARCHIVE_FILENAME=dev-$(git rev-parse --short HEAD).zip" >> $env:GITHUB_ENV - - - name: Create release archive - shell: bash # Windows runners default to PowerShell. - run: | - set -euo pipefail - ./.github/scripts/package-windows-release.sh x64 "$ARCHIVE_FILENAME" - - - name: Upload release artifact - uses: actions/upload-artifact@v7 - with: - name: windows-development-build - path: "${{ github.workspace }}/bin/${{ env.ARCHIVE_FILENAME }}" - - publish: - name: Publish Windows development release - needs: build - runs-on: ubuntu-24.04 - permissions: - contents: write - - steps: - - name: Check out repository - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Download release artifact - uses: actions/download-artifact@v8 - with: - pattern: windows-development-build - merge-multiple: true - path: release-assets - - - name: Publish release snapshot - env: - GH_TOKEN: ${{ github.token }} - run: ./.github/scripts/publish-moving-release.sh latest "Windows Development Build" release-assets diff --git a/README.md b/README.md index 6dff0c9c5..792537532 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,7 @@ This project is an independent continuation of the Elysium / LightsHope codebase - Tools are great: Content creation should not require programming knowledge. We hope to eventually provide tools that allow for user-friendly editing of database scripts and content, with all data presented in human-readable form. ### Downloads -- [![Windows Development Release](https://github.com/vmangos/core/actions/workflows/windows-development-release.yaml/badge.svg)](https://github.com/vmangos/core/releases/tag/latest) Latest Windows development build -- [![Linux Development Release](https://github.com/vmangos/core/actions/workflows/linux-development-release.yaml/badge.svg)](https://github.com/vmangos/core/releases/tag/linux_latest) Latest Linux development build +- [![Development Release](https://github.com/vmangos/core/actions/workflows/development-release.yaml/badge.svg)](https://github.com/vmangos/core/releases/tag/latest) Latest development build (Linux and Windows) - [![Development Database Dump](https://github.com/vmangos/core/actions/workflows/development-db-dump.yaml/badge.svg)](https://github.com/vmangos/core/releases/tag/db_latest) Latest MySQL 5.6 development database snapshot; no updates required ### Useful Links