Skip to content

Commit

Permalink
Merge pull request #7 from liyunfan1223/Playerbot
Browse files Browse the repository at this point in the history
merge on playerbots
  • Loading branch information
tarawow authored Sep 14, 2024
2 parents 4254827 + af77652 commit 7f14770
Show file tree
Hide file tree
Showing 149 changed files with 7,976 additions and 6,294 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
triage:
runs-on: ubuntu-latest
name: C++
if: github.repository == 'azerothcore/azerothcore-wotlk'
if: github.repository == 'liyunfan1223/azerothcore-wotlk'
steps:
- uses: actions/checkout@v4
- name: Setup python
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/core-build-nopch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ jobs:
CC: gcc-14
CXX: g++-14
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-nopch
if: github.repository == 'azerothcore/azerothcore-wotlk'
name: ${{ matrix.os }}-${{ matrix.compiler }}-nopch
env:
COMPILER: ${{ matrix.compiler }}
if: github.repository == 'liyunfan1223/azerothcore-wotlk'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/linux-build
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/core-build-pch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ jobs:
CC: clang-18
CXX: clang++-18
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-pch
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
name: ${{ matrix.os }}-${{ matrix.compiler }}-pch
env:
COMPILER: ${{ matrix.compiler }}
if: github.repository == 'liyunfan1223/azerothcore-wotlk' && !github.event.pull_request.draft
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/linux-build
Expand Down
99 changes: 99 additions & 0 deletions .github/workflows/core-build-playerbots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: ubuntu-build

on:
push:
branches: [ "Playerbot" ]
pull_request:
branches: [ "Playerbot" ]

jobs:
build:
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
# the result of the matrix will be the combination of all attributes, so we get os*compiler builds
include:
- os: ubuntu-22.04
c_compiler: clang
cpp_compiler: clang++
build_type: Release
- os: ubuntu-22.04
c_compiler: gcc
cpp_compiler: g++
build_type: Release
- os: ubuntu-24.04
c_compiler: gcc
cpp_compiler: g++
build_type: Release

runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.cpp_compiler }}

steps:
- name: Checkout AzerothCore
uses: actions/checkout@v3

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
# - name: Clone Playerbot Module
# run: git clone --depth=1 --branch=master https://github.com/liyunfan1223/mod-playerbots.git modules/mod-playerbots

- name: Checkout Playerbot Module
uses: actions/checkout@v3
with:
repository: 'liyunfan1223/mod-playerbots'
path: 'modules/mod-playerbots'

- name: Install Requirements
run: sudo apt-get update && sudo apt-get install git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev mysql-server libboost-all-dev

# - name: Cache
# uses: actions/cache@v3
# with:
# path: var/ccache
# key: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}:${{ github.sha }}
# restore-keys: |
# ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}
# ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules

# - name: Configure OS
# run: source ./acore.sh install-deps
# env:
# CONTINUOUS_INTEGRATION: true

# - name: Create conf/config.sh
# run: source ./apps/ci/ci-conf-core.sh

# - name: Process pending sql
# run: bash bin/acore-db-pendings

# - name: Build
# run: source ./apps/ci/ci-compile.sh

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

# - name: Test
# working-directory: ${{ steps.strings.outputs.build-output-dir }}
# # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest --build-config ${{ matrix.build_type }}
99 changes: 99 additions & 0 deletions .github/workflows/core-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: ubuntu-build

on:
push:
branches: [ "Playerbot" ]
pull_request:
branches: [ "Playerbot" ]

jobs:
build:
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
# the result of the matrix will be the combination of all attributes, so we get os*compiler builds
include:
- os: ubuntu-22.04
c_compiler: clang
cpp_compiler: clang++
build_type: Release
- os: ubuntu-22.04
c_compiler: gcc
cpp_compiler: g++
build_type: Release
- os: ubuntu-24.04
c_compiler: gcc
cpp_compiler: g++
build_type: Release

runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.cpp_compiler }}

steps:
- name: Checkout AzerothCore
uses: actions/checkout@v3

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
# - name: Clone Playerbot Module
# run: git clone --depth=1 --branch=master https://github.com/liyunfan1223/mod-playerbots.git modules/mod-playerbots

# - name: Checkout Playerbot Module
# uses: actions/checkout@v3
# with:
# repository: 'liyunfan1223/mod-playerbots'
# path: 'modules/mod-playerbots'

- name: Install Requirements
run: sudo apt-get update && sudo apt-get install git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev mysql-server libboost-all-dev

# - name: Cache
# uses: actions/cache@v3
# with:
# path: var/ccache
# key: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}:${{ github.sha }}
# restore-keys: |
# ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}
# ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules

# - name: Configure OS
# run: source ./acore.sh install-deps
# env:
# CONTINUOUS_INTEGRATION: true

# - name: Create conf/config.sh
# run: source ./apps/ci/ci-conf-core.sh

# - name: Process pending sql
# run: bash bin/acore-db-pendings

# - name: Build
# run: source ./apps/ci/ci-compile.sh

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

# - name: Test
# working-directory: ${{ steps.strings.outputs.build-output-dir }}
# # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest --build-config ${{ matrix.build_type }}
2 changes: 1 addition & 1 deletion .github/workflows/core_modules_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
name: modules build on latest ubuntu
if: |
github.repository == 'azerothcore/azerothcore-wotlk'
github.repository == 'liyunfan1223/azerothcore-wotlk'
&& !github.event.pull_request.draft
&& (
github.ref_name == 'master'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
RUNNING_ON_PRIMARY_BRANCH: |
${{ (github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master') && 'true' || 'false' }}
${{ (github.repository == 'liyunfan1223/azerothcore-wotlk' && github.ref_name == 'master') && 'true' || 'false' }}
jobs:
build-containers:
runs-on: "ubuntu-latest"
if: |
github.repository == 'azerothcore/azerothcore-wotlk'
github.repository == 'liyunfan1223/azerothcore-wotlk'
&& !github.event.pull_request.draft
&& (github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build')
steps:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: macos-build
on:
push:
branches:
- 'master'
branches: [ "Playerbot" ]
pull_request:
types: ['labeled', 'opened', 'synchronize', 'reopened']
branches: [ "Playerbot" ]

concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
Expand All @@ -19,10 +18,6 @@ jobs:
- macos-12
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
if: |
github.repository == 'azerothcore/azerothcore-wotlk'
&& !github.event.pull_request.draft
&& (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build')
steps:
- uses: actions/checkout@v4
- name: Cache
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/tools_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}
if: |
github.repository == 'azerothcore/azerothcore-wotlk'
&& !github.event.pull_request.draft
&& (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build')
github.repository == 'liyunfan1223/azerothcore-wotlk' && !github.event.pull_request.draft
&& (
contains(github.event.pull_request.labels.*.name, 'run-build')
|| github.event.label.name == 'run-build'
)
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/linux-build
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/windows_build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: windows-build
on:
push:
branches:
- 'master'
branches: [ "Playerbot" ]
pull_request:
types: ['labeled', 'opened', 'synchronize', 'reopened']
branches: [ "Playerbot" ]

concurrency:
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
Expand All @@ -20,10 +19,6 @@ jobs:
name: ${{ matrix.os }}
env:
BOOST_ROOT: C:\local\boost_1_82_0
if: |
github.repository == 'azerothcore/azerothcore-wotlk'
&& !github.event.pull_request.draft
&& (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build')
steps:
- uses: actions/checkout@v4
- name: ccache
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ CMakeLists.txt.user
#
/.settings/
/.externalToolBuilders/*
/.vs
/out
# exclude in all levels
nbproject/
.sync.ffs_db
Expand Down Expand Up @@ -92,3 +94,5 @@ local.properties
# !modules/yourmodule
#
# ==================
.cache
compile_commands.json
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,7 @@
},
"deno.enable": true,
"deno.path": "deps/deno/bin/deno",
"deno.lint": true
"deno.lint": true,
"search.useIgnoreFiles": false,
"clangd.onConfigChanged": "restart"
}
6 changes: 1 addition & 5 deletions apps/ci/mac/ci-compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ if [ ! -d "$mysql_include_path" ]; then
fi

time cmake ../../../ \
-DTOOLS=1 \
-DBUILD_TESTING=1 \
-DTOOLS_BUILD=all \
-DSCRIPTS=static \
-DCMAKE_BUILD_TYPE=Release \
-DMYSQL_ADD_INCLUDE_PATH=$mysql_include_path \
Expand All @@ -33,9 +32,6 @@ time cmake ../../../ \
-DOPENSSL_INCLUDE_DIR="$OPENSSL_ROOT_DIR/include" \
-DOPENSSL_SSL_LIBRARIES="$OPENSSL_ROOT_DIR/lib/libssl.dylib" \
-DOPENSSL_CRYPTO_LIBRARIES="$OPENSSL_ROOT_DIR/lib/libcrypto.dylib" \
-DWITH_WARNINGS=1 \
-DCMAKE_C_FLAGS="-Werror" \
-DCMAKE_CXX_FLAGS="-Werror" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DUSE_SCRIPTPCH=0 \
Expand Down
2 changes: 1 addition & 1 deletion apps/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,4 @@ COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \
/azerothcore/env/dist/bin/vmap4_assembler /azerothcore/env/dist/bin/vmap4_assembler

COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build \
/azerothcore/env/dist/bin/vmap4_extractor /azerothcore/env/dist/bin/vmap4_extractor
/azerothcore/env/dist/bin/vmap4_extractor /azerothcore/env/dist/bin/vmap4_extractor
3 changes: 0 additions & 3 deletions data/sql/updates/db_world/2024_09_09_00.sql

This file was deleted.

6 changes: 0 additions & 6 deletions data/sql/updates/db_world/2024_09_11_00.sql

This file was deleted.

Loading

0 comments on commit 7f14770

Please sign in to comment.