Test antibot, mysql, websockets compilation on CI

This commit is contained in:
heinrich5991 2020-05-17 01:04:49 +02:00
parent e8a59482c3
commit bd022b77d0

View file

@ -14,6 +14,7 @@ jobs:
cmake-args: -G "Unix Makefiles" cmake-args: -G "Unix Makefiles"
build-args: --parallel build-args: --parallel
package-file: DDNet-*-linux_x86_64.tar.xz package-file: DDNet-*-linux_x86_64.tar.xz
fancy: true
env: env:
CFLAGS: -Wdeclaration-after-statement -Werror CFLAGS: -Wdeclaration-after-statement -Werror
CXXFLAGS: -Werror CXXFLAGS: -Werror
@ -21,6 +22,7 @@ jobs:
cmake-path: /usr/bin/ cmake-path: /usr/bin/
cmake-args: -G "Unix Makefiles" cmake-args: -G "Unix Makefiles"
package-file: DDNet-*-linux_x86_64.tar.xz package-file: DDNet-*-linux_x86_64.tar.xz
fancy: false
env: env:
CFLAGS: -Wdeclaration-after-statement -Werror CFLAGS: -Wdeclaration-after-statement -Werror
CXXFLAGS: -Werror CXXFLAGS: -Werror
@ -28,12 +30,14 @@ jobs:
cmake-args: -G "Unix Makefiles" cmake-args: -G "Unix Makefiles"
build-args: --parallel build-args: --parallel
package-file: DDNet-*-osx.dmg package-file: DDNet-*-osx.dmg
fancy: false
env: env:
CFLAGS: -Wdeclaration-after-statement -Werror CFLAGS: -Wdeclaration-after-statement -Werror
CXXFLAGS: -Werror CXXFLAGS: -Werror
- os: windows-latest - os: windows-latest
cmake-args: -G "Visual Studio 16 2019" -A x64 cmake-args: -G "Visual Studio 16 2019" -A x64
package-file: DDNet-*-win64.zip package-file: DDNet-*-win64.zip
fancy: false
env: env:
CFLAGS: /WX CFLAGS: /WX
CXXFLAGS: /WX CXXFLAGS: /WX
@ -54,6 +58,11 @@ jobs:
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install pkg-config cmake libfreetype6-dev libnotify-dev libsdl2-dev -y sudo apt-get install pkg-config cmake libfreetype6-dev libnotify-dev libsdl2-dev -y
- name: Prepare Linux (fancy)
if: contains(matrix.os, 'ubuntu') && matrix.fancy
run: |
sudo apt-get install libboost-dev libmariadbclient-dev libmysqlcppconn-dev libwebsockets-dev -y
- name: Prepare MacOS - name: Prepare MacOS
if: contains(matrix.os, 'macOS') if: contains(matrix.os, 'macOS')
run: | run: |
@ -88,6 +97,21 @@ jobs:
${{ matrix.cmake-path }}cmake --build . --config Release ${{ matrix.build-args }} --target run_tests ${{ matrix.cmake-path }}cmake --build . --config Release ${{ matrix.build-args }} --target run_tests
./DDNet-Server shutdown ./DDNet-Server shutdown
- name: Build in release mode with debug info and all features on
if: matrix.fancy
env: ${{ matrix.env }}
run: |
mkdir fancy
cd fancy
${{ matrix.cmake-path }}cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DANTIBOT=ON -DMYSQL=ON -DWEBSOCKETS=ON ..
${{ matrix.cmake-path }}cmake --build . --config RelWithDebInfo ${{ matrix.build-args }} --target everything
- name: Test fancy
if: matrix.fancy
run: |
cd release
${{ matrix.cmake-path }}cmake --build . --config RelWithDebInfo ${{ matrix.build-args }} --target run_tests
./DDNet-Server shutdown
- name: Package - name: Package
run: | run: |
cd release cd release