вывод из самбомудлей модов для азероткор
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
name: Enforce test-staging → master
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- test-staging
|
||||
|
||||
jobs:
|
||||
require-test-staging:
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.event.pull_request.base.ref == 'master'
|
||||
steps:
|
||||
- name: Ensure PR source is test-staging
|
||||
run: |
|
||||
echo "Base: ${{ github.event.pull_request.base.ref }}"
|
||||
echo "Head: ${{ github.event.pull_request.head.ref }}"
|
||||
if [ "${{ github.event.pull_request.head.ref }}" != "test-staging" ]; then
|
||||
echo "✖ Pull request must come from test-staging"
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Codestyle
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "test-staging" ]
|
||||
pull_request:
|
||||
branches: [ "master", "test-staging" ]
|
||||
|
||||
concurrency:
|
||||
group: "codestyle-${{ github.event.pull_request.number }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: "clang-format-always-success"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Playerbot Module
|
||||
uses: actions/checkout@v4
|
||||
- name: Install clang-format
|
||||
run: sudo apt-get install clang-format -y
|
||||
|
||||
- name: Run clang-format
|
||||
run: |
|
||||
# Find all C/C++ source files
|
||||
FILES=$(find . -name "*.h" -o -name "*.cpp" -o -name "*.c" -o -name "*.hpp")
|
||||
|
||||
# Run clang-format in dry-run mode to check for formatting issues
|
||||
clang-format -i $FILES
|
||||
|
||||
# Check if there are any formatting changes
|
||||
git diff --exit-code
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
@@ -0,0 +1,40 @@
|
||||
name: C++ Codestyle
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
- ready_for_review
|
||||
paths:
|
||||
- src/**
|
||||
- "!README.md"
|
||||
- "!docs/**"
|
||||
|
||||
concurrency:
|
||||
group: "codestyle-cppcheck-${{ github.event.pull_request.number }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
name: C++
|
||||
if: github.event.pull_request.draft == false
|
||||
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
|
||||
@@ -0,0 +1,78 @@
|
||||
name: ubuntu-build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "test-staging" ]
|
||||
pull_request:
|
||||
branches: [ "master", "test-staging" ]
|
||||
|
||||
concurrency:
|
||||
group: "core-build-${{ github.event.pull_request.number }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
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
|
||||
with:
|
||||
repository: 'mod-playerbots/azerothcore-wotlk'
|
||||
ref: 'Playerbot'
|
||||
|
||||
- name: Set reusable strings
|
||||
id: strings
|
||||
shell: bash
|
||||
run: |
|
||||
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Checkout Playerbot Module
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'mod-playerbots/mod-playerbots'
|
||||
path: 'modules/mod-playerbots'
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/var/ccache
|
||||
key: ccache:${{ matrix.os }}:${{ matrix.c_compiler }}:${{ github.ref }}:${{ github.sha }}
|
||||
restore-keys: |
|
||||
ccache:${{ matrix.os }}:${{ matrix.c_compiler }}:${{ github.ref }}
|
||||
ccache:${{ matrix.os }}:${{ matrix.c_compiler }}
|
||||
ccache:${{ matrix.os }}
|
||||
|
||||
- name: Install Requirements
|
||||
run: sudo apt-get update && sudo apt-get install ccache git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev mysql-server libboost-all-dev
|
||||
|
||||
- name: Configure CMake
|
||||
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
|
||||
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
|
||||
@@ -0,0 +1,45 @@
|
||||
name: macos-build
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "test-staging" ]
|
||||
pull_request:
|
||||
branches: [ "master", "test-staging" ]
|
||||
|
||||
concurrency:
|
||||
group: "macos-build-${{ github.event.pull_request.number }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
macos-build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- macos-14
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout AzerothCore
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'mod-playerbots/azerothcore-wotlk'
|
||||
ref: 'Playerbot'
|
||||
- name: Checkout Playerbot Module
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'mod-playerbots/mod-playerbots'
|
||||
path: 'modules/mod-playerbots'
|
||||
- name: Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/Library/Caches/ccache
|
||||
key: ccache:${{ matrix.os }}:${{ github.ref }}:${{ github.sha }}
|
||||
restore-keys: |
|
||||
ccache:${{ matrix.os }}:${{ github.ref }}
|
||||
ccache:${{ matrix.os }}
|
||||
- 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
|
||||
@@ -0,0 +1,49 @@
|
||||
name: windows-build
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "test-staging" ]
|
||||
pull_request:
|
||||
branches: [ "master", "test-staging" ]
|
||||
|
||||
concurrency:
|
||||
group: "windows-build-${{ github.event.pull_request.number }}"
|
||||
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
|
||||
steps:
|
||||
- name: Checkout AzerothCore
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'mod-playerbots/azerothcore-wotlk'
|
||||
ref: 'Playerbot'
|
||||
path: 'ac'
|
||||
- name: Checkout Playerbot Module
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'mod-playerbots/mod-playerbots'
|
||||
#path: 'modules/mod-playerbots'
|
||||
path: ac/modules/mod-playerbots
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2.13
|
||||
- name: Configure OS
|
||||
shell: bash
|
||||
working-directory: ac
|
||||
env:
|
||||
CONTINUOUS_INTEGRATION: true
|
||||
run: |
|
||||
./acore.sh install-deps
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: ac
|
||||
run: |
|
||||
export CTOOLS_BUILD=all
|
||||
./acore.sh compiler build
|
||||
Reference in New Issue
Block a user