Skip to content

Commit

Permalink
Merge pull request #22 from cmangos/master
Browse files Browse the repository at this point in the history
Merge master
  • Loading branch information
mostlikely4r authored Jul 5, 2024
2 parents fbb40be + a1d5517 commit 3d4228e
Show file tree
Hide file tree
Showing 805 changed files with 59,143 additions and 26,240 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
44 changes: 16 additions & 28 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MacOs build
name: macOS Build

on: [push]

Expand All @@ -7,9 +7,8 @@ env:
BUILD_TYPE: Release
REPO_DIR : ${{github.workspace}}
BUILD_DIR: ${{github.workspace}}/bin/builddir
BOOST_VERSION: "1.83.0"
BOOST_PLATFORM_VERSION: "11"
BOOST_VERSION: "1.79.0"
BOOST_INSTALL_DIR: "${{github.workspace}}/bin"

permissions:
contents: read
Expand All @@ -22,43 +21,34 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ${{env.REPO_DIR}}

- name: Install dependencies
- name: Install Dependencies
run: |
brew install mysql-client
brew install openssl
echo "OPENSSL_ROOT_DIR=$(brew --prefix --installed openssl)" >> $GITHUB_ENV
mkdir -p ${{env.BOOST_INSTALL_DIR}}
- name: Cache Windows boost
uses: actions/cache@v2
id: cache-boost
with:
path: "${{env.BOOST_INSTALL_DIR}}/boost"
key: ${{ runner.os }}-${{ hashFiles('.github/workflows/macos.yml') }}

- if: steps.cache-boost.outputs.cache-hit != 'true'
name: Install boost
uses: MarkusJx/[email protected]
- name: Install Boost
uses: MarkusJx/[email protected]
id: install-boost
with:
# REQUIRED: Specify the required boost version
# A list of supported versions can be found here:
# https://github.com/actions/boost-versions/blob/main/versions-manifest.json
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
boost_version: ${{env.BOOST_VERSION}}
# OPTIONAL: Specify a platform version
platform_version: ${{env.BOOST_PLATFORM_VERSION}}
# OPTIONAL: Specify a custom install location
boost_install_dir: ${{env.BOOST_INSTALL_DIR}}
# OPTIONAL: Specify a toolset
toolset: clang
# NOTE: If a boost version matching all requirements cannot be found,
# this build step will fail

- name: Configure
env:
BOOST_ROOT: "${{env.BOOST_INSTALL_DIR}}/boost/boost"
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
run: cmake -B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}} -DBoost_ARCHITECTURE=-x64

- name: Build
Expand All @@ -69,31 +59,29 @@ jobs:
notify:
permissions:
contents: none
name: Discord Notification
name: Send Notification to Discord on Failure
runs-on: ubuntu-20.04
needs: # make sure the notification is sent AFTER the jobs you want included have completed
- build
if: failure()

steps:
- name: Env
- name: Setup Environmental Variables
run: |
echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "GIT_SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Notify
uses: rjstone/discord-webhook-notify@v1.0.4
uses: rjstone/discord-webhook-notify@v1.1.1
with:
severity: error
username: ${{env.EXPENSION_NAME}}-core
description: |
**MacOS buid failed**
**macOS Build Failed**
details: |
- **Branch:** ${{env.GIT_BRANCH}}
- **Pusher:** ${{github.event.pusher.name}}
- **Author:** ${{github.event.head_commit.author.name}}
- **Commit:** [${{github.repository}}/${{env.GIT_SHORT_SHA}}](${{github.server_url}}/${{ github.repository }}/commit/${{github.sha}})
- **Build log:** [actions/runs/${{github.run_id}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}})
footer: Next time ${{github.event.pusher.name}}!
- **Build Log:** [actions/runs/${{github.run_id}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}})
footer: CMaNGOS Developers Notified!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
avatarUrl: https://github.githubassets.com/images/modules/logos_page/Octocat.png
62 changes: 27 additions & 35 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ubuntu build
name: Ubuntu Build

on: [push]

Expand All @@ -7,9 +7,8 @@ env:
BUILD_TYPE: Release
REPO_DIR : ${{github.workspace}}
BUILD_DIR: ${{github.workspace}}/bin/builddir
BOOST_PLATFORM_VERSION: "20.04"
BOOST_VERSION: "1.79.0"
BOOST_INSTALL_DIR: "${{github.workspace}}/bin"
BOOST_VERSION: "1.83.0"
BOOST_PLATFORM_VERSION: "22.04"

jobs:
build:
Expand All @@ -20,27 +19,27 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-20.04
COMPILER_CC: gcc
COMPILER_PP: g++
- os: ubuntu-22.04
COMPILER_CC: gcc-12
COMPILER_PP: g++-12
USE_PCH: ON
EXTRA_BUILD: ""

- os: ubuntu-20.04
- os: ubuntu-22.04
COMPILER_CC: clang
COMPILER_PP: clang++
USE_PCH: ON
EXTRA_BUILD: "-DBUILD_EXTRACTORS=ON -DBUILD_AHBOT=ON -DBUILD_PLAYERBOT=ON "

- os: ubuntu-20.04
- os: ubuntu-22.04
COMPILER_CC: clang
COMPILER_PP: clang++
USE_PCH: OFF
EXTRA_BUILD: ""

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ${{env.REPO_DIR}}

Expand All @@ -52,71 +51,64 @@ jobs:
echo "CXX=${{matrix.COMPILER_PP}}" >> $GITHUB_ENV
cmake -E make_directory ${{ env.BUILD_DIR }}
- name: Cache Windows boost
uses: actions/cache@v2
id: cache-boost
with:
path: "${{env.BOOST_INSTALL_DIR}}/boost"
key: ${{ runner.os }}-${{ hashFiles('.github/workflows/ubuntu.yml') }}

- if: steps.cache-boost.outputs.cache-hit != 'true'
name: Install boost
uses: MarkusJx/[email protected]
- name: Install Boost
uses: MarkusJx/[email protected]
id: install-boost
with:
# REQUIRED: Specify the required boost version
# A list of supported versions can be found here:
# https://github.com/actions/boost-versions/blob/main/versions-manifest.json
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
boost_version: ${{env.BOOST_VERSION}}
# OPTIONAL: Specify a platform version
platform_version: ${{env.BOOST_PLATFORM_VERSION}}
# OPTIONAL: Specify a custom install location
boost_install_dir: ${{env.BOOST_INSTALL_DIR}}
# OPTIONAL: Specify a toolset
toolset: ${{env.COMPILER_CC}}
# OPTIONAL: Specify an architecture
arch: x86
# NOTE: If a boost version matching all requirements cannot be found,
# this build step will fail

- name: Configure
env:
USE_PCH: ${{ matrix.USE_PCH }}
EXTRA_BUILD: ${{ matrix.EXTRA_BUILD }}
BOOST_ROOT: "${{env.BOOST_INSTALL_DIR}}/boost/boost"
run: cmake -DBoost_ARCHITECTURE=-x64 -DPCH=${{env.USE_PCH}} ${{env.EXTRA_BUILD}}-B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}}
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
run: cmake -DBoost_ARCHITECTURE=-x64 -DPCH=${{env.USE_PCH}} -DCMAKE_INSTALL_PREFIX=/home/runner/work ${{env.EXTRA_BUILD}}-B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}}


- name: Build
env:
MAKEFLAGS: "-j8"
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}}
run: |
cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}}
cmake --install ${{env.BUILD_DIR}}
notify:
name: Discord Notification
runs-on: ubuntu-20.04
name: Send Notification to Discord on Failure
runs-on: ubuntu-22.04
permissions:
contents: none
needs: # make sure the notification is sent AFTER the jobs you want included have completed
- build
if: failure()

steps:
- name: Env
- name: Setup Environmental Variables
run: |
echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "GIT_SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Notify
uses: rjstone/discord-webhook-notify@v1.0.4
uses: rjstone/discord-webhook-notify@v1.1.1
with:
severity: error
username: ${{env.EXPENSION_NAME}}-core
description: |
**Linux buid failed**
**Linux Build Failed**
details: |
- **Branch:** ${{env.GIT_BRANCH}}
- **Pusher:** ${{github.event.pusher.name}}
- **Author:** ${{github.event.head_commit.author.name}}
- **Commit:** [${{github.repository}}/${{env.GIT_SHORT_SHA}}](${{github.server_url}}/${{ github.repository }}/commit/${{github.sha}})
- **Build log:** [actions/runs/${{github.run_id}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}})
footer: Next time ${{github.event.pusher.name}}!
- **Build Log:** [actions/runs/${{github.run_id}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}})
footer: CMaNGOS Developers Notified!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
avatarUrl: https://github.githubassets.com/images/modules/logos_page/Octocat.png
Loading

0 comments on commit 3d4228e

Please sign in to comment.