mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: GCC
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set reusable strings
|
|
id: strings
|
|
shell: bash
|
|
run: |
|
|
echo "build-output-dir=${{ github.workspace }}/bin" >> "$GITHUB_OUTPUT"
|
|
- name: Dependencies
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-11
|
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11
|
|
- name: Setup
|
|
env:
|
|
CMAKE_BUILD_TYPE: Debug
|
|
run: >
|
|
cmake -S ${{ github.workspace }} -B ${{ steps.strings.outputs.build-output-dir }}
|
|
-DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0
|
|
-DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG"
|
|
-DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1
|
|
- name: Build
|
|
run: |
|
|
cd bin
|
|
make -j 4 -k && make install
|
|
- name: Unit tests
|
|
run: |
|
|
cd bin
|
|
make test
|
|
- name: Check executables
|
|
run: |
|
|
cd ${{ github.workspace }}/check_install/bin
|
|
./bnetserver --version
|
|
./worldserver --version
|