From 63ad11c367cb986c0601a0353a8373dda8832ab8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2015 10:42:43 +0100 Subject: [PATCH 01/10] add support for `AppVeyor` CI for checking Windows builds --- CMakeLists.txt | 4 ++++ appveyor.yml | 28 ++++++++++++++++++++++++++++ readme.md | 4 ++++ test/unittest/documenttest.cpp | 2 +- test/unittest/valuetest.cpp | 2 -- 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 appveyor.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ed65c8..c96a599 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,10 @@ if(RAPIDJSON_BUILD_EXAMPLES) endif() if(RAPIDJSON_BUILD_TESTS) + if(MSVC11) + # required for VS2012 due to missing support for variadic templates + add_definitions(-D_VARIADIC_MAX=10) + endif(MSVC11) add_subdirectory(test) include(CTest) endif() diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..76ca6ce --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,28 @@ +version: 0.12.{build} + +configuration: +- Debug +- Release + +platform: +- x86 +- x64 + +environment: + matrix: + - VS_VERSION: 11 + - VS_VERSION: 12 + - VS_VERSION: 14 + +before_build: +- git submodule update --init --recursive +- if "%PLATFORM%" == "x86" set PLATFORM=win32 +- cmake -H. -BBuild/VS -G "Visual Studio %VS_VERSION%" -DCMAKE_GENERATOR_PLATFORM=%PLATFORM% -DBUILD_SHARED_LIBS=true -Wno-dev + +build: + project: Build\VS\RapidJSON.sln + parallel: true + verbosity: minimal + +test_script: +- cd Build\VS && ctest --verbose --timeout 120 --build-config %CONFIGURATION% diff --git a/readme.md b/readme.md index 05c0ec3..ee64108 100644 --- a/readme.md +++ b/readme.md @@ -6,6 +6,10 @@ Copyright (c) 2011-2014 Milo Yip (miloyip@gmail.com) [RapidJSON Documentation](http://miloyip.github.io/rapidjson/) +## Build status +* Tavis CI (Linux): [![Travis Build status](https://travis-ci.org/Kosta-Github/rapidjson)](https://travis-ci.org/Kosta-Github/rapidjson) +* AppVeyor (Windows): [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/3xw2isxomp5r4do7/branch/master?svg=true)](https://ci.appveyor.com/project/Kosta-Github/rapidjson/branch/master) + ## Introduction RapidJSON is a JSON parser and generator for C++. It was inspired by [RapidXml](http://rapidxml.sourceforge.net/). diff --git a/test/unittest/documenttest.cpp b/test/unittest/documenttest.cpp index f8be65a..93f7a3d 100644 --- a/test/unittest/documenttest.cpp +++ b/test/unittest/documenttest.cpp @@ -253,8 +253,8 @@ TEST(Document, Traits) { static_assert(!std::is_nothrow_constructible::value, ""); static_assert(!std::is_nothrow_default_constructible::value, ""); - static_assert(!std::is_nothrow_copy_constructible::value, ""); #ifndef _MSC_VER + static_assert(!std::is_nothrow_copy_constructible::value, ""); static_assert(std::is_nothrow_move_constructible::value, ""); #endif diff --git a/test/unittest/valuetest.cpp b/test/unittest/valuetest.cpp index 8644e1f..f09d4c1 100644 --- a/test/unittest/valuetest.cpp +++ b/test/unittest/valuetest.cpp @@ -54,9 +54,7 @@ TEST(Value, Traits) { #ifndef _MSC_VER static_assert(std::is_nothrow_constructible::value, ""); static_assert(std::is_nothrow_default_constructible::value, ""); -#endif static_assert(!std::is_nothrow_copy_constructible::value, ""); -#ifndef _MSC_VER static_assert(std::is_nothrow_move_constructible::value, ""); #endif From 0cbafabe53aa633a19cae02b912b193e6c8befe0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2015 11:14:47 +0100 Subject: [PATCH 02/10] omit `valgrind` tests for `Visual Studio` builds --- test/unittest/CMakeLists.txt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/test/unittest/CMakeLists.txt b/test/unittest/CMakeLists.txt index 41e5695..66cf0c6 100644 --- a/test/unittest/CMakeLists.txt +++ b/test/unittest/CMakeLists.txt @@ -21,12 +21,15 @@ add_test(NAME unittest COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) -add_test(NAME valgrind_unittest - COMMAND valgrind --leak-check=full --error-exitcode=1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) +if(NOT MSVC) + add_test(NAME valgrind_unittest + COMMAND valgrind --leak-check=full --error-exitcode=1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) -IF((NOT MSVC) AND (CMAKE_BUILD_TYPE STREQUAL "Debug")) -add_test(NAME symbol_check - COMMAND sh -c "objdump -t -C libnamespacetest.a | grep rapidjson ; test $? -ne 0" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) -ENDIF() + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + add_test(NAME symbol_check + COMMAND sh -c "objdump -t -C libnamespacetest.a | grep rapidjson ; test $? -ne 0" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + endif(CMAKE_BUILD_TYPE STREQUAL "Debug") + +endif(NOT MSVC) From f7e3752f0d84563f849c8d2330c99f021f8c9473 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2015 11:24:21 +0100 Subject: [PATCH 03/10] try to fix platform builds for `win32` --- appveyor.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 76ca6ce..7bac1dd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,23 +1,23 @@ -version: 0.12.{build} +ersion: 0.12.{build} configuration: - Debug - Release -platform: -- x86 -- x64 - environment: matrix: - VS_VERSION: 11 + VS_PLATFORM: win32 + - VS_VERSION: 11 + VS_PLATFORM: x64 - VS_VERSION: 12 - - VS_VERSION: 14 - + VS_PLATFORM: win32 + - VS_VERSION: 12 + VS_PLATFORM: x64 + before_build: - git submodule update --init --recursive -- if "%PLATFORM%" == "x86" set PLATFORM=win32 -- cmake -H. -BBuild/VS -G "Visual Studio %VS_VERSION%" -DCMAKE_GENERATOR_PLATFORM=%PLATFORM% -DBUILD_SHARED_LIBS=true -Wno-dev +- cmake -H. -BBuild/VS -G "Visual Studio %VS_VERSION%" -DCMAKE_GENERATOR_PLATFORM=%VS_PLATFORM% -DBUILD_SHARED_LIBS=true -Wno-dev build: project: Build\VS\RapidJSON.sln From 1338985a161d70949f065692099ad2233f3bf837 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2015 11:26:33 +0100 Subject: [PATCH 04/10] removed `tab` from `appveyor.yml` file --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 7bac1dd..893c8df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,7 +14,7 @@ environment: VS_PLATFORM: win32 - VS_VERSION: 12 VS_PLATFORM: x64 - + before_build: - git submodule update --init --recursive - cmake -H. -BBuild/VS -G "Visual Studio %VS_VERSION%" -DCMAKE_GENERATOR_PLATFORM=%VS_PLATFORM% -DBUILD_SHARED_LIBS=true -Wno-dev From cb69b2a6af90396030af643063368e5b9c3ebcb8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2015 11:27:25 +0100 Subject: [PATCH 05/10] fixed spelling of `version` --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 893c8df..39a08e2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -ersion: 0.12.{build} +version: 0.12.{build} configuration: - Debug From 119f1ddb04f52eda3dec94529ec598bdf63f9d4b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2015 11:36:46 +0100 Subject: [PATCH 06/10] [skip CI] fixed Travis CI badge to point to Milo's travis account --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index ee64108..7f5a7e9 100644 --- a/readme.md +++ b/readme.md @@ -7,7 +7,7 @@ Copyright (c) 2011-2014 Milo Yip (miloyip@gmail.com) [RapidJSON Documentation](http://miloyip.github.io/rapidjson/) ## Build status -* Tavis CI (Linux): [![Travis Build status](https://travis-ci.org/Kosta-Github/rapidjson)](https://travis-ci.org/Kosta-Github/rapidjson) +* Tavis CI (Linux): [![Travis Build status](https://travis-ci.org/miloyip/rapidjson)](https://travis-ci.org/miloyip/rapidjson) * AppVeyor (Windows): [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/3xw2isxomp5r4do7/branch/master?svg=true)](https://ci.appveyor.com/project/Kosta-Github/rapidjson/branch/master) ## Introduction From a843e639936489c544f45f7a9d55b022371d8d38 Mon Sep 17 00:00:00 2001 From: Kosta Date: Tue, 17 Feb 2015 11:39:30 +0100 Subject: [PATCH 07/10] fixed travis badge icon --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 7f5a7e9..7def42e 100644 --- a/readme.md +++ b/readme.md @@ -7,7 +7,7 @@ Copyright (c) 2011-2014 Milo Yip (miloyip@gmail.com) [RapidJSON Documentation](http://miloyip.github.io/rapidjson/) ## Build status -* Tavis CI (Linux): [![Travis Build status](https://travis-ci.org/miloyip/rapidjson)](https://travis-ci.org/miloyip/rapidjson) +* Tavis CI (Linux): [![Travis Build status](https://travis-ci.org/miloyip/rapidjson.png)](https://travis-ci.org/miloyip/rapidjson) * AppVeyor (Windows): [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/3xw2isxomp5r4do7/branch/master?svg=true)](https://ci.appveyor.com/project/Kosta-Github/rapidjson/branch/master) ## Introduction From 2c3b00341ab3249d6860f89a04f9f79dfbd5cd88 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2015 11:51:45 +0100 Subject: [PATCH 08/10] remove timeout parameter from `ctest` call (since AppVeyor HW seems to be very very slow...) --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 39a08e2..4c3928e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -25,4 +25,4 @@ build: verbosity: minimal test_script: -- cd Build\VS && ctest --verbose --timeout 120 --build-config %CONFIGURATION% +- cd Build\VS && ctest --verbose --build-config %CONFIGURATION% From c7672553decbc53f3616747802f5c89577e25ca3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2015 12:42:29 +0100 Subject: [PATCH 09/10] fix `doxygen` link --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 7def42e..965f436 100644 --- a/readme.md +++ b/readme.md @@ -47,7 +47,7 @@ RapidJSON is a header-only C++ library. Just copy the `include/rapidjson` folder RapidJSON uses following software as its dependencies: * [CMake](http://www.cmake.org) as a general build tool -* (optional)[Doxygen](http://www.goxygen.org) to build documentation +* (optional)[Doxygen](http://www.doxygen.org) to build documentation * (optional)[googletest](https://code.google.com/p/googletest/) for unit and performance testing To generate user documentation and run tests please proceed with the steps below: From a3398a862b768801c2c9160a216373b14f17bff0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2015 13:58:31 +0100 Subject: [PATCH 10/10] removed tabs from cmake config file --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c96a599..b30625f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,9 +54,9 @@ endif() if(RAPIDJSON_BUILD_TESTS) if(MSVC11) - # required for VS2012 due to missing support for variadic templates - add_definitions(-D_VARIADIC_MAX=10) - endif(MSVC11) + # required for VS2012 due to missing support for variadic templates + add_definitions(-D_VARIADIC_MAX=10) + endif(MSVC11) add_subdirectory(test) include(CTest) endif()