Compare commits

...

4 Commits

Author SHA1 Message Date
Chris Miles 588de15382 ? 2025-06-29 23:39:33 -05:00
Chris Miles aeb13e8fd3 ? 2025-06-29 23:38:45 -05:00
Chris Miles 98f824b0f5 Build tweaks 2025-06-29 23:34:46 -05:00
Chris Miles 605e23e8d0 Build analyze work 2025-06-29 22:29:36 -05:00
7 changed files with 89 additions and 30 deletions
+33 -1
View File
@@ -30,6 +30,11 @@ steps:
- name: cache
path: /home/eqemu/.ccache/
trigger:
branch:
exclude:
- build-analyze
---
kind: pipeline
@@ -57,6 +62,11 @@ steps:
commands:
- .\utils\scripts\build\windows-build.ps1
trigger:
branch:
exclude:
- build-analyze
---
kind: pipeline
@@ -87,7 +97,10 @@ steps:
trigger:
branch:
- master
include:
- master
exclude:
- build-analyze
event:
- push
@@ -95,4 +108,23 @@ depends_on:
- Build Windows
- Build Linux
---
kind: pipeline
type: docker
name: Build Analyze
steps:
- name: Build Linux X64
image: akkadius/eqemu-server:v16
environment:
GITHUB_TOKEN:
from_secret: GH_RELEASE_GITHUB_API_TOKEN
commands:
- ./utils/scripts/build/linux-build-analyze.sh
trigger:
branch:
- build-analyze
event:
- push
+2
View File
@@ -363,6 +363,8 @@ MESSAGE(STATUS "**************************************************")
#setup server libs and headers
SET(SERVER_LIBS common ${DATABASE_LIBRARY_LIBS} ${ZLIB_LIBRARY_LIBS} ${Boost_LIBRARIES} uv_a fmt RecastNavigation::Detour)
set(FMT_HEADER_ONLY OFF)
INCLUDE_DIRECTORIES(SYSTEM "${DATABASE_LIBRARY_INCLUDE}")
INCLUDE_DIRECTORIES(SYSTEM "${ZLIB_LIBRARY_INCLUDE}")
INCLUDE_DIRECTORIES(SYSTEM "${Boost_INCLUDE_DIRS}")
+1 -1
View File
@@ -841,7 +841,7 @@ IF (UNIX)
SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/rof2.cpp" "patches/uf.cpp" PROPERTIES COMPILE_FLAGS -O0)
ENDIF (UNIX)
IF (WIN32 AND EQEMU_BUILD_PCH)
IF (EQEMU_BUILD_PCH)
TARGET_PRECOMPILE_HEADERS(common PRIVATE pch/std-pch.h)
ENDIF ()
+7 -27
View File
@@ -1,34 +1,14 @@
// types
#include <limits>
#include <string>
#include <cctype>
#include <sstream>
#pragma once
// containers
#include <iterator>
#include <set>
#include <unordered_set>
// Lightweight, widely used
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <list>
#include <vector>
// utilities
#include <iostream>
#include <cassert>
#include <cmath>
#include <memory>
#include <functional>
#include <algorithm>
#include <utility>
#include <tuple>
#include <fstream>
#include <cstdio>
#include <limits>
#include <cstdint>
#include <cassert>
// fmt
#include <fmt/format.h>
// lua
#include "lua.hpp"
#include <luabind/luabind.hpp>
#include <luabind/object.hpp>
+44
View File
@@ -0,0 +1,44 @@
#!/bin/bash
set -ex
sudo chown eqemu:eqemu /drone/src/ * -R
# Install ClangBuildAnalyzer if missing
if ! command -v clang-build-analyzer &> /dev/null; then
echo "Installing latest Clang Build Analyzer..."
LATEST_VERSION=$(curl -s https://api.github.com/repos/aras-p/ClangBuildAnalyzer/releases/latest \
| grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
sudo curl -sSL "https://github.com/aras-p/ClangBuildAnalyzer/releases/download/v${LATEST_VERSION}/ClangBuildAnalyzer-linux" \
-o /usr/local/bin/clang-build-analyzer
sudo chmod +x /usr/local/bin/clang-build-analyzer
fi
git submodule init && git submodule update
perl utils/scripts/build/tag-version.pl
mkdir -p build
clang-build-analyzer --start build/
cd build && \
cmake -DEQEMU_BUILD_TESTS=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DEQEMU_BUILD_LUA=ON \
-DEQEMU_BUILD_PERL=ON \
-DEQEMU_BUILD_LOGIN=ON \
-DEQEMU_BUILD_STATIC=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_CXX_FLAGS:STRING="-O0 -g -Wno-everything -ftime-trace" \
-G 'Unix Makefiles' \
.. && \
make -j"$(nproc)"
# 🧠 Generate ClangBuildAnalyzer report
clang-build-analyzer --stop ./ /tmp/eqemu.capture
clang-build-analyzer --analyze /tmp/eqemu.capture > report.txt
cat report.txt
ldd ./bin/zone
cd /drone/src/
+1 -1
View File
@@ -76,7 +76,7 @@ ADD_EXECUTABLE(world ${world_sources} ${world_headers})
INSTALL(TARGETS world RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
IF (WIN32 AND EQEMU_BUILD_PCH)
IF (EQEMU_BUILD_PCH)
TARGET_PRECOMPILE_HEADERS(world PRIVATE ../common/pch/std-pch.h)
ENDIF ()
+1
View File
@@ -483,6 +483,7 @@ INSTALL(TARGETS zone RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
# precompiled headers
IF (EQEMU_BUILD_PCH)
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/pch/app-pch.h)
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/pch/std-pch.h)
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ./pch/pch.h)
ENDIF()