Skip to content

CI: Test build for all supported client versions. #5764

CI: Test build for all supported client versions.

CI: Test build for all supported client versions. #5764

Workflow file for this run

#3 build types
# - gcc under Ubuntu
# - clang under Ubuntu
# - visual studio under Windows
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/**'
- '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/**'
- 'README.md'
- 'LICENSE'
- '.gitignore'
- 'CONTRIBUTING.md'
jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: true
#matrix declaration
matrix:
os: [ubuntu-latest, windows-2022]
client_build: [5875, 5464, 5302, 5086, 4878, 4695, 4544, 4449]
compiler: [gcc, clang, msvc]
exclude:
- os: ubuntu-latest
compiler: msvc
- os: windows-2022
compiler: gcc
- os: windows-2022
compiler: clang
steps:
#git checkout
- uses: actions/checkout@v4
#before install dependencies
- name: ubuntu dependencies
#ubuntu dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get -qq update
sudo apt-get -qq install build-essential cmake libmysql++-dev libtbb-dev libcurl4-openssl-dev openssl
#windows dependencies
- name: windows dependencies
if: matrix.os == 'windows-2022'
#Sets versions TBB
env:
TBB_VERSION: 2020.3
run: |
# Setup TBB
export TBB_ROOT_DIR=$GITHUB_WORKSPACE/tbb
curl -LOJ https://github.com/oneapi-src/oneTBB/releases/download/v$TBB_VERSION/tbb-$TBB_VERSION-win.zip
unzip tbb-$TBB_VERSION-win.zip
rm tbb-$TBB_VERSION-win.zip
#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 -DENABLE_MAILSENDER=1 -DSUPPORTED_CLIENT_BUILD=${{ matrix.client_build }}
make -j$(nproc)
make install
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler == 'gcc' && 'g++' || 'clang++' }}
#windows
- name: windows build & install
if: matrix.os == 'windows-2022'
run: |
# Build CURL
cd $GITHUB_WORKSPACE/dep/windows/optional_dependencies/
./curl_download_and_build.bat
# Build actual project
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake -D TBB_ROOT_DIR=$GITHUB_WORKSPACE/tbb -DWITH_WARNINGS=0 -DUSE_EXTRACTORS=1 -DENABLE_MAILSENDER=1 -DSUPPORTED_CLIENT_BUILD=${{ matrix.client_build }} -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:$(nproc)
#git bash shell
shell: bash