Merge pull request #258 from pah/fixes/ci-debug-noperftest
Skip running perftest on CI debug builds (Appveyer; Travis)
This commit is contained in:
commit
3a4835e080
5
.gitignore
vendored
5
.gitignore
vendored
@ -2,10 +2,10 @@
|
|||||||
!/bin/data
|
!/bin/data
|
||||||
!/bin/encodings
|
!/bin/encodings
|
||||||
!/bin/jsonchecker
|
!/bin/jsonchecker
|
||||||
|
/build
|
||||||
/doc/html
|
/doc/html
|
||||||
/doc/doxygen_*.db
|
/doc/doxygen_*.db
|
||||||
/thirdparty/lib
|
*.a
|
||||||
/intermediate
|
|
||||||
|
|
||||||
# Temporary files created during CMake build
|
# Temporary files created during CMake build
|
||||||
CMakeCache.txt
|
CMakeCache.txt
|
||||||
@ -20,4 +20,3 @@ Testing
|
|||||||
install_manifest.txt
|
install_manifest.txt
|
||||||
Doxyfile
|
Doxyfile
|
||||||
DartConfiguration.tcl
|
DartConfiguration.tcl
|
||||||
/build/*
|
|
22
.travis.yml
22
.travis.yml
@ -6,35 +6,39 @@ compiler:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- CONF=debug ARCH=x86_64 ARCH_FLAGS=""
|
- CONF=debug ARCH=x86_64
|
||||||
- CONF=release ARCH=x86_64 ARCH_FLAGS=""
|
- CONF=release ARCH=x86_64
|
||||||
- CONF=debug ARCH=x86 ARCH_FLAGS="-m32"
|
- CONF=debug ARCH=x86
|
||||||
- CONF=release ARCH=x86 ARCH_FLAGS="-m32"
|
- CONF=release ARCH=x86
|
||||||
global:
|
global:
|
||||||
|
- ARCH_FLAGS_x86='-m32'
|
||||||
|
- ARCH_FLAGS_x86_64=''
|
||||||
- GITHUB_REPO='miloyip/rapidjson'
|
- GITHUB_REPO='miloyip/rapidjson'
|
||||||
- secure: "HrsaCb+N66EG1HR+LWH1u51SjaJyRwJEDzqJGYMB7LJ/bfqb9mWKF1fLvZGk46W5t7TVaXRDD5KHFx9DPWvKn4gRUVkwTHEy262ah5ORh8M6n/6VVVajeV/AYt2C0sswdkDBDO4Xq+xy5gdw3G8s1A4Inbm73pUh+6vx+7ltBbk="
|
- secure: "HrsaCb+N66EG1HR+LWH1u51SjaJyRwJEDzqJGYMB7LJ/bfqb9mWKF1fLvZGk46W5t7TVaXRDD5KHFx9DPWvKn4gRUVkwTHEy262ah5ORh8M6n/6VVVajeV/AYt2C0sswdkDBDO4Xq+xy5gdw3G8s1A4Inbm73pUh+6vx+7ltBbk="
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
- sudo apt-get update -qq
|
||||||
- sudo apt-get install -qq cmake doxygen valgrind
|
- sudo apt-get install -qq cmake doxygen valgrind
|
||||||
- if [ "$ARCH" = "x86" ]; then sudo apt-get install -qq g++-multilib libc6-dbg:i386; fi
|
- if [ "$ARCH" = "x86" ]; then sudo apt-get install -qq g++-multilib libc6-dbg:i386; fi
|
||||||
|
|
||||||
install: true
|
install: true
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
|
# hack to avoid Valgrind bug (https://bugs.kde.org/show_bug.cgi?id=326469),
|
||||||
|
# exposed by merging PR#163 (using -march=native)
|
||||||
|
- sed -i 's/march=native/msse4.2/' CMakeLists.txt
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- >
|
- >
|
||||||
|
eval "ARCH_FLAGS=\${ARCH_FLAGS_${ARCH}}" ;
|
||||||
(cd build && cmake
|
(cd build && cmake
|
||||||
-DRAPIDJSON_HAS_STDSTRING=ON
|
-DRAPIDJSON_HAS_STDSTRING=ON
|
||||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||||
-DCMAKE_BUILD_TYPE=$CONF
|
-DCMAKE_BUILD_TYPE=$CONF
|
||||||
-DCMAKE_C_FLAGS="$ARCH_FLAGS" ..)
|
-DCMAKE_CXX_FLAGS="$ARCH_FLAGS" ..)
|
||||||
# hack to avoid Valgrind bug (https://bugs.kde.org/show_bug.cgi?id=326469),
|
|
||||||
# exposed by merging PR#163 (using -march=native)
|
|
||||||
# - (cd build/gmake && sed -i 's/march=native/msse4.2/' *.make)
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cd build
|
- cd build
|
||||||
- make tests
|
- make tests
|
||||||
- make examples
|
- make examples
|
||||||
- ctest -V
|
- ctest -V `[ "$CONF" = "release" ] || echo "-E perftest"`
|
||||||
- make travis_doc
|
- make travis_doc
|
||||||
|
@ -23,6 +23,13 @@ if(RAPIDJSON_HAS_STDSTRING)
|
|||||||
add_definitions(-DRAPIDJSON_HAS_STDSTRING)
|
add_definitions(-DRAPIDJSON_HAS_STDSTRING)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra")
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra")
|
||||||
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
#add extra search paths for libraries and includes
|
#add extra search paths for libraries and includes
|
||||||
SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in")
|
SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in")
|
||||||
@ -36,9 +43,7 @@ ELSEIF(WIN32)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
SET(CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" CACHE PATH "The directory cmake fiels are installed in")
|
SET(CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" CACHE PATH "The directory cmake fiels are installed in")
|
||||||
|
|
||||||
|
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/include)
|
include_directories(${CMAKE_SOURCE_DIR}/include)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RAPIDJSON_CXX_FLAGS}")
|
|
||||||
|
|
||||||
if(RAPIDJSON_BUILD_DOC)
|
if(RAPIDJSON_BUILD_DOC)
|
||||||
add_subdirectory(doc)
|
add_subdirectory(doc)
|
||||||
|
@ -25,4 +25,4 @@ build:
|
|||||||
verbosity: minimal
|
verbosity: minimal
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- cd Build\VS && ctest --verbose --build-config %CONFIGURATION%
|
- cd Build\VS && if %CONFIGURATION%==Debug (ctest --verbose -E perftest --build-config %CONFIGURATION%) else (ctest --verbose --build-config %CONFIGURATION%)
|
||||||
|
@ -14,6 +14,14 @@ set(EXAMPLES
|
|||||||
simplewriter
|
simplewriter
|
||||||
tutorial)
|
tutorial)
|
||||||
|
|
||||||
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default")
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default")
|
||||||
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
foreach (example ${EXAMPLES})
|
foreach (example ${EXAMPLES})
|
||||||
add_executable(${example} ${example}/${example}.cpp)
|
add_executable(${example} ${example}/${example}.cpp)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@ -1,15 +1,26 @@
|
|||||||
set(UNITTEST_SOURCES
|
set(UNITTEST_SOURCES
|
||||||
|
bigintegertest.cpp
|
||||||
documenttest.cpp
|
documenttest.cpp
|
||||||
encodedstreamtest.cpp
|
encodedstreamtest.cpp
|
||||||
encodingstest.cpp
|
encodingstest.cpp
|
||||||
filestreamtest.cpp
|
filestreamtest.cpp
|
||||||
jsoncheckertest.cpp
|
jsoncheckertest.cpp
|
||||||
|
namespacetest.cpp
|
||||||
readertest.cpp
|
readertest.cpp
|
||||||
|
stringbuffertest.cpp
|
||||||
|
strtodtest.cpp
|
||||||
unittest.cpp
|
unittest.cpp
|
||||||
unittest.h
|
|
||||||
valuetest.cpp
|
valuetest.cpp
|
||||||
writertest.cpp)
|
writertest.cpp)
|
||||||
|
|
||||||
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Weffc++ -Wswitch-default")
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Weffc++ -Wswitch-default")
|
||||||
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(namespacetest STATIC namespacetest.cpp)
|
add_library(namespacetest STATIC namespacetest.cpp)
|
||||||
|
|
||||||
add_executable(unittest ${UNITTEST_SOURCES})
|
add_executable(unittest ${UNITTEST_SOURCES})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user