Skip to content

fix(scripts,sql): systematic Legion 7.3.5 recheck across 8 classes + … #61

fix(scripts,sql): systematic Legion 7.3.5 recheck across 8 classes + …

fix(scripts,sql): systematic Legion 7.3.5 recheck across 8 classes + … #61

Workflow file for this run

name: Linux Build (GCC)
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
concurrency:
group: linux-${{ github.ref }}
cancel-in-progress: true
jobs:
# -----------------------------------------------------------------
# Standard Debug build — full toolset, unit tests, smoke test
# -----------------------------------------------------------------
build:
name: Ubuntu 24.04 - GCC 13 - Debug
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# ubuntu-24.04 runners ship ~14 GB free; a full Debug build with
# static archives needs more. This reclaims ~8 GB by removing
# large pre-installed tool chains we do not use.
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet \
/usr/local/lib/android \
/opt/ghc \
/opt/hostedtoolcache/CodeQL
df -h
# Ubuntu 24.04 provides cmake 3.28+, gcc-13, libboost-all-dev 1.83,
# libssl-dev 3.x, libmysqlclient-dev 8.0.x — all sufficient.
- name: Install build dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
cmake \
gcc-13 \
g++-13 \
ninja-build \
libboost-all-dev \
libssl-dev \
libmysqlclient-dev \
libreadline-dev \
zlib1g-dev \
clang-format
- name: Configure
run: |
cmake -S . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DSCRIPTS=static \
-DTOOLS=ON \
-DSERVERS=ON \
-DBUILD_TESTING=ON \
-DWITH_WARNINGS=ON \
-DCMAKE_INSTALL_PREFIX=install
- name: Build
run: cmake --build build --parallel $(nproc)
- name: Run unit tests
run: |
cd build
ctest --output-on-failure --parallel $(nproc)
- name: Check executables
run: |
cmake --install build
./install/bin/worldserver --version
./install/bin/bnetserver --version
# -----------------------------------------------------------------
# AddressSanitizer — catches heap corruption, use-after-free,
# buffer overflows, stack corruption.
# TOOLS=OFF to stay within disk limits (ASAN objects are ~2x larger).
# detect_leaks=0: game server singletons skip cleanup at exit by
# design; enable once shutdown paths are cleaned up.
# -----------------------------------------------------------------
asan:
name: Ubuntu 24.04 - GCC 13 - ASAN
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet \
/usr/local/lib/android \
/opt/ghc \
/opt/hostedtoolcache/CodeQL
df -h
- name: Install build dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
cmake \
gcc-13 \
g++-13 \
ninja-build \
libboost-all-dev \
libssl-dev \
libmysqlclient-dev \
libreadline-dev \
zlib1g-dev
# -O1 instead of -O0: gives ASAN meaningful inlined stack frames
# without sacrificing debuggability for the unit test workload.
- name: Configure (ASAN)
run: |
cmake -S . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DSCRIPTS=static \
-DTOOLS=OFF \
-DSERVERS=ON \
-DBUILD_TESTING=ON \
-DWITH_WARNINGS=ON \
"-DCMAKE_C_FLAGS=-fsanitize=address -fno-omit-frame-pointer -O1" \
"-DCMAKE_CXX_FLAGS=-fsanitize=address -fno-omit-frame-pointer -O1" \
"-DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address" \
"-DCMAKE_SHARED_LINKER_FLAGS=-fsanitize=address"
- name: Build (ASAN)
run: cmake --build build --parallel $(nproc)
- name: Run unit tests (ASAN)
env:
ASAN_OPTIONS: detect_leaks=0:abort_on_error=1:print_stats=1
run: |
cd build
ctest --output-on-failure --parallel $(nproc)
# -----------------------------------------------------------------
# Profiling build — RelWithDebInfo + -fno-omit-frame-pointer so that
# developers can run the resulting binary under perf/valgrind/gprof
# and get accurate call graphs. Verifies the profiling config compiles
# and links cleanly; actual profiling is done offline.
# -----------------------------------------------------------------
profile:
name: Ubuntu 24.04 - GCC 13 - Profile
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet \
/usr/local/lib/android \
/opt/ghc \
/opt/hostedtoolcache/CodeQL
df -h
- name: Install build dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
cmake \
gcc-13 \
g++-13 \
ninja-build \
libboost-all-dev \
libssl-dev \
libmysqlclient-dev \
libreadline-dev \
zlib1g-dev
# RelWithDebInfo keeps optimizations (-O2) while retaining debug
# symbols. -fno-omit-frame-pointer is required for perf to unwind
# call stacks accurately.
- name: Configure (Profile)
run: |
cmake -S . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DSCRIPTS=static \
-DTOOLS=OFF \
-DSERVERS=ON \
-DBUILD_TESTING=OFF \
-DWITH_WARNINGS=ON \
"-DCMAKE_C_FLAGS=-fno-omit-frame-pointer" \
"-DCMAKE_CXX_FLAGS=-fno-omit-frame-pointer"
- name: Build (Profile)
run: cmake --build build --parallel $(nproc)
# -----------------------------------------------------------------
# UndefinedBehaviorSanitizer — catches signed overflow, null pointer
# dereference, misaligned access, out-of-bounds array indexing,
# invalid enum values, and other UB.
# -----------------------------------------------------------------
ubsan:
name: Ubuntu 24.04 - GCC 13 - UBSAN
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet \
/usr/local/lib/android \
/opt/ghc \
/opt/hostedtoolcache/CodeQL
df -h
- name: Install build dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
cmake \
gcc-13 \
g++-13 \
ninja-build \
libboost-all-dev \
libssl-dev \
libmysqlclient-dev \
libreadline-dev \
zlib1g-dev
- name: Configure (UBSAN)
run: |
cmake -S . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DSCRIPTS=static \
-DTOOLS=OFF \
-DSERVERS=ON \
-DBUILD_TESTING=ON \
-DWITH_WARNINGS=ON \
"-DCMAKE_C_FLAGS=-fsanitize=undefined -fno-omit-frame-pointer -O1" \
"-DCMAKE_CXX_FLAGS=-fsanitize=undefined -fno-omit-frame-pointer -O1" \
"-DCMAKE_EXE_LINKER_FLAGS=-fsanitize=undefined" \
"-DCMAKE_SHARED_LINKER_FLAGS=-fsanitize=undefined"
- name: Build (UBSAN)
run: cmake --build build --parallel $(nproc)
- name: Run unit tests (UBSAN)
env:
UBSAN_OPTIONS: print_stacktrace=1:abort_on_error=1
run: |
cd build
ctest --output-on-failure --parallel $(nproc)