diff options
-rw-r--r-- | .ci.cmake | 5 | ||||
-rw-r--r-- | .docs.cmake | 36 | ||||
-rw-r--r-- | .travis.yml | 20 | ||||
-rw-r--r-- | Readme.md | 8 | ||||
m--------- | doc/html | 12 | ||||
-rw-r--r-- | include/boost/afio/v2.0/config.hpp | 10 | ||||
-rw-r--r-- | release_notes.md | 22 |
7 files changed, 105 insertions, 8 deletions
@@ -23,7 +23,7 @@ ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) ctest_start("Experimental") ctest_configure() ctest_build() -ctest_test() +ctest_test(RETURN_VALUE retval) merge_junit_results_into_ctest_xml() if(WIN32) if(EXISTS build/bin/Release/afio_dl-2.0-Windows-x64-Release.dll) @@ -55,3 +55,6 @@ else() endif() endif() ctest_submit() +if(NOT retval EQUAL 0) + message(FATAL_ERROR "FATAL: Running tests exited with ${retval}") +endif() diff --git a/.docs.cmake b/.docs.cmake new file mode 100644 index 00000000..c914c579 --- /dev/null +++ b/.docs.cmake @@ -0,0 +1,36 @@ +# CTest script for a CI to submit to CDash a documentation generation run +cmake_minimum_required(VERSION 3.0 FATAL_ERROR) +# Bring in the Boost lite cmake tooling +list(FIND CMAKE_MODULE_PATH "boost-lite" boost_lite_idx) +if(${boost_lite_idx} EQUAL -1) + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../boost-lite/cmake") + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../boost-lite/cmake") + set(CTEST_BOOSTLITE_SCRIPTS "${CMAKE_CURRENT_SOURCE_DIR}/../boost-lite/scripts") + elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include/boost/afio/boost-lite/cmake") + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/include/boost/afio/boost-lite/cmake") + set(CTEST_BOOSTLITE_SCRIPTS "${CMAKE_CURRENT_SOURCE_DIR}/include/boost/afio/boost-lite/scripts") + else() + message(FATAL_ERROR "FATAL: A copy of boost-lite cannot be found. Try running 'git submodule update --init --recursive'") + endif() +endif() +include(BoostLiteUtils) + + +CONFIGURE_CTEST_SCRIPT_FOR_CDASH("afio" "build") +ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) +include(FindGit) +#checked_execute_process("git reset" +# COMMAND "${GIT_EXECUTABLE}" checkout gh-pages +# COMMAND "${GIT_EXECUTABLE}" reset --hard cc293d14a48bf1ee3fb78743c3ad5cf61d63f3ff +# WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/doc/html" +#) + +ctest_start("Documentation") +ctest_configure() +ctest_build(TARGET afio_docs) +#checked_execute_process("git commit" +# COMMAND "${GIT_EXECUTABLE}" commit -a -m "upd" +# COMMAND "${GIT_EXECUTABLE}" push -f origin gh-pages +# WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/doc/html" +#) +ctest_submit() diff --git a/.travis.yml b/.travis.yml index 5edee756..81db15ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,9 +21,11 @@ addons: - python3 - cmake - cmake-data + - doxygen env: - __="cmake tests" NAME=TravisLinuxWorker + - __="Documentation" NAME=TravisDocumentation cache: apt: true @@ -52,7 +54,25 @@ before_install: script: - if [ "$__" = "cmake tests" ]; then + TARNAME=boost.afio-v2.0-source-`date +%Y%m%d%H%M`.tar.xz; + tar cfJ ../$TARNAME . --exclude llvm* --exclude .git; CXX=g++-6 ctest -S .ci.cmake -V; + # && curl --data-binary @../$TARNAME https://dedi4.nedprod.com/static/files/upload/$TARNAME; + fi + - + if [ "$__" = "Documentation" ]; then + git config --global push.default simple; + git config --global user.name "Jenkins nedprod CI"; + git config --global user.email "foo@nowhere"; + cd doc/html; + git checkout gh-pages; + cd ../..; + CXX=g++-6 ctest -S .docs.cmake -V; + cd doc/html; + git add . || true; + git commit -a -m "Travis CI updates documentation" || true; + git push -f https://jenkins-nedprod:$JENKINS_NEDPROD_PASSWORD@github.com/ned14/boost.afio gh-pages; + cd ../..; fi after_success: @@ -1,9 +1,7 @@ This is the beginnings of the post-peer-review AFIO v2 rewrite. You can view its documentation at https://ned14.github.io/boost.afio/ -<b>master branch test status</b> Linux: [![Build Status](https://travis-ci.org/ned14/boost.afio.svg?branch=master)](https://travis-ci.org/ned14/boost.afio) Windows: [![Build status](https://ci.appveyor.com/api/projects/status/ox59o2r276xbmef7/branch/master?svg=true)](https://ci.appveyor.com/project/ned14/boost-afio/branch/master) Coverage: Boost.KernelTest support for coveralls.io still todo - -<b>CMake dashboard</b>: http://my.cdash.org/index.php?project=Boost.AFIO +<b>master branch test status</b> Linux: [![Build Status](https://travis-ci.org/ned14/boost.afio.svg?branch=master)](https://travis-ci.org/ned14/boost.afio) Windows: [![Build status](https://ci.appveyor.com/api/projects/status/ox59o2r276xbmef7/branch/master?svg=true)](https://ci.appveyor.com/project/ned14/boost-afio/branch/master) Coverage: Boost.KernelTest support for coveralls.io still todo <b>CMake dashboard</b>: http://my.cdash.org/index.php?project=Boost.AFIO CMake todos: - Add doxygen generation support @@ -11,7 +9,9 @@ CMake todos: successful new docs to github (resetting the gh-pages SHA) - cmake --build . --target afio_docs - Get travis to push latest doxygen docs to github for me - - Merge all these improvements from AFIO back into Outcome +- Push artifacts to: + - curl --data-binary @test.txt https://dedi4.nedprod.com/static/files/upload +- Any dependency .natvis need to be compiled in! - For non-embedded config, cmake should stamp git submodule SHAs so I can dispense with the upd method of submodule stamping - Static library edition appears to not be encoding extended error code detail? diff --git a/doc/html b/doc/html -Subproject 6783b66e7fe16ebf6f04eb1526928654741e125 +Subproject cc293d14a48bf1ee3fb78743c3ad5cf61d63f3f diff --git a/include/boost/afio/v2.0/config.hpp b/include/boost/afio/v2.0/config.hpp index 338cbfff..30de78c5 100644 --- a/include/boost/afio/v2.0/config.hpp +++ b/include/boost/afio/v2.0/config.hpp @@ -30,7 +30,9 @@ DEALINGS IN THE SOFTWARE. */ //! \file config.hpp Configures a compiler environment for AFIO header and source code + //! \defgroup config Configuration macros + #define BOOST_AFIO_CONFIGURED #if !defined(BOOST_AFIO_HEADERS_ONLY) && !defined(BOOST_ALL_DYN_LINK) @@ -467,6 +469,14 @@ using namespace BOOST_OUTCOME_V1_NAMESPACE; using BOOST_OUTCOME_V1_NAMESPACE::outcome; using BOOST_OUTCOME_V1_NAMESPACE::make_errored_result; using BOOST_OUTCOME_V1_NAMESPACE::make_errored_outcome; +#if DOXYGEN_SHOULD_SKIP_THIS +/*! \brief Please see https://ned14.github.io/boost.outcome/classboost_1_1outcome_1_1v1__xxx_1_1basic__monad.html +*/ +template<class T> using result = boost::outcome::result<T>; +/*! \brief Please see https://ned14.github.io/boost.outcome/classboost_1_1outcome_1_1v1__xxx_1_1basic__monad.html +*/ +template<class T> using outcome = boost::outcome::outcome<T>; +#endif BOOST_AFIO_V2_NAMESPACE_END diff --git a/release_notes.md b/release_notes.md index a27644f8..ca66fa8e 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,9 +1,24 @@ Herein lies the beginnings of the proposed Boost.AFIO v2 post-peer-review rewrite. Its github source code repository lives at https://github.com/ned14/boost.afio. -\note Note that this code is so early alpha that no test code, let alone unit test code, exists -yet. Nobody should use this code for anything serious until the unit tests are in place and -being nightly tested via continuous integration. +<b>master branch test status</b> Linux: [![Build Status](https://travis-ci.org/ned14/boost.afio.svg?branch=master)](https://travis-ci.org/ned14/boost.afio) Windows: [![Build status](https://ci.appveyor.com/api/projects/status/ox59o2r276xbmef7/branch/master?svg=true)](https://ci.appveyor.com/project/ned14/boost-afio/branch/master) Coverage: Boost.KernelTest support for coveralls.io still todo <b>CMake dashboard</b>: http://my.cdash.org/index.php?project=Boost.AFIO + +\note Note that this code is so early alpha that no substantial test code exists +yet. Nobody should use this code for anything serious. + +You need these compilers or better: +- GCC 5.0 +- clang 3.7 +- VS2015 Update 2 +- clang 3.7 with Microsoft Codegen ("winclang") + +It has two mandatory dependencies: + +1. https://github.com/ned14/boost-lite, a minimal emulation of Boost for C++ 11. +2. https://github.com/ned14/boost.outcome, a factory and family of policy driven lightweight monads with +the specialisations of `outcome<T>`, `result<T>` and `option<T>`. AFIO v2 leans heavily +on `result<T>` especially, almost every AFIO v2 API returns one of those. + ## Architecture and design: @@ -23,6 +38,7 @@ being nightly tested via continuous integration. | ✔ | | Absolute and interval deadline timed i/o throughout (made possible thanks to dropping XP support). | ✔ | | Dependency on ASIO/Networking TS removed completely. | ✔ | | Three choices of algorithm implementing a shared filing system mutex. +| ✔ | | Uses CMake, CTest, CDash and CPack with automatic usage of C++ Modules or precompiled headers where available. | P | | New multithreaded kernel based testing infrastructure based on LLVM which can permute/fuzz/<b>edge</b> coverage/mock each test kernel with choices of asan/lsan/msan/ubsan/none sanitisation. This new test infrastructure should make possible eventual <b>formal proof</b> that AFIO's implementation is mathematically correct. |