Compile and run tests in parallel (-j)
This commit is contained in:
parent
e5e6a46c37
commit
b6e23b2d3e
|
@ -7,24 +7,32 @@ executors:
|
|||
- image: gcc:7
|
||||
environment:
|
||||
CXX: g++
|
||||
BUILD_FLAGS: -j
|
||||
CTEST_FLAGS: -j --output-on-failure
|
||||
|
||||
gcc8:
|
||||
docker:
|
||||
- image: gcc:8
|
||||
environment:
|
||||
CXX: g++
|
||||
BUILD_FLAGS: -j
|
||||
CTEST_FLAGS: -j --output-on-failure
|
||||
|
||||
gcc9:
|
||||
docker:
|
||||
- image: gcc:9
|
||||
environment:
|
||||
CXX: g++
|
||||
BUILD_FLAGS: -j
|
||||
CTEST_FLAGS: -j --output-on-failure
|
||||
|
||||
clang6:
|
||||
docker:
|
||||
- image: ubuntu:18.04
|
||||
environment:
|
||||
CXX: clang++-6.0
|
||||
BUILD_FLAGS: -j
|
||||
CTEST_FLAGS: -j --output-on-failure
|
||||
|
||||
# Reusable test commands (and initializer for clang 6)
|
||||
commands:
|
||||
|
@ -36,7 +44,7 @@ commands:
|
|||
make_test:
|
||||
steps:
|
||||
- checkout
|
||||
- run: make
|
||||
- run: make $BUILD_FLAGS
|
||||
- run: ./json2json -h # Print out the implementation we're using on this hardware
|
||||
- run: make amalgamate
|
||||
- run: make test
|
||||
|
@ -51,24 +59,24 @@ commands:
|
|||
cmake_build:
|
||||
steps:
|
||||
- cmake_prep
|
||||
- run: cmake $CMAKE_FLAGS $CMAKE_IMPLEMENTATION_FLAGS -DCMAKE_INSTALL_PREFIX:PATH=destination .
|
||||
- run: make all
|
||||
- run: cmake $CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX:PATH=destination .
|
||||
- run: make $BUILD_FLAGS all
|
||||
- run: tools/json2json -h # Print out the implementation we're using on this hardware
|
||||
|
||||
cmake_test:
|
||||
steps:
|
||||
- cmake_build
|
||||
- run: ctest --output-on-failure -L acceptance
|
||||
- run: ctest --output-on-failure -LE acceptance
|
||||
- run: ctest $CTEST_FLAGS -L acceptance
|
||||
- run: ctest $CTEST_FLAGS -LE acceptance
|
||||
|
||||
cmake_test_all:
|
||||
steps:
|
||||
- cmake_build
|
||||
- run: ctest --output-on-failure -L acceptance -LE per_implementation
|
||||
- run: SIMDJSON_FORCE_IMPLEMENTATION=haswell ctest --output-on-failure -L per_implementation
|
||||
- run: SIMDJSON_FORCE_IMPLEMENTATION=westmere ctest --output-on-failure -L per_implementation
|
||||
- run: SIMDJSON_FORCE_IMPLEMENTATION=fallback ctest --output-on-failure -L per_implementation
|
||||
- run: ctest --output-on-failure -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
|
||||
- run: ctest $CTEST_FLAGS -L acceptance -LE per_implementation
|
||||
- run: SIMDJSON_FORCE_IMPLEMENTATION=haswell ctest $CTEST_FLAGS -L per_implementation
|
||||
- run: SIMDJSON_FORCE_IMPLEMENTATION=westmere ctest $CTEST_FLAGS -L per_implementation
|
||||
- run: SIMDJSON_FORCE_IMPLEMENTATION=fallback ctest $CTEST_FLAGS -L per_implementation
|
||||
- run: ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
|
||||
|
||||
# we not only want cmake to build and run tests, but we want also a successful installation from which we can build, link and run programs
|
||||
cmake_install_test: # this version builds, install, test and then verify from the installation
|
||||
|
@ -94,7 +102,7 @@ jobs:
|
|||
sanitize-gcc7:
|
||||
description: Build and run tests on GCC 7 and AVX 2 with a cmake sanitize build
|
||||
executor: gcc7
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON, BUILD_FLAGS: "" } # gcc sanitize seems to have bugs with -j :(
|
||||
steps: [ cmake_test_all ]
|
||||
sanitize-clang6:
|
||||
description: Build and run tests on clang 6 and AVX 2 with a cmake sanitize build
|
||||
|
|
30
.drone.yml
30
.drone.yml
|
@ -231,7 +231,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ctest --output-on-failure
|
||||
- ctest -j --output-on-failure
|
||||
---
|
||||
kind: pipeline
|
||||
name: amd64_clang_cmake_no_exceptions
|
||||
|
@ -254,7 +254,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ctest --output-on-failure
|
||||
- ctest -j --output-on-failure
|
||||
---
|
||||
kind: pipeline
|
||||
name: amd64_clang_cmake_static
|
||||
|
@ -277,7 +277,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ctest --output-on-failure
|
||||
- ctest -j --output-on-failure
|
||||
---
|
||||
kind: pipeline
|
||||
name: amd64_gcc_cmake_static
|
||||
|
@ -300,7 +300,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ctest --output-on-failure
|
||||
- ctest -j --output-on-failure
|
||||
---
|
||||
kind: pipeline
|
||||
name: amd64_gcc_cmake_dynamic
|
||||
|
@ -323,7 +323,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ctest --output-on-failure
|
||||
- ctest -j --output-on-failure
|
||||
---
|
||||
kind: pipeline
|
||||
name: arm64_clang_cmake_dynamic
|
||||
|
@ -346,7 +346,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ctest --output-on-failure
|
||||
- ctest -j --output-on-failure
|
||||
---
|
||||
kind: pipeline
|
||||
name: arm64_gcc_cmake_dynamic
|
||||
|
@ -369,7 +369,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ctest --output-on-failure
|
||||
- ctest -j --output-on-failure
|
||||
---
|
||||
kind: pipeline
|
||||
name: arm64_clang_cmake_static
|
||||
|
@ -392,7 +392,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ctest --output-on-failure
|
||||
- ctest -j --output-on-failure
|
||||
---
|
||||
kind: pipeline
|
||||
name: arm64_gcc_cmake_static
|
||||
|
@ -415,7 +415,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ctest --output-on-failure
|
||||
- ctest -j --output-on-failure
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
|
@ -439,7 +439,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest --output-on-failure
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest -j --output-on-failure
|
||||
---
|
||||
kind: pipeline
|
||||
name: arm64_gcc_cmake_sanitize
|
||||
|
@ -462,7 +462,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest --output-on-failure
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest -j --output-on-failure
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
|
@ -486,7 +486,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest --output-on-failure
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest -j --output-on-failure
|
||||
---
|
||||
kind: pipeline
|
||||
name: amd64_gcc_cmake_sanitize
|
||||
|
@ -509,7 +509,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest --output-on-failure
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest -j --output-on-failure
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
|
@ -533,7 +533,7 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest --output-on-failure
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest -j --output-on-failure
|
||||
---
|
||||
kind: pipeline
|
||||
name: amd64_gcc_cmake_sanitize_noavx
|
||||
|
@ -556,4 +556,4 @@ steps:
|
|||
- mkdir build && cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- make -j
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest --output-on-failure
|
||||
- ASAN_OPTIONS="detect_leaks=0" ctest -j --output-on-failure
|
||||
|
|
Loading…
Reference in New Issue