👷 using Ninja

This commit is contained in:
Niels Lohmann 2017-08-25 21:01:07 +02:00
parent 3dcd360139
commit 839681ff9f
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69

View file

@ -37,7 +37,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: [g++-4.9, valgrind] packages: ['g++-4.9', 'valgrind', 'ninja-build']
# clang sanitizer # clang sanitizer
- os: linux - os: linux
@ -48,7 +48,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0'] sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
packages: ['g++-6', 'clang-5.0'] packages: ['g++-6', 'clang-5.0', 'ninja-build']
# cppcheck # cppcheck
- os: linux - os: linux
@ -59,7 +59,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: [g++-4.9, cppcheck] packages: ['g++-4.9', 'cppcheck', 'ninja-build']
after_success: after_success:
- make cppcheck - make cppcheck
@ -73,7 +73,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: [g++-4.9, cppcheck] packages: ['g++-4.9', 'cppcheck', 'ninja-build']
after_success: after_success:
- make clean - make clean
- CPPFLAGS="-DJSON_NOEXCEPTION" make check TEST_PATTERN="-e \"*\"" - CPPFLAGS="-DJSON_NOEXCEPTION" make check TEST_PATTERN="-e \"*\""
@ -85,7 +85,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: ['g++-4.9', 'ruby'] packages: ['g++-4.9', 'ruby', 'ninja-build']
before_script: before_script:
- wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz - wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz
- tar xf lcov_1.11.orig.tar.gz - tar xf lcov_1.11.orig.tar.gz
@ -113,7 +113,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6'] sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6']
packages: ['g++-6', 'clang-3.6'] packages: ['g++-6', 'clang-3.6', 'ninja-build']
coverity_scan: coverity_scan:
project: project:
name: "nlohmann/json" name: "nlohmann/json"
@ -157,7 +157,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: g++-4.9 packages: ['g++-4.9', 'ninja-build']
- os: linux - os: linux
compiler: gcc compiler: gcc
@ -165,7 +165,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: g++-5 packages: ['g++-5', 'ninja-build']
- os: linux - os: linux
compiler: gcc compiler: gcc
@ -173,7 +173,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: g++-6 packages: ['g++-6', 'ninja-build']
- os: linux - os: linux
compiler: gcc compiler: gcc
@ -181,7 +181,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: g++-7 packages: ['g++-7', 'ninja-build']
- os: linux - os: linux
compiler: gcc compiler: gcc
@ -191,7 +191,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: g++-7 packages: ['g++-7', 'ninja-build']
# Linux / Clang # Linux / Clang
@ -201,7 +201,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5'] sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5']
packages: ['g++-6', 'clang-3.5'] packages: ['g++-6', 'clang-3.5', 'ninja-build']
- os: linux - os: linux
compiler: clang compiler: clang
@ -209,7 +209,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6'] sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6']
packages: ['g++-6', 'clang-3.6'] packages: ['g++-6', 'clang-3.6', 'ninja-build']
- os: linux - os: linux
compiler: clang compiler: clang
@ -217,7 +217,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7'] sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7']
packages: ['g++-6', 'clang-3.7'] packages: ['g++-6', 'clang-3.7', 'ninja-build']
- os: linux - os: linux
compiler: clang compiler: clang
@ -225,7 +225,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6', 'clang-3.8'] packages: ['g++-6', 'clang-3.8', 'ninja-build']
- os: linux - os: linux
compiler: clang compiler: clang
@ -233,7 +233,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test'] sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6', 'clang-3.9'] packages: ['g++-6', 'clang-3.9', 'ninja-build']
- os: linux - os: linux
compiler: clang compiler: clang
@ -241,7 +241,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-4.0'] sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-4.0']
packages: ['g++-6', 'clang-4.0'] packages: ['g++-6', 'clang-4.0', 'ninja-build']
- os: linux - os: linux
compiler: clang compiler: clang
@ -249,7 +249,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0'] sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
packages: ['g++-6', 'clang-5.0'] packages: ['g++-6', 'clang-5.0', 'ninja-build']
- os: linux - os: linux
compiler: clang compiler: clang
@ -259,7 +259,7 @@ matrix:
addons: addons:
apt: apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0'] sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
packages: ['g++-6', 'clang-5.0'] packages: ['g++-6', 'clang-5.0', 'ninja-build']
################ ################
# build script # # build script #
@ -268,9 +268,9 @@ matrix:
script: script:
# get CMake (only for systems with brew - macOS) # get CMake (only for systems with brew - macOS)
- | - |
if [[ !(-x $(which cmake)) && (-x $(which brew)) ]]; then if [[ (-x $(which brew)) ]]; then
brew update brew update
brew install cmake brew install cmake ninja
cmake --version cmake --version
fi fi
@ -283,7 +283,7 @@ script:
# compile and execute unit tests # compile and execute unit tests
- mkdir -p build && cd build - mkdir -p build && cd build
- cmake .. ${CMAKE_OPTIONS} && cmake --build . --config Release -- -j4 - cmake .. ${CMAKE_OPTIONS} -GNinja && cmake --build . --config Release
- ctest -C Release -V - ctest -C Release -V
- cd .. - cd ..