Merge remote-tracking branch 'upstream/master' into test-staging
# Conflicts: # .github/workflows/core-build-nopch.yml # .github/workflows/core-build-pch.yml # .github/workflows/macos_build.yml # .github/workflows/windows_build.yml # src/server/game/DataStores/DBCStores.cpp # src/server/game/Guilds/Guild.h # src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp # src/server/game/Server/WorldSession.h
This commit is contained in:
@@ -30,7 +30,7 @@ runs:
|
|||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ${{ github.workspace }}
|
context: ${{ github.workspace }}
|
||||||
file: ${{ inputs.dockerfile }}
|
file: ${{ inputs.dockerfile }}
|
||||||
|
|||||||
@@ -41,14 +41,21 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: echo cache key
|
- name: echo cache key
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "Cache key -> ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}:${{ github.ref_name }}"
|
run: echo "Cache key -> ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}:${{ github.ref_name }}-${{ github.run_id }}"
|
||||||
|
|
||||||
|
# The primary key is unique per run (`-${{ github.run_id }}`) so every run
|
||||||
|
# saves a fresh cache. A static key would hit on itself on the second run
|
||||||
|
# and `actions/cache` would then skip the upload, freezing the cache after
|
||||||
|
# the first commit on a branch (and permanently on master). The restore-keys
|
||||||
|
# walk back from the most-recent cache on this branch to progressively
|
||||||
|
# broader fallbacks (branch -> pch variant -> modules variant -> compiler).
|
||||||
- name: Cache
|
- name: Cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/var/ccache
|
path: ${{ github.workspace }}/var/ccache
|
||||||
key: ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}:${{ github.ref_name }}
|
key: ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}:${{ github.ref_name }}-${{ github.run_id }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
|
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}:${{ github.ref_name }}-
|
||||||
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}
|
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}:pch=${{ inputs.pch }}
|
||||||
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}
|
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}:${{ inputs.modules }}
|
||||||
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}
|
ccache:${{ runner.os }}:${{ inputs.CC }}_${{ inputs.CXX }}
|
||||||
@@ -78,6 +85,8 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: $GITHUB_WORKSPACE/var/ccache
|
CCACHE_DIR: $GITHUB_WORKSPACE/var/ccache
|
||||||
|
# CCACHE_COMPRESSLEVEL=3: level 9 burns CPU for marginal size gains on a
|
||||||
|
# cache that never approaches max_size.
|
||||||
run: |
|
run: |
|
||||||
mkdir -p "$CCACHE_DIR"
|
mkdir -p "$CCACHE_DIR"
|
||||||
cat <<EOF >> "$GITHUB_ENV"
|
cat <<EOF >> "$GITHUB_ENV"
|
||||||
@@ -87,7 +96,7 @@ runs:
|
|||||||
CCACHE_MAXSIZE=5G
|
CCACHE_MAXSIZE=5G
|
||||||
CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime
|
CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime
|
||||||
CCACHE_COMPRESS=1
|
CCACHE_COMPRESS=1
|
||||||
CCACHE_COMPRESSLEVEL=9
|
CCACHE_COMPRESSLEVEL=3
|
||||||
CCACHE_COMPILERCHECK=content
|
CCACHE_COMPILERCHECK=content
|
||||||
CCACHE_LOGFILE=${{ env.CCACHE_DIR }}/cache.debug
|
CCACHE_LOGFILE=${{ env.CCACHE_DIR }}/cache.debug
|
||||||
CC=${{ inputs.CC }}
|
CC=${{ inputs.CC }}
|
||||||
|
|||||||
+39
-4
@@ -1,6 +1,6 @@
|
|||||||
file-cpp:
|
file-cpp:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'src/**/*.cpp'
|
- 'src/**/*.cpp'
|
||||||
- 'src/**/*.h'
|
- 'src/**/*.h'
|
||||||
- 'deps/**/*.cpp'
|
- 'deps/**/*.cpp'
|
||||||
@@ -25,7 +25,7 @@ CORE:
|
|||||||
|
|
||||||
Script:
|
Script:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- 'src/server/scripts/**/*.cpp'
|
- 'src/server/scripts/**/*.cpp'
|
||||||
- 'src/server/scripts/**/*.h'
|
- 'src/server/scripts/**/*.h'
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ Documentation:
|
|||||||
|
|
||||||
Bash:
|
Bash:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- '*.sh'
|
- '*.sh'
|
||||||
- 'apps/**/*.sh'
|
- 'apps/**/*.sh'
|
||||||
- 'conf/**/*.sh'
|
- 'conf/**/*.sh'
|
||||||
@@ -48,7 +48,17 @@ Bash:
|
|||||||
|
|
||||||
CMake:
|
CMake:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file: '**/*.cmake'
|
- any-glob-to-any-file:
|
||||||
|
- '**/*.cmake'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
|
||||||
|
Platform-Docker:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- '**/Dockerfile*'
|
||||||
|
- '**/docker-compose.yml'
|
||||||
|
- '**/docker-compose.*.yml'
|
||||||
|
- '**/docker/**/*'
|
||||||
|
|
||||||
Workflow:
|
Workflow:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
@@ -57,3 +67,28 @@ Workflow:
|
|||||||
Batch:
|
Batch:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file: 'apps/**/*.bat'
|
- any-glob-to-any-file: 'apps/**/*.bat'
|
||||||
|
|
||||||
|
Config:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- '**/*.json'
|
||||||
|
- '**/*.yml'
|
||||||
|
- '**/*.yaml'
|
||||||
|
- '**/*.conf'
|
||||||
|
- '**/*.cfg'
|
||||||
|
- '**/*.nix'
|
||||||
|
|
||||||
|
Utilities:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- '**/*.py'
|
||||||
|
- '**/*.php'
|
||||||
|
- '**/*.ts'
|
||||||
|
|
||||||
|
MMAPs:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: 'src/common/Collision/Maps/MapDefines.h'
|
||||||
|
|
||||||
|
VMAPs:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: 'src/common/Collision/VMapDefinitions.h'
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
name: cancel-pr-runs-on-close
|
||||||
|
on:
|
||||||
|
# pull_request_target, not pull_request: for a PR from a fork the GITHUB_TOKEN
|
||||||
|
# of a pull_request run is read-only, so the cancel would 403. This workflow
|
||||||
|
# never checks out or runs PR code, so the elevated token is not exposed to it.
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cancel:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: cancel CI still running for the closed PR
|
||||||
|
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
||||||
|
steps:
|
||||||
|
- name: Cancel workflow runs for this PR
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
PR_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
|
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# head_sha alone would let anyone cancel another PR's CI: push that
|
||||||
|
# PR's head commit to your own fork, open a PR and close it, and every
|
||||||
|
# run for the commit matches. So the run must also come from this PR's
|
||||||
|
# head repository. `gh run list` exposes neither head_repository nor
|
||||||
|
# the (fork-empty) pull_requests field, hence the raw API call.
|
||||||
|
gh api "repos/${GH_REPO}/actions/runs?event=pull_request&head_sha=${PR_SHA}&per_page=100" \
|
||||||
|
--jq '.workflow_runs[]
|
||||||
|
| select(.head_repository.full_name == env.PR_REPO and .status != "completed")
|
||||||
|
| .id' \
|
||||||
|
| while read -r id; do
|
||||||
|
# gh has no bulk cancel. A run that finishes between the listing
|
||||||
|
# and the cancel returns 409, which is not worth failing over.
|
||||||
|
if ! err=$(gh run cancel "$id" 2>&1); then
|
||||||
|
if echo "$err" | grep -Fq "HTTP 409"; then
|
||||||
|
echo "::warning::run $id was already finished"
|
||||||
|
else
|
||||||
|
echo "::error::Failed to cancel run $id: $err"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
name: cleanup-pr-caches
|
||||||
|
on:
|
||||||
|
# pull_request_target, not pull_request: for a PR from a fork the GITHUB_TOKEN
|
||||||
|
# of a pull_request run is read-only, so the delete would 403. This workflow
|
||||||
|
# never checks out or runs PR code, so the elevated token is not exposed to it.
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cleanup:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: delete caches of the closed PR
|
||||||
|
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
||||||
|
steps:
|
||||||
|
- name: Delete caches created by this PR
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
# Caches written during a PR run are scoped to the merge ref and are
|
||||||
|
# unreachable from any other branch, so once the PR is closed they can
|
||||||
|
# only occupy space. Deleting by this ref cannot touch master's caches.
|
||||||
|
PR_REF: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
# --succeed-on-no-caches: without it gh exits 1 when the PR has no
|
||||||
|
# caches, which is the normal case for a PR that never ran CI.
|
||||||
|
run: gh cache delete --all --ref "$PR_REF" --succeed-on-no-caches
|
||||||
@@ -10,15 +10,21 @@ on:
|
|||||||
- "!README.md"
|
- "!README.md"
|
||||||
- "!docs/**"
|
- "!docs/**"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# New commits on a PR cancel the still-running codestyle check on the old
|
||||||
|
# commit. github.ref is refs/pull/<N>/merge, so the group is stable per PR.
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: C++
|
name: C++
|
||||||
if: github.repository == 'mod-playerbots/azerothcore-wotlk' && !github.event.pull_request.draft
|
if: github.repository == 'mod-playerbots/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- name: Setup python
|
- name: Setup python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
- name: AzerothCore codestyle
|
- name: AzerothCore codestyle
|
||||||
|
|||||||
@@ -10,8 +10,22 @@ on:
|
|||||||
- opened
|
- opened
|
||||||
- reopened
|
- reopened
|
||||||
- synchronize
|
- synchronize
|
||||||
|
# A PR that only touches data/ (SQL) leaves the C++ untouched, so there is
|
||||||
|
# nothing to compile. Dashboard CI runs on every PR unfiltered and already
|
||||||
|
# imports the SQL and starts a real worldserver, so coverage is unaffected.
|
||||||
|
# Pushes to master are not filtered and always build.
|
||||||
|
paths-ignore:
|
||||||
|
- 'data/**'
|
||||||
|
|
||||||
concurrency:
|
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.
|
||||||
|
# - A merge does NOT cancel the PR's own runs: this group is keyed on
|
||||||
|
# refs/pull/<N>/merge and the master push on refs/heads/master, so they
|
||||||
|
# never share a group. See the cancel-pr-runs-on-close workflow.
|
||||||
|
# - Branch pushes are isolated by ref.
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
@@ -41,7 +55,7 @@ jobs:
|
|||||||
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-nopch
|
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-nopch
|
||||||
if: github.repository == 'mod-playerbots/azerothcore-wotlk' && !github.event.pull_request.draft
|
if: github.repository == 'mod-playerbots/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- uses: ./.github/actions/linux-build
|
- uses: ./.github/actions/linux-build
|
||||||
with:
|
with:
|
||||||
CC: ${{ matrix.compiler.CC }}
|
CC: ${{ matrix.compiler.CC }}
|
||||||
|
|||||||
@@ -10,8 +10,22 @@ on:
|
|||||||
- opened
|
- opened
|
||||||
- reopened
|
- reopened
|
||||||
- synchronize
|
- synchronize
|
||||||
|
# A PR that only touches data/ (SQL) leaves the C++ untouched, so there is
|
||||||
|
# nothing to compile. Dashboard CI runs on every PR unfiltered and already
|
||||||
|
# imports the SQL and starts a real worldserver, so coverage is unaffected.
|
||||||
|
# Pushes to master are not filtered and always build.
|
||||||
|
paths-ignore:
|
||||||
|
- 'data/**'
|
||||||
|
|
||||||
concurrency:
|
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.
|
||||||
|
# - A merge does NOT cancel the PR's own runs: this group is keyed on
|
||||||
|
# refs/pull/<N>/merge and the master push on refs/heads/master, so they
|
||||||
|
# never share a group. See the cancel-pr-runs-on-close workflow.
|
||||||
|
# - Branch pushes are isolated by ref.
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
@@ -37,7 +51,7 @@ jobs:
|
|||||||
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-pch
|
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-pch
|
||||||
if: github.repository == 'mod-playerbots/azerothcore-wotlk' && !github.event.pull_request.draft
|
if: github.repository == 'mod-playerbots/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- uses: ./.github/actions/linux-build
|
- uses: ./.github/actions/linux-build
|
||||||
with:
|
with:
|
||||||
CC: ${{ matrix.compiler.CC }}
|
CC: ${{ matrix.compiler.CC }}
|
||||||
|
|||||||
@@ -29,8 +29,9 @@ concurrency:
|
|||||||
#
|
#
|
||||||
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
||||||
# in-progress runs for the same PR.
|
# in-progress runs for the same PR.
|
||||||
# - When a PR is merged, a push to the target branch starts a new group,
|
# - A merge does NOT cancel the PR's own runs: this group is keyed on
|
||||||
# canceling any still-running PR CI.
|
# refs/pull/<N>/merge and the master push on refs/heads/master, so they
|
||||||
|
# never share a group. See the cancel-pr-runs-on-close workflow.
|
||||||
# - Branch pushes are isolated by ref.
|
# - Branch pushes are isolated by ref.
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -49,7 +50,7 @@ jobs:
|
|||||||
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-nopch-modules
|
name: ${{ matrix.os }}-${{ matrix.compiler.CC }}-nopch-modules
|
||||||
if: github.repository == 'mod-playerbots/azerothcore-wotlk' && !github.event.pull_request.draft
|
if: github.repository == 'mod-playerbots/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
# This script installs a general list of modules to compile with
|
# This script installs a general list of modules to compile with
|
||||||
# azerothcore. This is useful for ensuring that module compilation
|
# azerothcore. This is useful for ensuring that module compilation
|
||||||
# functionality works.
|
# functionality works.
|
||||||
|
|||||||
@@ -21,8 +21,9 @@ concurrency:
|
|||||||
#
|
#
|
||||||
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
||||||
# in-progress runs for the same PR.
|
# in-progress runs for the same PR.
|
||||||
# - When a PR is merged, a push to the target branch starts a new group,
|
# - A merge does NOT cancel the PR's own runs: this group is keyed on
|
||||||
# canceling any still-running PR CI.
|
# refs/pull/<N>/merge and the master push on refs/heads/master, so they
|
||||||
|
# never share a group.
|
||||||
# - Branch pushes are isolated by ref.
|
# - Branch pushes are isolated by ref.
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -138,15 +139,29 @@ jobs:
|
|||||||
|
|
||||||
- name: Echo cache key
|
- name: Echo cache key
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "Cache key -> ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}"
|
run: echo "Cache key -> ccache:${{ matrix.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}-${{ github.run_id }}"
|
||||||
|
|
||||||
|
# The primary key must be unique per run. A static key hits on itself from
|
||||||
|
# the second run onward and the save is then skipped, freezing the cache
|
||||||
|
# at its first-run contents. It is keyed on matrix.os rather than
|
||||||
|
# runner.os because both legs report Linux and share a run_id, so only the
|
||||||
|
# detected compiler would separate them. The first restore-key picks up
|
||||||
|
# the most recent cache for this leg on this ref; the second the most
|
||||||
|
# recent on any ref the run can reach, which is its own and the base
|
||||||
|
# branch, and is how a first run inherits master's. Both must use
|
||||||
|
# matrix.os to stay in the key's namespace.
|
||||||
|
# The runner.os entries below reach the linux-build action's caches, but
|
||||||
|
# only on the 24.04 leg: on 26.04 this workflow detects clang-21 while
|
||||||
|
# linux-build is passed clang-20, so nothing there lines up.
|
||||||
- name: Restore ccache
|
- name: Restore ccache
|
||||||
id: restore_ccache
|
id: restore_ccache
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/var/ccache
|
path: ${{ github.workspace }}/var/ccache
|
||||||
key: ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}
|
key: ccache:${{ matrix.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}-${{ github.run_id }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
|
ccache:${{ matrix.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}-
|
||||||
|
ccache:${{ matrix.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:
|
||||||
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 }}: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 }}: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 }}:true:pch=true:
|
||||||
@@ -168,7 +183,7 @@ jobs:
|
|||||||
CCACHE_MAXSIZE=5G
|
CCACHE_MAXSIZE=5G
|
||||||
CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime
|
CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime
|
||||||
CCACHE_COMPRESS=1
|
CCACHE_COMPRESS=1
|
||||||
CCACHE_COMPRESSLEVEL=9
|
CCACHE_COMPRESSLEVEL=3
|
||||||
CCACHE_COMPILERCHECK=content
|
CCACHE_COMPILERCHECK=content
|
||||||
CCACHE_LOGFILE=${{ github.workspace }}/var/ccache/cache.debug
|
CCACHE_LOGFILE=${{ github.workspace }}/var/ccache/cache.debug
|
||||||
CMAKE_C_COMPILER_LAUNCHER=ccache
|
CMAKE_C_COMPILER_LAUNCHER=ccache
|
||||||
@@ -274,13 +289,19 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
|
|
||||||
# save only if we didn't hit the cache
|
# The old "only save on a cache miss" guard is dropped: the per-run key
|
||||||
|
# only ever collides on a re-run, since github.run_id is stable across
|
||||||
|
# attempts, and there the save is a no-op anyway.
|
||||||
|
# A failed build still compiled most of the tree and that work is worth
|
||||||
|
# keeping. A cancelled one is skipped so a superseded run cannot publish
|
||||||
|
# a half-populated cache as the newest for the ref, and a run that died
|
||||||
|
# before the restore has no compiler id and no ccache dir to save.
|
||||||
- name: Save ccache
|
- name: Save ccache
|
||||||
if: steps.restore_ccache.outputs.cache-hit != 'true'
|
if: ${{ !cancelled() && steps.restore_ccache.outcome == 'success' }}
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/var/ccache
|
path: ${{ github.workspace }}/var/ccache
|
||||||
key: ccache:${{ runner.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}
|
key: ccache:${{ matrix.os }}:${{ steps.detect.outputs.cc_id }}_${{ steps.detect.outputs.cxx_id }}:${{ github.ref_name }}-${{ github.run_id }}
|
||||||
|
|
||||||
- name: ccache stats (after)
|
- name: ccache stats (after)
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ concurrency:
|
|||||||
#
|
#
|
||||||
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
||||||
# in-progress runs for the same PR.
|
# in-progress runs for the same PR.
|
||||||
# - When a PR is merged, a push to the target branch starts a new group,
|
# - A merge does NOT cancel the PR's own runs: this group is keyed on
|
||||||
# canceling any still-running PR CI.
|
# refs/pull/<N>/merge and the master push on refs/heads/master, so they
|
||||||
|
# never share a group. See the cancel-pr-runs-on-close workflow.
|
||||||
# - Branch pushes are isolated by ref.
|
# - Branch pushes are isolated by ref.
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -40,7 +41,7 @@ jobs:
|
|||||||
sudo rm -rf /opt/ghc
|
sudo rm -rf /opt/ghc
|
||||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
# The containers created in this workflow are used by
|
# The containers created in this workflow are used by
|
||||||
# acore-docker, which has a dependency on mod-ale.
|
# acore-docker, which has a dependency on mod-ale.
|
||||||
@@ -49,14 +50,14 @@ jobs:
|
|||||||
# build them locally (such as with `docker compose build`)
|
# build them locally (such as with `docker compose build`)
|
||||||
- name: Download Eluna
|
- name: Download Eluna
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
repository: azerothcore/mod-ale
|
repository: azerothcore/mod-ale
|
||||||
path: modules/mod-ale
|
path: modules/mod-ale
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
@@ -115,7 +116,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Trigger acore-docker CI
|
- name: Trigger acore-docker CI
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
||||||
uses: peter-evans/repository-dispatch@v2
|
uses: peter-evans/repository-dispatch@v3
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.ACORE_DOCKER_REPO_ACCESS_TOKEN }}
|
token: ${{ secrets.ACORE_DOCKER_REPO_ACCESS_TOKEN }}
|
||||||
repository: azerothcore/acore-docker
|
repository: azerothcore/acore-docker
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
contents: write # 'write-all' is not a valid permission, should specify what is needed
|
contents: write # 'write-all' is not a valid permission, should specify what is needed
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ on:
|
|||||||
- "test-staging"
|
- "test-staging"
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
|
# One concurrency group per workflow + ref (matches the other build workflows).
|
||||||
|
# PRs cancel superseded runs; branch pushes are isolated by ref.
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
@@ -29,22 +31,24 @@ jobs:
|
|||||||
name: ${{ matrix.os }}
|
name: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout AzerothCore
|
- name: Checkout AzerothCore
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Checkout Playerbot Module
|
- name: Checkout Playerbot Module
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
repository: mod-playerbots/mod-playerbots
|
repository: mod-playerbots/mod-playerbots
|
||||||
ref: ${{ github.ref_name == 'Playerbot' && 'master' || 'test-staging' }}
|
ref: ${{ github.ref_name == 'Playerbot' && 'master' || 'test-staging' }}
|
||||||
path: modules/mod-playerbots
|
path: modules/mod-playerbots
|
||||||
|
|
||||||
- name: Cache
|
- name: Cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: ~/Library/Caches/ccache
|
path: ~/Library/Caches/ccache
|
||||||
key: ccache:${{ matrix.os }}:${{ github.ref_name }}
|
# Unique per run so the cache is re-saved every run instead of
|
||||||
|
# freezing on the first (a static key hits itself and skips upload).
|
||||||
|
key: ccache:${{ matrix.os }}:${{ github.ref_name }}-${{ github.run_id }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
ccache:${{ matrix.os }}:${{ github.ref_name }}
|
ccache:${{ matrix.os }}:${{ github.ref_name }}-
|
||||||
ccache:${{ matrix.os }}
|
ccache:${{ matrix.os }}
|
||||||
|
|
||||||
- name: reset ccache stats
|
- name: reset ccache stats
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ jobs:
|
|||||||
permissions: write-all
|
permissions: write-all
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: true
|
persist-credentials: true
|
||||||
- uses: actions/labeler@v5
|
- uses: actions/labeler@v7
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
configuration-path: .github/labeler.yml
|
configuration-path: .github/labeler.yml
|
||||||
|
|||||||
@@ -10,15 +10,21 @@ on:
|
|||||||
- "!README.md"
|
- "!README.md"
|
||||||
- "!docs/**"
|
- "!docs/**"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# New commits on a PR cancel the still-running codestyle check on the old
|
||||||
|
# commit. github.ref is refs/pull/<N>/merge, so the group is stable per PR.
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: SQL
|
name: SQL
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- name: Setup python
|
- name: Setup python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
- name: AzerothCore codestyle
|
- name: AzerothCore codestyle
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ concurrency:
|
|||||||
#
|
#
|
||||||
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
# - PRs use `refs/pull/<PR_NUMBER>/merge`, so new commits cancel older
|
||||||
# in-progress runs for the same PR.
|
# in-progress runs for the same PR.
|
||||||
# - When a PR is merged, a push to the target branch starts a new group,
|
# - A merge does NOT cancel the PR's own runs: this group is keyed on
|
||||||
# canceling any still-running PR CI.
|
# refs/pull/<N>/merge and the master push on refs/heads/master, so they
|
||||||
|
# never share a group. See the cancel-pr-runs-on-close workflow.
|
||||||
# - Branch pushes are isolated by ref.
|
# - Branch pushes are isolated by ref.
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -38,7 +39,7 @@ jobs:
|
|||||||
|| github.event.label.name == 'run-build'
|
|| github.event.label.name == 'run-build'
|
||||||
)
|
)
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- uses: ./.github/actions/linux-build
|
- uses: ./.github/actions/linux-build
|
||||||
with:
|
with:
|
||||||
CC: ${{ matrix.compiler.CC }}
|
CC: ${{ matrix.compiler.CC }}
|
||||||
|
|||||||
@@ -7,6 +7,14 @@ on:
|
|||||||
branches: [ "Playerbot", "test-staging" ]
|
branches: [ "Playerbot", "test-staging" ]
|
||||||
|
|
||||||
concurrency:
|
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.
|
||||||
|
# - A merge does NOT cancel the PR's own runs: this group is keyed on
|
||||||
|
# refs/pull/<N>/merge and the master push on refs/heads/master, so they
|
||||||
|
# never share a group. See the cancel-pr-runs-on-close workflow.
|
||||||
|
# - Branch pushes are isolated by ref.
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
@@ -22,28 +30,22 @@ jobs:
|
|||||||
BOOST_ROOT: C:\local\boost_1_87_0
|
BOOST_ROOT: C:\local\boost_1_87_0
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout AzerothCore
|
- name: Checkout AzerothCore
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Checkout Playerbot Module
|
- name: Checkout Playerbot Module
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
repository: mod-playerbots/mod-playerbots
|
repository: mod-playerbots/mod-playerbots
|
||||||
ref: ${{ github.ref_name == 'Playerbot' && 'master' || 'test-staging' }}
|
ref: ${{ github.ref_name == 'Playerbot' && 'master' || 'test-staging' }}
|
||||||
path: modules/mod-playerbots
|
path: modules/mod-playerbots
|
||||||
|
|
||||||
- name: Move repo to short path
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir C:/ac
|
|
||||||
cp -r . C:/ac/
|
|
||||||
|
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2.13
|
uses: hendrikmuhs/ccache-action@v1.2.13
|
||||||
# Cache the fetched Boost + MySQL client so we don't re-download ~350 MB
|
# Cache the fetched Boost + MySQL client so we don't re-download ~350 MB
|
||||||
# and re-run the Boost installer on every run. The Test-Path guards in
|
# and re-run the Boost installer on every run. The Test-Path guards in
|
||||||
# "Configure OS" short-circuit the install work when these are restored.
|
# "Configure OS" short-circuit the install work when these are restored.
|
||||||
- name: Cache Boost & MySQL
|
- name: Cache Boost & MySQL
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
C:\local\boost_1_87_0
|
C:\local\boost_1_87_0
|
||||||
@@ -109,6 +111,5 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd C:/ac
|
|
||||||
export CTOOLS_BUILD=all
|
export CTOOLS_BUILD=all
|
||||||
./acore.sh compiler build
|
./acore.sh compiler build
|
||||||
@@ -6,6 +6,30 @@ import re
|
|||||||
# Get the src directory of the project
|
# Get the src directory of the project
|
||||||
src_directory = os.path.join(os.getcwd(), 'src')
|
src_directory = os.path.join(os.getcwd(), 'src')
|
||||||
|
|
||||||
|
# Matches west-const declarations: "const <type> &" / "const <type> *".
|
||||||
|
# <type> may be a (qualified) identifier, an optional unsigned/signed/long/short
|
||||||
|
# prefix and an optional (single level of nested) template argument list.
|
||||||
|
qualifier_align_regex = re.compile(
|
||||||
|
r'\bconst\s+('
|
||||||
|
r'(?:(?:unsigned|signed|long|short)\s+)*'
|
||||||
|
r'(?:::)?[A-Za-z_]\w*(?:::[A-Za-z_]\w*)*'
|
||||||
|
r'(?:\s*<[^<>;{}]*(?:<[^<>;{}]*>[^<>;{}]*)*>)?'
|
||||||
|
r')\s*([&*])')
|
||||||
|
|
||||||
|
# Matches a raw string, line comment, block comment, string literal or char literal
|
||||||
|
# (whichever starts first at any position, so // inside a string or " inside a comment
|
||||||
|
# is handled). The raw string alternative comes first so R"delim(...)delim" - which may
|
||||||
|
# contain unescaped quotes - is consumed whole rather than as a plain "..." string.
|
||||||
|
literal_or_comment_regex = re.compile(
|
||||||
|
r'R"([^()\\ \t\r\n]{0,16})\(.*?\)\1"'
|
||||||
|
r'|//[^\n]*|/\*.*?\*/|"(?:\\.|[^"\\])*"|\'(?:\\.|[^\'\\])*\'', re.DOTALL)
|
||||||
|
|
||||||
|
# Replaces the contents of string/char literals and comments with spaces so the
|
||||||
|
# qualifier-alignment check never matches text inside them. Whitespace (including
|
||||||
|
# newlines) is preserved so line numbers stay accurate.
|
||||||
|
def blank_non_code(text: str) -> str:
|
||||||
|
return literal_or_comment_regex.sub(lambda m: re.sub(r'\S', ' ', m.group()), text)
|
||||||
|
|
||||||
# Global variables
|
# Global variables
|
||||||
error_handler = False
|
error_handler = False
|
||||||
results = {
|
results = {
|
||||||
@@ -16,7 +40,8 @@ results = {
|
|||||||
"GetTypeId() check": "Passed",
|
"GetTypeId() check": "Passed",
|
||||||
"NpcFlagHelpers check": "Passed",
|
"NpcFlagHelpers check": "Passed",
|
||||||
"ItemFlagHelpers check": "Passed",
|
"ItemFlagHelpers check": "Passed",
|
||||||
"ItemTemplateFlagHelpers check": "Passed"
|
"ItemTemplateFlagHelpers check": "Passed",
|
||||||
|
"Qualifier alignment check": "Passed"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Main function to parse all the files of the project
|
# Main function to parse all the files of the project
|
||||||
@@ -46,6 +71,7 @@ def parsing_file(directory: str) -> None:
|
|||||||
itemflag_helpers_check(file, file_path)
|
itemflag_helpers_check(file, file_path)
|
||||||
if file_name != 'ItemTemplate.h':
|
if file_name != 'ItemTemplate.h':
|
||||||
itemtemplateflag_helpers_check(file, file_path)
|
itemtemplateflag_helpers_check(file, file_path)
|
||||||
|
qualifier_alignment_check(file, file_path)
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
print(f"\nCould not decode file {file_path}")
|
print(f"\nCould not decode file {file_path}")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@@ -214,6 +240,24 @@ def itemtemplateflag_helpers_check(file: io, file_path: str) -> None:
|
|||||||
error_handler = True
|
error_handler = True
|
||||||
results["ItemTemplateFlagHelpers check"] = "Failed"
|
results["ItemTemplateFlagHelpers check"] = "Failed"
|
||||||
|
|
||||||
|
# Codestyle patterns enforcing east-const: "const T&" -> "T const&", "const T*" -> "T const*"
|
||||||
|
def qualifier_alignment_check(file: io, file_path: str) -> None:
|
||||||
|
global error_handler, results
|
||||||
|
file.seek(0) # Reset file pointer to the beginning
|
||||||
|
check_failed = False
|
||||||
|
# Blank out strings/comments so we never match inside them, then check line by line
|
||||||
|
masked_lines = blank_non_code(file.read()).split('\n')
|
||||||
|
for line_number, line in enumerate(masked_lines, start = 1):
|
||||||
|
for match in qualifier_align_regex.finditer(line):
|
||||||
|
type_name, symbol = match.group(1).strip(), match.group(2)
|
||||||
|
print(
|
||||||
|
f"Please use the '{type_name} const{symbol}' syntax instead of 'const {type_name}{symbol}': {file_path} at line {line_number}")
|
||||||
|
check_failed = True
|
||||||
|
# Handle the script error and update the result output
|
||||||
|
if check_failed:
|
||||||
|
error_handler = True
|
||||||
|
results["Qualifier alignment check"] = "Failed"
|
||||||
|
|
||||||
# Codestyle patterns checking for various codestyle issues
|
# Codestyle patterns checking for various codestyle issues
|
||||||
def misc_codestyle_check(file: io, file_path: str) -> None:
|
def misc_codestyle_check(file: io, file_path: str) -> None:
|
||||||
global error_handler, results
|
global error_handler, results
|
||||||
@@ -229,14 +273,6 @@ def misc_codestyle_check(file: io, file_path: str) -> None:
|
|||||||
|
|
||||||
# Parse all the file
|
# Parse all the file
|
||||||
for line_number, line in enumerate(file, start = 1):
|
for line_number, line in enumerate(file, start = 1):
|
||||||
if 'const auto&' in line:
|
|
||||||
print(
|
|
||||||
f"Please use the 'auto const&' syntax instead of 'const auto&': {file_path} at line {line_number}")
|
|
||||||
check_failed = True
|
|
||||||
if re.search(r'\bconst\s+\w+\s*\*\b', line):
|
|
||||||
print(
|
|
||||||
f"Please use the 'Class/ObjectType const*' syntax instead of 'const Class/ObjectType*': {file_path} at line {line_number}")
|
|
||||||
check_failed = True
|
|
||||||
if [match for match in [' if(', ' if ( '] if match in line]:
|
if [match for match in [' if(', ' if ( '] if match in line]:
|
||||||
print(
|
print(
|
||||||
f"Please use the 'if (XXXX)' syntax instead of 'if(XXXX)': {file_path} at line {line_number}")
|
f"Please use the 'if (XXXX)' syntax instead of 'if(XXXX)': {file_path} at line {line_number}")
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ ARG CCACHE_LOGFILE=""
|
|||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
build-essential ccache libtool cmake-data make cmake clang \
|
build-essential ccache libtool cmake-data ninja-build cmake clang \
|
||||||
git lsb-base curl unzip default-mysql-client openssl \
|
git lsb-base curl unzip default-mysql-client openssl \
|
||||||
default-libmysqlclient-dev libboost-all-dev libssl-dev libmysql++-dev \
|
default-libmysqlclient-dev libboost-all-dev libssl-dev libmysql++-dev \
|
||||||
libreadline-dev zlib1g-dev libbz2-dev libncurses5-dev liblzma-dev \
|
libreadline-dev zlib1g-dev libbz2-dev libncurses5-dev liblzma-dev \
|
||||||
@@ -89,6 +89,7 @@ RUN --mount=type=cache,target=/ccache,sharing=locked \
|
|||||||
--mount=type=bind,target=/azerothcore/.git,source=.git \
|
--mount=type=bind,target=/azerothcore/.git,source=.git \
|
||||||
git config --global --add safe.directory /azerothcore \
|
git config --global --add safe.directory /azerothcore \
|
||||||
&& cmake /azerothcore \
|
&& cmake /azerothcore \
|
||||||
|
-G Ninja \
|
||||||
-DCMAKE_INSTALL_PREFIX="/azerothcore/env/dist" \
|
-DCMAKE_INSTALL_PREFIX="/azerothcore/env/dist" \
|
||||||
-DAPPS_BUILD="all" \
|
-DAPPS_BUILD="all" \
|
||||||
-DTOOLS_BUILD="$CTOOLS_BUILD" \
|
-DTOOLS_BUILD="$CTOOLS_BUILD" \
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ function inst_simple_restarter {
|
|||||||
|
|
||||||
function inst_download_client_data {
|
function inst_download_client_data {
|
||||||
# change the following version when needed
|
# change the following version when needed
|
||||||
local VERSION=v19
|
local VERSION=v20.0
|
||||||
|
|
||||||
echo "#######################"
|
echo "#######################"
|
||||||
echo "Client data downloader"
|
echo "Client data downloader"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user