Files
TrinityCore/.github/workflows/gcc-build.yml
Giacomo Pozzoni 2e70d6b45f CI/GitHub: Install GCC 8 (#26341)
(cherry picked from commit 39bd263c72)
2022-03-01 11:37:35 +01:00

34 lines
1.0 KiB
YAML

name: GCC
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: |
sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100 --slave /usr/bin/g++ g++ /usr/bin/g++-8
- name: Setup
run: |
mkdir bin
cd bin
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1
cd ..
- name: Build
run: |
cd bin
make -j 4 -k && make install
- name: Unit tests
run: |
cd bin
make test
- name: Check executables
run: |
cd bin/check_install/bin
./bnetserver --version
./worldserver --version