copilot-swe-agent[bot] 1e600896d6 Remove error suppression to resolve conflicts with base branch
Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
2026-01-24 19:16:10 +00:00

169 lines
4.6 KiB
YAML

name: Release
on:
push:
branches:
- master
tags:
- 'v*'
jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v5
with:
submodules: recursive
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}-release-ccache
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential ninja-build ccache uuid-dev
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DEQEMU_BUILD_LOGIN=ON \
-DEQEMU_BUILD_LUA=ON \
-DEQEMU_BUILD_PERL=ON \
-DEQEMU_BUILD_CLIENT_FILES=ON
- name: Build
run: cmake --build build --parallel
- name: Package binaries
run: |
cd build/bin
# Add all executable files (excluding tests)
for f in *; do
if [ -f "$f" ] && [ -x "$f" ] && [ "$f" != "tests" ]; then
zip -uj eqemu-server-linux-x64.zip "$f"
fi
done
ls -la eqemu-server-linux-x64.zip
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: eqemu-server-linux-x64
path: build/bin/eqemu-server-linux-x64.zip
retention-days: 90
build-windows:
name: Build Windows
runs-on: windows-latest
steps:
- name: Checkout source
uses: actions/checkout@v5
with:
submodules: recursive
- name: Enable long paths
run: git config --global core.longpaths true
- name: Setup MSVC environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Configure
shell: pwsh
run: |
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DEQEMU_BUILD_LOGIN=ON `
-DEQEMU_BUILD_LUA=ON `
-DEQEMU_BUILD_ZLIB=ON `
-DEQEMU_BUILD_PERL=ON `
-DEQEMU_BUILD_CLIENT_FILES=ON
- name: Build
shell: pwsh
run: cmake --build build --config RelWithDebInfo --target ALL_BUILD -- /m
- name: Package binaries
shell: pwsh
run: |
$binDir = "build/bin/RelWithDebInfo"
$outZip = "eqemu-server-windows-x64.zip"
# Collect all exe and dll files
$files = @()
# Add executables (exclude tests.exe)
Get-ChildItem -Path $binDir -Filter "*.exe" | Where-Object { $_.Name -ne "tests.exe" } | ForEach-Object {
$files += $_.FullName
}
# Add DLLs from bin directory
Get-ChildItem -Path $binDir -Filter "*.dll" -ErrorAction SilentlyContinue | ForEach-Object {
$files += $_.FullName
}
# Add zlib DLLs if they exist
$zlibDir = "build/libs/zlibng/RelWithDebInfo"
if (Test-Path $zlibDir) {
Get-ChildItem -Path $zlibDir -Filter "*.dll" -ErrorAction SilentlyContinue | ForEach-Object {
$files += $_.FullName
}
}
# Create zip
Compress-Archive -Path $files -DestinationPath $outZip -Force
# Show contents
Write-Host "Package contents:"
Get-ChildItem $outZip | Format-List
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: eqemu-server-windows-x64
path: eqemu-server-windows-x64.zip
retention-days: 90
release:
name: Create Release
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
# Only run on tag pushes
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: eqemu-server-linux-x64
path: artifacts/
- name: Download Windows artifact
uses: actions/download-artifact@v4
with:
name: eqemu-server-windows-x64
path: artifacts/
- name: List artifacts
run: ls -la artifacts/
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
files: |
artifacts/eqemu-server-linux-x64.zip
artifacts/eqemu-server-windows-x64.zip