Merge branch 'development' into 2022 #354
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#3 build types | |
# - gcc under Ubuntu | |
# - clang under Ubuntu | |
# - visual studio under Windows | |
# | |
# Builds are set to use 2 threads per type | |
name: vmangos CI build | |
on: | |
push: | |
paths-ignore: | |
- '.github/ISSUE_TEMPLATE/**' | |
- '.github/ISSUE_TEMPLATE.md' | |
- '.github/PULL_REQUEST_TEMPLATE.md' | |
- '.github/workflows/db_check.yml' | |
- '.github/workflows/db_dump.yml' | |
- 'sql/**' | |
- '.drone.yml' | |
- 'README.md' | |
- 'LICENSE' | |
- '.gitignore' | |
- 'CONTRIBUTING.md' | |
pull_request: | |
paths-ignore: | |
- '.github/ISSUE_TEMPLATE/**' | |
- '.github/ISSUE_TEMPLATE.md' | |
- '.github/PULL_REQUEST_TEMPLATE.md' | |
- '.github/workflows/db_check.yml' | |
- '.github/workflows/db_dump.yml' | |
- 'sql/**' | |
- '.drone.yml' | |
- 'README.md' | |
- 'LICENSE' | |
- '.gitignore' | |
- 'CONTRIBUTING.md' | |
# This is what will cancel the previous workflow | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
#matrix declaration | |
matrix: | |
os: [ubuntu-latest] | |
compiler: [gcc, clang] | |
include: | |
- os: windows-latest | |
steps: | |
#git checkout | |
- uses: actions/checkout@v3 | |
#before install dependencies | |
- name: ubuntu dependencies | |
#ubuntu dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get -qq install libmysql++-dev libace-dev libtbb-dev | |
sudo apt-get -qq install cmake build-essential cppcheck git make libiberty-dev openssl libssl-dev | |
#windows dependencies | |
- name: windows dependencies | |
if: matrix.os == 'windows-latest' | |
#Sets versions for ACE/TBB | |
env: | |
ACE_VERSION: 7.0.9 | |
ACE_VERSION2: 7_0_9 | |
TBB_VERSION: 2021.7.0 | |
run: | | |
#directory variables | |
export ACE_ROOT=$GITHUB_WORKSPACE/ACE_wrappers | |
export TBB_ROOT_DIR=$GITHUB_WORKSPACE/tbb | |
#wget | |
choco install -y wget --version 1.20 | |
#ACE package download | |
wget http://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-$ACE_VERSION2/ACE-$ACE_VERSION.zip | |
unzip ACE-$ACE_VERSION.zip | |
rm ACE-$ACE_VERSION.zip | |
#configuration of ACE header | |
echo "#include \"ace/config-win32.h\"" >> $ACE_ROOT/ace/config.h | |
#TBB package download | |
wget https://github.com/oneapi-src/oneTBB/releases/download/v$TBB_VERSION/oneapi-tbb-$TBB_VERSION-win.zip | |
unzip oneapi-tbb-$TBB_VERSION-win.zip | |
rm oneapi-tbb-$TBB_VERSION-win.zip | |
mv oneapi-tbb-$TBB_VERSION tbb | |
#openssl | |
choco install -y openssl --version=1.1.1.500 | |
#git bash shell | |
shell: bash | |
#build and install | |
#ubuntu | |
- name: ubuntu build & install | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
mkdir build | |
mkdir _install | |
cd build | |
cmake ../ -DCMAKE_INSTALL_PREFIX=../_install -DWITH_WARNINGS=0 -DUSE_EXTRACTORS=1 -DUSE_ANTICHEAT=1 | |
make -j2 | |
make install | |
#windows | |
- name: windows build & install | |
if: matrix.os == 'windows-latest' | |
run: | | |
#directory variables | |
export ACE_ROOT=$GITHUB_WORKSPACE/ACE_wrappers | |
cd $GITHUB_WORKSPACE/ACE_wrappers | |
/c/Program\ Files/Microsoft\ Visual\ Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe "ACE_wrappers_vs2019.sln" //p:Configuration=Release //p:Platform=x64 //t:ACE //m:2 | |
cd $GITHUB_WORKSPACE | |
mkdir build | |
cd build | |
cmake -D TBB_ROOT_DIR=$GITHUB_WORKSPACE/tbb -DWITH_WARNINGS=0 -DUSE_EXTRACTORS=1 -DUSE_ANTICHEAT=1 -G "Visual Studio 17 2022" -A x64 .. | |
/c/Program\ Files/Microsoft\ Visual\ Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe "MaNGOS.sln" //p:Platform=x64 //p:Configuration=Release //m:2 | |
#git bash shell | |
shell: bash |