Use ninja instead of makefiles

This commit is contained in:
Dennis Felsing 2022-02-14 22:34:43 +01:00
parent 1afd1a32d1
commit e31f255a65
4 changed files with 12 additions and 14 deletions

View file

@ -17,8 +17,7 @@ jobs:
os: [ubuntu-latest, macOS-latest, windows-latest, ubuntu-18.04]
include:
- os: ubuntu-latest
cmake-args: -G "Unix Makefiles"
build-args: --parallel
cmake-args: -G Ninja
package-file: DDNet-*-linux_x86_64.tar.xz
fancy: true
env:
@ -26,7 +25,7 @@ jobs:
CXXFLAGS: -Werror
- os: ubuntu-18.04
cmake-path: /usr/bin/
cmake-args: -G "Unix Makefiles"
cmake-args: -G Ninja
package-file: DDNet-*-linux_x86_64.tar.xz
fancy: false
env:
@ -34,8 +33,7 @@ jobs:
CXXFLAGS: -Werror
GTEST_FILTER: -*SQLite*
- os: macOS-latest
cmake-args: -G "Unix Makefiles"
build-args: --parallel
cmake-args: -G Ninja
package-file: DDNet-*-macos.dmg
fancy: false
env:
@ -59,7 +57,7 @@ jobs:
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update -y
sudo apt-get install pkg-config cmake libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev -y
sudo apt-get install pkg-config cmake ninja-build libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev -y
- name: Prepare Linux (fancy)
if: contains(matrix.os, 'ubuntu') && matrix.fancy
@ -80,7 +78,7 @@ jobs:
if: contains(matrix.os, 'macOS')
run: |
brew update || true
brew install pkg-config sdl2 python3
brew install pkg-config sdl2 python3 ninja
brew upgrade freetype
pip3 install dmgbuild
sudo rm -rf /Library/Developer/CommandLineTools

View file

@ -20,11 +20,11 @@ jobs:
- name: Install clang-tidy
run: |
sudo apt-get update -y
sudo apt-get install pkg-config cmake libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev clang-tidy -y
sudo apt-get install pkg-config cmake ninja-build libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev clang-tidy -y
- name: Build with clang-tidy
run: |
mkdir clang-tidy
cd clang-tidy
cmake -G "Unix Makefiles" -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-warnings-as-errors=*" -DCMAKE_C_CLANG_TIDY="clang-tidy;-warnings-as-errors=*" -DCMAKE_BUILD_TYPE=Debug -Werror=dev -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. ..
cmake --build . --config Debug --parallel --target everything -- --keep-going
cmake -G Ninja -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-warnings-as-errors=*" -DCMAKE_C_CLANG_TIDY="clang-tidy;-warnings-as-errors=*" -DCMAKE_BUILD_TYPE=Debug -Werror=dev -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. ..
cmake --build . --config Debug --target everything -- -k 0

View file

@ -55,7 +55,7 @@ jobs:
run: |
mkdir release
cd release
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DANTIBOT=ON -DMYSQL=ON -DWEBSOCKETS=ON ..
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DANTIBOT=ON -DMYSQL=ON -DWEBSOCKETS=ON ..
cmake --build . --config RelWithDebInfo --target everything
- name: Perform CodeQL Analysis

View file

@ -19,11 +19,11 @@ jobs:
- name: Prepare
run: |
sudo apt-get update -y
sudo apt-get install clang-format imagemagick ddnet-tools shellcheck pkg-config cmake libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev pylint3 python3-clang -y
sudo apt-get install clang-format imagemagick ddnet-tools shellcheck pkg-config cmake ninja-build libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev pylint3 python3-clang -y
mkdir release
cd release
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DDOWNLOAD_GTEST=OFF -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. ..
cmake --build . --config Release --target dilate --parallel
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DDOWNLOAD_GTEST=OFF -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. ..
cmake --build . --config Release --target dilate
- name: Check clang-format
run: clang-format -version
- name: Check fix_style