Initial commit
This commit is contained in:
106
.github/workflows/add-to-project.yml
vendored
Normal file
106
.github/workflows/add-to-project.yml
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
name: Auto Assign to Project(s)
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, labeled]
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
jobs:
|
||||
assign_one_project:
|
||||
runs-on: ubuntu-latest
|
||||
name: Assign to One Project
|
||||
steps:
|
||||
|
||||
- name: Assign issues with `ChromieCraft Generic` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, 'ChromieCraft Generic')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/20'
|
||||
|
||||
- name: Assign issues with `1-19` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '1-19')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/14'
|
||||
|
||||
- name: Assign issues with `20-29` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '20-29')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/17'
|
||||
|
||||
- name: Assign issues with `30-39` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '30-39')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/23'
|
||||
|
||||
- name: Assign issues with `40-49` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '40-49')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/24'
|
||||
|
||||
- name: Assign issues with `50-59` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '50-59')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/25'
|
||||
|
||||
- name: Assign issues with `60` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '60')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/22'
|
||||
|
||||
- name: Assign issues with `61-64` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '61-64')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/32'
|
||||
|
||||
- name: Assign issues with `65-69` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '65-69')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/36'
|
||||
|
||||
- name: Assign issues with `70` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '70')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/26'
|
||||
|
||||
- name: Assign issues with `71-74` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '71-74')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/33'
|
||||
|
||||
- name: Assign issues with `75-79` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '75-79')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/37'
|
||||
|
||||
- name: Assign issues with `80` label to their project
|
||||
uses: srggrs/assign-one-project-github-action@1.2.1
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, '80')
|
||||
with:
|
||||
project: 'https://github.com/azerothcore/azerothcore-wotlk/projects/38'
|
||||
|
||||
35
.github/workflows/codestyle.yml
vendored
Normal file
35
.github/workflows/codestyle.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: C++ Codestyle
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
paths:
|
||||
- src/**
|
||||
- "!README.md"
|
||||
- "!docs/**"
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
name: C++
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: AzerothCore codestyle
|
||||
run: python ./apps/codestyle/codestyle-cpp.py
|
||||
- name: C++ Advanced
|
||||
run: |
|
||||
sudo apt update -y
|
||||
sudo apt install -y cppcheck
|
||||
cppcheck --force --inline-suppr --suppressions-list=./.suppress.cppcheck src/ --output-file=report.txt
|
||||
|
||||
if [ -s report.txt ]; then # if file is not empty
|
||||
cat report.txt
|
||||
exit 1 # let github action fails
|
||||
fi
|
||||
54
.github/workflows/core-build-nopch.yml
vendored
Normal file
54
.github/workflows/core-build-nopch.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: nopch-build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
|
||||
concurrency:
|
||||
# One concurrency group per workflow + ref.
|
||||
#
|
||||
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
||||
# in-progress runs for the same PR.
|
||||
# - When a PR is merged, a push to the target branch starts a new group,
|
||||
# canceling any still-running PR CI.
|
||||
# - Branch pushes are isolated by ref.
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
compiler:
|
||||
CC: clang-15
|
||||
CXX: clang++-15
|
||||
- os: ubuntu-24.04
|
||||
compiler:
|
||||
CC: clang-18
|
||||
CXX: clang++-18
|
||||
- os: ubuntu-24.04
|
||||
compiler:
|
||||
CC: gcc-14
|
||||
CXX: g++-14
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-nopch
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/linux-build
|
||||
with:
|
||||
CC: ${{ matrix.compiler.CC }}
|
||||
CXX: ${{ matrix.compiler.CXX }}
|
||||
pch: false
|
||||
50
.github/workflows/core-build-pch.yml
vendored
Normal file
50
.github/workflows/core-build-pch.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: pch-build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
|
||||
concurrency:
|
||||
# One concurrency group per workflow + ref.
|
||||
#
|
||||
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
||||
# in-progress runs for the same PR.
|
||||
# - When a PR is merged, a push to the target branch starts a new group,
|
||||
# canceling any still-running PR CI.
|
||||
# - Branch pushes are isolated by ref.
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
compiler:
|
||||
CC: clang-15
|
||||
CXX: clang++-15
|
||||
- os: ubuntu-24.04
|
||||
compiler:
|
||||
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
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/linux-build
|
||||
with:
|
||||
CC: ${{ matrix.compiler.CC }}
|
||||
CXX: ${{ matrix.compiler.CXX }}
|
||||
pch: true
|
||||
64
.github/workflows/core_modules_build.yml
vendored
Normal file
64
.github/workflows/core_modules_build.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
name: nopch-module-build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
paths:
|
||||
- 'src/*'
|
||||
- 'src/common/**/*'
|
||||
- 'src/genrev/**/*'
|
||||
- 'src/server/*'
|
||||
- 'src/server/apps/**/*'
|
||||
- 'src/server/database/**/*'
|
||||
- 'src/server/game/**/*'
|
||||
- 'src/server/shared/**/*'
|
||||
- 'src/tools/**/*'
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
# One concurrency group per workflow + ref.
|
||||
#
|
||||
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
||||
# in-progress runs for the same PR.
|
||||
# - When a PR is merged, a push to the target branch starts a new group,
|
||||
# canceling any still-running PR CI.
|
||||
# - Branch pushes are isolated by ref.
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-modules:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-24.04
|
||||
compiler:
|
||||
CC: clang-18
|
||||
CXX: clang++-18
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-nopch-modules
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# This script installs a general list of modules to compile with
|
||||
# azerothcore. This is useful for ensuring that module compilation
|
||||
# functionality works.
|
||||
- name: Checkout modules
|
||||
run: bash -x ./apps/ci/ci-install-modules.sh
|
||||
- uses: ./.github/actions/linux-build
|
||||
with:
|
||||
CC: ${{ matrix.compiler.CC }}
|
||||
CXX: ${{ matrix.compiler.CXX }}
|
||||
modules: true
|
||||
pch: false
|
||||
maxerrors: 0
|
||||
keepgoing: true
|
||||
286
.github/workflows/dashboard-ci.yml
vendored
Normal file
286
.github/workflows/dashboard-ci.yml
vendored
Normal file
@@ -0,0 +1,286 @@
|
||||
name: Dashboard CI
|
||||
description: |
|
||||
This workflow runs tests and builds for the AzerothCore dashboard.
|
||||
It includes testing of bash scripts and integration testing of the AzerothCore server.
|
||||
Do not remove this if something is broken here and you don't know how to fix it, ping Yehonal instead.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
# One concurrency group per workflow + ref.
|
||||
#
|
||||
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
||||
# in-progress runs for the same PR.
|
||||
# - When a PR is merged, a push to the target branch starts a new group,
|
||||
# canceling any still-running PR CI.
|
||||
# - Branch pushes are isolated by ref.
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CONTINUOUS_INTEGRATION: true
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
|
||||
jobs:
|
||||
test-bash-scripts:
|
||||
name: Test Bash Scripts
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
- os: ubuntu-24.04
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install requirements
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# Install bats-core >= 1.5.0 to support bats_require_minimum_version
|
||||
sudo apt-get install -y git curl
|
||||
git clone --depth 1 https://github.com/bats-core/bats-core.git /tmp/bats-core
|
||||
sudo /tmp/bats-core/install.sh /usr/local
|
||||
bats --version
|
||||
./acore.sh install-deps
|
||||
|
||||
- name: Run bash script tests for ${{ matrix.test-module }}
|
||||
env:
|
||||
TERM: xterm-256color
|
||||
run: |
|
||||
./acore.sh test bash --tap --all
|
||||
|
||||
build-and-test:
|
||||
name: Build and Integration Test
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
- os: ubuntu-24.04
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install ccache
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ccache
|
||||
ccache --version
|
||||
|
||||
# Detect the compilers that acore.sh / CMake will end up using.
|
||||
# We record both the binary name and a short version tag for the cache key.
|
||||
- name: Detect compiler
|
||||
id: detect
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
CC_BIN="${CC:-}"
|
||||
CXX_BIN="${CXX:-}"
|
||||
[[ -z "$CC_BIN" ]] && CC_BIN="$(command -v clang || command -v gcc)"
|
||||
[[ -z "$CXX_BIN" ]] && CXX_BIN="$(command -v clang++ || command -v g++)"
|
||||
|
||||
make_ver_id() {
|
||||
local bin="$1"; local base="$(basename "$bin")"
|
||||
case "$base" in
|
||||
clang)
|
||||
maj="$("$bin" -dumpversion 2>/dev/null | cut -d. -f1)"; [[ -z "$maj" ]] && maj="$( "$bin" --version | sed -n 's/.*version \([0-9][0-9]*\).*/\1/p' | head -1 )"
|
||||
echo "clang-${maj:-unknown}"
|
||||
;;
|
||||
clang++)
|
||||
maj="$("$bin" -dumpversion 2>/dev/null | cut -d. -f1)"; [[ -z "$maj" ]] && maj="$( "$bin" --version | sed -n 's/.*version \([0-9][0-9]*\).*/\1/p' | head -1 )"
|
||||
echo "clang++-${maj:-unknown}"
|
||||
;;
|
||||
gcc)
|
||||
maj="$("$bin" -dumpfullversion -dumpversion 2>/dev/null || "$bin" -dumpversion 2>/dev/null)"; maj="${maj%%.*}"
|
||||
echo "gcc-${maj:-unknown}"
|
||||
;;
|
||||
g++)
|
||||
maj="$("$bin" -dumpfullversion -dumpversion 2>/dev/null || "$bin" -dumpversion 2>/dev/null)"; maj="${maj%%.*}"
|
||||
echo "g++-${maj:-unknown}"
|
||||
;;
|
||||
*)
|
||||
echo "$base"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
echo "cc_id=$(make_ver_id "$CC_BIN")" >> "$GITHUB_OUTPUT"
|
||||
echo "cxx_id=$(make_ver_id "$CXX_BIN")" >> "$GITHUB_OUTPUT"
|
||||
echo "Detected: $CC_BIN, $CXX_BIN"
|
||||
|
||||
- name: Prepare ccache dir
|
||||
shell: bash
|
||||
run: mkdir -p "${{ github.workspace }}/var/ccache"
|
||||
|
||||
- name: Echo cache key
|
||||
shell: bash
|
||||
run: echo "Cache key -> ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}"
|
||||
|
||||
- name: Restore ccache
|
||||
id: restore_ccache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/var/ccache
|
||||
key: ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}
|
||||
restore-keys: |
|
||||
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:true:pch=false:
|
||||
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:false:pch=false:
|
||||
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:true:pch=true:
|
||||
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:false:pch=true:
|
||||
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:true:
|
||||
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:false:
|
||||
ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:
|
||||
|
||||
- name: Setup ccache env
|
||||
shell: bash
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/var/ccache
|
||||
run: |
|
||||
mkdir -p "$CCACHE_DIR"
|
||||
cat <<EOF >> "$GITHUB_ENV"
|
||||
CCACHE_BASEDIR=${{ github.workspace }}
|
||||
CCACHE_DIR=${{ github.workspace }}/var/ccache
|
||||
CCACHE_HASHDIR=1
|
||||
CCACHE_MAXSIZE=5G
|
||||
CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime
|
||||
CCACHE_COMPRESS=1
|
||||
CCACHE_COMPRESSLEVEL=9
|
||||
CCACHE_COMPILERCHECK=content
|
||||
CCACHE_LOGFILE=${{ github.workspace }}/var/ccache/cache.debug
|
||||
CMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
CMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
EOF
|
||||
|
||||
- name: ccache snapshot (before)
|
||||
shell: bash
|
||||
run: |
|
||||
echo "==== Effective ccache configuration ===="
|
||||
ccache -p | egrep 'base_dir|hash_dir|compiler_check|sloppiness|max_size' || true
|
||||
echo
|
||||
echo "==== Previous cache stats ===="
|
||||
ccache -s || true
|
||||
echo
|
||||
echo "==== Top cache results (from prior runs) ===="
|
||||
grep -o 'result: .*' "${{ github.workspace }}/var/ccache/cache.debug" 2>/dev/null | sort | uniq -c | sort -nr | head || true
|
||||
|
||||
- name: Reset ccache stats
|
||||
shell: bash
|
||||
run: ccache -z || true
|
||||
|
||||
- name: Configure AzerothCore settings
|
||||
run: |
|
||||
touch conf/config.sh
|
||||
echo 'MTHREADS=4' >> conf/config.sh
|
||||
echo 'CBUILD_TESTING=ON' >> conf/config.sh
|
||||
echo 'AC_ENABLE_ROOT_CMAKE_INSTALL=1' >> conf/config.sh
|
||||
echo 'export AC_CONFIG_POLICY=$AC_CONFIG_POLICY_PRESET_ZERO_CONF' >> conf/config.sh
|
||||
echo 'AC_ENABLE_CONF_COPY_ON_INSTALL=0' >> conf/config.sh
|
||||
cat conf/config.sh
|
||||
|
||||
# debug content of AC_CONFIG_POLICY
|
||||
./acore.sh config show AC_CONFIG_POLICY
|
||||
|
||||
- name: Test module commands
|
||||
run: |
|
||||
./acore.sh module install mod-autobalance
|
||||
./acore.sh module install mod-duel-reset
|
||||
|
||||
./acore.sh module list
|
||||
|
||||
./acore.sh module install --all
|
||||
./acore.sh module update mod-autobalance
|
||||
./acore.sh module update --all
|
||||
|
||||
- name: Run complete installation (deps, compile, database, client-data)
|
||||
run: |
|
||||
# This runs: install-deps, compile, database setup, client-data download
|
||||
./acore.sh init
|
||||
sudo npm install -g pm2
|
||||
timeout-minutes: 120
|
||||
|
||||
- name: Test module removal
|
||||
run: |
|
||||
./acore.sh module remove mod-autobalance
|
||||
./acore.sh module list
|
||||
./acore.sh module remove mod-duel-reset
|
||||
./acore.sh module list
|
||||
|
||||
- name: Run core tests
|
||||
run: |
|
||||
./acore.sh test core
|
||||
|
||||
- name: Test authserver dry-run
|
||||
run: |
|
||||
source ./acore.sh config load
|
||||
cd env/dist/bin
|
||||
timeout 5m ./authserver -dry-run
|
||||
continue-on-error: false
|
||||
|
||||
- name: Test worldserver dry-run
|
||||
run: |
|
||||
source ./acore.sh config load
|
||||
cd env/dist/bin
|
||||
timeout 5m ./worldserver -dry-run
|
||||
continue-on-error: false
|
||||
|
||||
|
||||
- name: Test worldserver with startup scripts
|
||||
run: |
|
||||
./acore.sh sm create world worldserver --bin-path ./env/dist/bin --provider pm2
|
||||
./acore.sh sm show-config worldserver
|
||||
./acore.sh sm start worldserver
|
||||
./acore.sh sm wait-uptime worldserver 10 300
|
||||
./acore.sh sm send worldserver "account create tester password 3"
|
||||
./acore.sh sm send worldserver "account set gm tester 3"
|
||||
./acore.sh sm send worldserver "account set addon tester 1"
|
||||
./acore.sh sm wait-uptime worldserver 10 300
|
||||
./acore.sh sm stop worldserver
|
||||
./acore.sh sm delete worldserver
|
||||
timeout-minutes: 30
|
||||
continue-on-error: false
|
||||
|
||||
- name: Test authserver with startup scripts
|
||||
run: |
|
||||
./acore.sh sm create auth authserver --bin-path ./env/dist/bin --provider pm2
|
||||
./acore.sh sm show-config authserver
|
||||
./acore.sh sm start authserver
|
||||
./acore.sh sm wait-uptime authserver 10 300
|
||||
./acore.sh sm stop authserver
|
||||
./acore.sh sm delete authserver
|
||||
timeout-minutes: 30
|
||||
continue-on-error: false
|
||||
|
||||
# save only if we didn't hit the cache
|
||||
- name: Save ccache
|
||||
if: steps.restore_ccache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/var/ccache
|
||||
key: ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}
|
||||
|
||||
- name: ccache stats (after)
|
||||
shell: bash
|
||||
run: ccache -s || true
|
||||
127
.github/workflows/docker_build.yml
vendored
Normal file
127
.github/workflows/docker_build.yml
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
name: docker-build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- labeled
|
||||
- synchronize
|
||||
|
||||
concurrency:
|
||||
# One concurrency group per workflow + ref.
|
||||
#
|
||||
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
||||
# in-progress runs for the same PR.
|
||||
# - When a PR is merged, a push to the target branch starts a new group,
|
||||
# canceling any still-running PR CI.
|
||||
# - Branch pushes are isolated by ref.
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
COMPOSE_DOCKER_CLI_BUILD: 1
|
||||
DOCKER_BUILDKIT: 1
|
||||
RUNNING_ON_PRIMARY_BRANCH: |
|
||||
${{ (github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master') && 'true' || 'false' }}
|
||||
|
||||
jobs:
|
||||
build-containers:
|
||||
runs-on: "ubuntu-latest"
|
||||
if: |
|
||||
github.repository == 'azerothcore/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:
|
||||
- name: Free up disk space
|
||||
run: |
|
||||
sudo rm -rf /usr/local/lib/android
|
||||
sudo rm -rf /usr/share/dotnet
|
||||
sudo rm -rf /opt/ghc
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# The containers created in this workflow are used by
|
||||
# acore-docker, which has a dependency on mod-ale.
|
||||
#
|
||||
# If you're wanting containers without mod-ale, the best solution is to
|
||||
# build them locally (such as with `docker compose build`)
|
||||
- name: Download Eluna
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: azerothcore/mod-ale
|
||||
path: modules/mod-ale
|
||||
|
||||
- name: Login to Docker Hub
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: |
|
||||
version="$(jq -r '.version' acore.json)"
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: build worldserver
|
||||
uses: ./.github/actions/docker-tag-and-build
|
||||
with:
|
||||
component-name: worldserver
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||
|
||||
- name: build authserver
|
||||
uses: ./.github/actions/docker-tag-and-build
|
||||
with:
|
||||
component-name: authserver
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||
|
||||
- name: build db-import
|
||||
uses: ./.github/actions/docker-tag-and-build
|
||||
with:
|
||||
component-name: db-import
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||
|
||||
- name: build client-data
|
||||
uses: ./.github/actions/docker-tag-and-build
|
||||
with:
|
||||
component-name: client-data
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||
|
||||
- name: build tools
|
||||
uses: ./.github/actions/docker-tag-and-build
|
||||
with:
|
||||
component-name: tools
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||
|
||||
- name: build dev-server
|
||||
uses: ./.github/actions/docker-tag-and-build
|
||||
with:
|
||||
component-name: dev
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||
dockerfile: apps/docker/Dockerfile.dev-server
|
||||
|
||||
- name: Trigger acore-docker CI
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.ACORE_DOCKER_REPO_ACCESS_TOKEN }}
|
||||
repository: azerothcore/acore-docker
|
||||
event-type: azerothcore-new-images
|
||||
client-payload: >
|
||||
{
|
||||
"ref": "${{ github.ref_name }}",
|
||||
"sha": "${{ github.sha }}"
|
||||
}
|
||||
49
.github/workflows/import_pending.yml
vendored
Normal file
49
.github/workflows/import_pending.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: import-pending
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
import-pending:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-24.04
|
||||
permissions: write-all
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
# If we're fetching all the history in a later step it makes sense to
|
||||
# pre-load it now
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.ref_name }}
|
||||
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
# Specifies latest 1.x
|
||||
deno-version: "~1.0"
|
||||
|
||||
- name: Import and commit pending sql
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
# Get the latest changes from git
|
||||
git pull --rebase origin "${{ github.ref_name }}"
|
||||
bash bin/acore-db-pendings
|
||||
deno run --allow-all --unstable apps/ci/ci-pending-changelogs.ts
|
||||
git add -A .
|
||||
git commit -am "chore(DB): import pending files" -m "Referenced commit(s): ${GITHUB_SHA}" || true
|
||||
env:
|
||||
# Noting that the branch name can only be master, as per the event
|
||||
# triggering this action
|
||||
BRANCH: ${{ github.ref_name }}
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.AC_GITHUB_TOKEN }}
|
||||
# Noting that the branch name can only be master, as per the event
|
||||
# triggering this action
|
||||
branch: ${{ github.ref_name }}
|
||||
16
.github/workflows/issue-labeler.yml
vendored
Normal file
16
.github/workflows/issue-labeler.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: "Issue Labeler"
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
issue_labeler:
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||
runs-on: ubuntu-latest
|
||||
name: Issue Labeler
|
||||
steps:
|
||||
- name: Issue Labeler
|
||||
id: issue-labeler
|
||||
uses: azerothcore/GitHub-Actions@issue-labeler-1.0.2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
53
.github/workflows/macos_build.yml
vendored
Normal file
53
.github/workflows/macos_build.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: macos-build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- labeled
|
||||
- synchronize
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }})
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
macos-build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- macos-14
|
||||
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
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/Library/Caches/ccache
|
||||
key: ccache:${{ matrix.os }}:${{ github.ref_name }}
|
||||
restore-keys: |
|
||||
ccache:${{ matrix.os }}:${{ github.ref_name }}
|
||||
ccache:${{ matrix.os }}
|
||||
- name: reset ccache stats
|
||||
shell: bash
|
||||
run: ccache -z || true
|
||||
- name: Install latest bash
|
||||
run: brew install bash
|
||||
- name: Configure OS
|
||||
run: source ./acore.sh install-deps
|
||||
- name: Build
|
||||
run: source ./apps/ci/mac/ci-compile.sh
|
||||
- name: ccache stats
|
||||
shell: bash
|
||||
run: ccache -s || true
|
||||
19
.github/workflows/pr_labeler.yml
vendored
Normal file
19
.github/workflows/pr_labeler.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: PR Labeler
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened, ready_for_review] # Ready for Review = Draft to Live PR
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-24.04
|
||||
permissions: write-all
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: true
|
||||
- uses: actions/labeler@v5
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
configuration-path: .github/labeler.yml
|
||||
sync-labels: false # true = Removes ALL current labels before adding the labels | false = Only adds the Labels
|
||||
25
.github/workflows/sql-codestyle.yml
vendored
Normal file
25
.github/workflows/sql-codestyle.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: SQL Codestyle
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
paths:
|
||||
- data/**
|
||||
- "!README.md"
|
||||
- "!docs/**"
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
name: SQL
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: AzerothCore codestyle
|
||||
run: python ./apps/codestyle/codestyle-sql.py
|
||||
45
.github/workflows/tools_build.yml
vendored
Normal file
45
.github/workflows/tools_build.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: tools
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- labeled
|
||||
- synchronize
|
||||
|
||||
concurrency:
|
||||
# One concurrency group per workflow + ref.
|
||||
#
|
||||
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
||||
# in-progress runs for the same PR.
|
||||
# - When a PR is merged, a push to the target branch starts a new group,
|
||||
# canceling any still-running PR CI.
|
||||
# - Branch pushes are isolated by ref.
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-24.04
|
||||
compiler:
|
||||
CC: clang-18
|
||||
CXX: clang++-18
|
||||
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')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/linux-build
|
||||
with:
|
||||
CC: ${{ matrix.compiler.CC }}
|
||||
CXX: ${{ matrix.compiler.CXX }}
|
||||
tools: all
|
||||
pch: false
|
||||
50
.github/workflows/windows_build.yml
vendored
Normal file
50
.github/workflows/windows_build.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: windows-build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
types:
|
||||
- labeled
|
||||
- synchronize
|
||||
|
||||
concurrency:
|
||||
# One concurrency group per workflow + ref.
|
||||
#
|
||||
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
||||
# in-progress runs for the same PR.
|
||||
# - When a PR is merged, a push to the target branch starts a new group,
|
||||
# canceling any still-running PR CI.
|
||||
# - Branch pushes are isolated by ref.
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
windows-build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
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
|
||||
uses: hendrikmuhs/ccache-action@v1.2.13
|
||||
- name: Configure OS
|
||||
shell: bash
|
||||
env:
|
||||
CONTINUOUS_INTEGRATION: true
|
||||
run: |
|
||||
./acore.sh install-deps
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
export CTOOLS_BUILD=all
|
||||
./acore.sh compiler build
|
||||
Reference in New Issue
Block a user