summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml146
-rw-r--r--README.md67
2 files changed, 127 insertions, 86 deletions
diff --git a/.travis.yml b/.travis.yml
index 37c61d2..eb35fc5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,25 +1,23 @@
-sudo: true
language: cpp
+
+dist: trusty
+sudo: true
+
env:
global:
secure: FNZOWYO89qsT9kQKngrYbpnqCTMCSCSQ2rnZ3l17KHctOfS554TTDS+dfxPYz2XHm6azYDVcyBSs2gWJ6TmXZZZqEfr3X4VV4ooAa9PoeIkvVlT654zjZwxeXPYXrHFXZh/ImLUGWjsxRaUHYOv5SzyNGcZv07dtLKVd0ykhbH4=
+
matrix:
include:
- - env: BUILD_TYPE=Release CPP=11 ASAN=On LIBCXX=On RUN_TEST=On
+
+ - env: BUILD_TYPE=Release CPP=11 ASAN=On LIBCXX=On RUN_TEST=On
os: osx
compiler: clang
- - env: CLANG_VERSION=3.7 BUILD_TYPE=Release CPP=11 ASAN=On LIBCXX=On
+
+ - env: BUILD_TYPE=Release CPP=11 ASAN=Off LLVM_VERSION=3.8.0 RUN_TEST=On CMAKE_VERSION=3.5 CMAKE_VERSION_MINOR=2
os: linux
- compiler: clang
- addons:
- apt:
- packages:
- - clang-3.7
- sources:
- - ubuntu-toolchain-r-test
- - llvm-toolchain-precise-3.7
- - llvm-toolchain-precise
- - env: GCC_VERSION=4.9 BUILD_TYPE=Release CPP=11 ASAN=Off LIBCXX=Off RUN_TEST=On
+
+ - env: BUILD_TYPE=Release CPP=11 ASAN=Off GCC_VERSION=4.9 RUN_TEST=On CMAKE_VERSION=3.5 CMAKE_VERSION_MINOR=2
os: linux
compiler: gcc
addons:
@@ -28,83 +26,109 @@ matrix:
- g++-4.9
sources:
- ubuntu-toolchain-r-test
- - env: CLANG_VERSION=3.7 BUILD_TYPE=Release CPP=11 ASAN=Off LIBCXX=On PROJECT=doc PUBLISH_DOCS=On
+
+ - env: BUILD_TYPE=Release CPP=11 ASAN=Off PROJECT=doc PUBLISH_DOCS=On LLVM_VERSION=3.8.0 CMAKE_VERSION=3.5 CMAKE_VERSION_MINOR=2
os: linux
- compiler: clang
addons:
apt:
packages:
- - clang-3.7
- graphviz
sources:
- ubuntu-toolchain-r-test
- - llvm-toolchain-precise-3.7
- - llvm-toolchain-precise
+
+cache:
+ directories:
+ - llvm-3.8.0
+ - cmake-3.5.2
+
before_install:
- - if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}";
- fi
- - if [ -n "$CLANG_VERSION" ]; then export CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}";
+ ############################################################################
+ # Install llvm
+ ############################################################################
+ - |
+ if [ -n "$LLVM_VERSION" ]; then
+ if [ -z "$(ls -A llvm-$LLVM_VERSION)" ]; then
+ travis_retry wget -O llvm-$LLVM_VERSION.tar.xz http://llvm.org/releases/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-x86_64-linux-gnu-ubuntu-14.04.tar.xz;
+ mkdir llvm-$LLVM_VERSION;
+ xzcat llvm-$LLVM_VERSION.tar.xz | tar -xvf - --strip 1 -C llvm-$LLVM_VERSION;
+ fi;
+ llvm-$LLVM_VERSION/bin/llvm-config --version;
+ export LLVM_CONFIG="llvm-$LLVM_VERSION/bin/llvm-config";
+ fi
+ ############################################################################
+ # Use gcc
+ ############################################################################
+ - |
+ if [ -n "$GCC_VERSION" ]; then
+ export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}";
fi
- - which $CXX
- - which $CC
############################################################################
# Install publish tools (doxygen)
############################################################################
- |
if [[ "$PUBLISH_DOCS" == "On" ]]; then
- sudo apt-add-repository -y ppa:libreoffice/libreoffice-4-2
- sudo apt-get update || echo "ignore update failure"
- sudo apt-get install doxygen
+ sudo apt-add-repository -y ppa:libreoffice/libreoffice-4-2;
+ sudo apt-get update || echo "ignore update failure";
+ sudo apt-get install doxygen;
fi
############################################################################
# Install a recent CMake
############################################################################
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
- CMAKE_URL="http://www.cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz"
- mkdir ${TRAVIS_BUILD_DIR}/cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/cmake
- export PATH=${TRAVIS_BUILD_DIR}/cmake/bin:${PATH}
+ if [ -z "$(ls -A cmake-$CMAKE_VERSION.$CMAKE_VERSION_MINOR)" ]; then
+ CMAKE_URL="http://www.cmake.org/files/v$CMAKE_VERSION/cmake-$CMAKE_VERSION.$CMAKE_VERSION_MINOR-Linux-x86_64.tar.gz";
+ mkdir cmake-$CMAKE_VERSION.$CMAKE_VERSION_MINOR;
+ travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake-$CMAKE_VERSION.$CMAKE_VERSION_MINOR;
+ fi;
+ export PATH=cmake-$CMAKE_VERSION.$CMAKE_VERSION_MINOR/bin:${PATH};
else
- xcode-select --install
- brew update || echo "suppress failures in order to ignore warnings"
- brew doctor || echo "suppress failures in order to ignore warnings"
- brew list cmake || echo "suppress failures in order to ignore warnings"
- sudo brew uninstall --force cmake || "suppress failures in order to ignore warnings"
- brew search cmake || echo "suppress failures in order to ignore warnings"
- brew install cmake || echo "suppress failures in order to ignore warnings"
- brew upgrade cmake || echo "suppress failures in order to ignore warnings"
- fi
- - cmake --version
+ xcode-select --install;
+ brew update || echo "suppress failures in order to ignore warnings";
+ brew doctor || echo "suppress failures in order to ignore warnings";
+ brew list cmake || echo "suppress failures in order to ignore warnings";
+ sudo brew uninstall --force cmake || "suppress failures in order to ignore warnings";
+ brew search cmake || echo "suppress failures in order to ignore warnings";
+ brew install cmake || echo "suppress failures in order to ignore warnings";
+ brew upgrade cmake || echo "suppress failures in order to ignore warnings";
+ fi;
+ cmake --version;
+install:
+ - |
+ export CXX_FLAGS="";
+ export CXX_LINKER_FLAGS="";
+ if [ -z "$BUILD_TYPE" ]; then
+ export BUILD_TYPE=Release;
+ fi;
+ if [ "$ASAN" == "On"]; then
+ export CXX_FLAGS="${CXX_FLAGS} -fsanitize=address,undefined,integer -fno-omit-frame-pointer -fno-sanitize=unsigned-integer-overflow";
+ fi;
+ if [ -n "$LLVM_VERSION" ]; then
+ CXX_FLAGS="${CXX_FLAGS} -D__extern_always_inline=inline";
+ fi;
############################################################################
- # Install LIBCXX
+ # Run cmake
############################################################################
- - if [ -n "$CLANG_VERSION" ]; then sh projects/scripts/install_libcxx.sh; fi
-install:
- - export CXX_FLAGS=""
- - export CXX_LINKER_FLAGS=""
- - if [ -z "$BUILD_TYPE" ]; then export BUILD_TYPE=Release; fi
- - if [ "$ASAN" == "On"]; then export CXX_FLAGS="${CXX_FLAGS} -fsanitize=address,undefined,integer
- -fno-omit-frame-pointer -fno-sanitize=unsigned-integer-overflow"; fi
- - if [ -n "$CLANG_VERSION" ]; then CXX_FLAGS="${CXX_FLAGS} -D__extern_always_inline=inline";
- fi
- - if [ "$LIBCXX" == "On" ]; then CXX_FLAGS="${CXX_FLAGS} -stdlib=libc++ -I/usr/include/c++/v1/";
- fi
- - if [ "$LIBCXX" == "On" ]; then CXX_LINKER_FLAGS="${CXX_FLAGS} -L/usr/lib/ -lc++";
- fi
- - cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${CXX_LINKER_FLAGS}"
+ - |
+ if [ -n "$GCC_VERSION" ]; then
+ cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${CXX_LINKER_FLAGS}";
+ fi;
+ if [ -n "$LLVM_VERSION" ]; then
+ cmake . -DLLVM_CONFIG=$(which ${LLVM_CONFIG}) -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${CXX_LINKER_FLAGS}";
+ fi;
script:
- - make VERBOSE=1 $PROJECT
- |
+ make VERBOSE=1 $PROJECT;
if [[ "$RUN_TEST" == "On" ]]; then
- cd build/test/
- ctest -V
- cd ../../
- fi
+ cd build/test/;
+ ctest -V;
+ cd ../../;
+ fi;
after_success:
- |
if [[ "$PUBLISH_DOCS" == "On" ]]; then
- sh projects/scripts/travis-doxygen.sh
- fi
+ sh projects/scripts/travis-doxygen.sh;
+ fi;
branches:
only:
- master
diff --git a/README.md b/README.md
index a271188..2b6109b 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,16 @@
The Reactive Extensions for Native (__RxCpp__) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in C++.
-Windows: [![Windows Status](http://img.shields.io/appveyor/ci/kirkshoop/RxCpp-446.svg?style=flat-square)](https://ci.appveyor.com/project/kirkshoop/rxcpp-446)
-Linux & OSX: [![Linux & Osx Status](http://img.shields.io/travis/Reactive-Extensions/RxCpp.svg?style=flat-square)](https://travis-ci.org/Reactive-Extensions/RxCpp)
-
-[![GitHub license](https://img.shields.io/github/license/Reactive-Extensions/RxCpp.svg?style=flat-square)](https://github.com/Reactive-Extensions/RxCpp)
-
-[![Join in on gitter.im](https://img.shields.io/gitter/room/Reactive-Extensions/RxCpp.svg?style=flat-square)](https://gitter.im/Reactive-Extensions/RxCpp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-[![doxygen documentation](https://img.shields.io/badge/documentation-latest-brightgreen.svg?style=flat-square)](http://reactive-extensions.github.io/RxCpp)
-
-Github: [![GitHub release](https://img.shields.io/github/release/Reactive-Extensions/RxCpp.svg?style=flat-square)](https://github.com/Reactive-Extensions/RxCpp/releases)
-[![GitHub commits](https://img.shields.io/github/commits-since/Reactive-Extensions/RxCpp/v2.3.0.svg?style=flat-square)](https://github.com/Reactive-Extensions/RxCpp)
-
-NuGet: [![NuGet version](http://img.shields.io/nuget/v/RxCpp.svg?style=flat-square)](http://www.nuget.org/packages/RxCpp/)
-[![NuGet downloads](http://img.shields.io/nuget/dt/RxCpp.svg?style=flat-square)](http://www.nuget.org/packages/RxCpp/)
+Platform | Status |
+----------- | :------------: |
+Windows | [![Windows Status](http://img.shields.io/appveyor/ci/kirkshoop/RxCpp-446.svg?style=flat-square)](https://ci.appveyor.com/project/kirkshoop/rxcpp-446)
+Linux & OSX | [![Linux & Osx Status](http://img.shields.io/travis/Reactive-Extensions/RxCpp.svg?style=flat-square)](https://travis-ci.org/Reactive-Extensions/RxCpp)
+
+Source | Badges |
+------------- | :---------------: |
+Github | [![GitHub license](https://img.shields.io/github/license/Reactive-Extensions/RxCpp.svg?style=flat-square)](https://github.com/Reactive-Extensions/RxCpp) [![GitHub release](https://img.shields.io/github/release/Reactive-Extensions/RxCpp.svg?style=flat-square)](https://github.com/Reactive-Extensions/RxCpp/releases) [![GitHub commits](https://img.shields.io/github/commits-since/Reactive-Extensions/RxCpp/v2.3.0.svg?style=flat-square)](https://github.com/Reactive-Extensions/RxCpp)
+Gitter.im | [![Join in on gitter.im](https://img.shields.io/gitter/room/Reactive-Extensions/RxCpp.svg?style=flat-square)](https://gitter.im/Reactive-Extensions/RxCpp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+NuGet | [![NuGet version](http://img.shields.io/nuget/v/RxCpp.svg?style=flat-square)](http://www.nuget.org/packages/RxCpp/)
+Documentation | [![doxygen documentation](https://img.shields.io/badge/documentation-latest-brightgreen.svg?style=flat-square)](http://reactive-extensions.github.io/RxCpp) [![reactivex intro](https://img.shields.io/badge/reactivex-intro-brightgreen.svg?style=flat-square)](http://reactivex.io/intro.html) [![rx marble diagrams](https://img.shields.io/badge/rx-marble-diagrams-brightgreen.svg?style=flat-square)](http://rxmarbles.com/)
#Example
Add ```Rx/v2/src``` to the include paths
@@ -102,11 +100,30 @@ int main()
}
```
-# Reactive Extensions:
+#Reactive Extensions
+
+>The ReactiveX Observable model allows you to treat streams of asynchronous events with the same sort of simple, composable operations that you use for collections of data items like arrays. It frees you from tangled webs of callbacks, and thereby makes your code more readable and less prone to bugs.
+Credit [ReactiveX.io](http://reactivex.io/intro.html)
+
+Java: [RxJava](https://github.com/ReactiveX/RxJava)
+JavaScript: [RxJS](https://github.com/Reactive-Extensions/RxJS)
+C#: [Rx.NET](https://github.com/Reactive-Extensions/Rx.NET)
+[More..](http://reactivex.io/languages.html)
-* Rx.NET: The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators.
-* RxJS: The Reactive Extensions for JavaScript (RxJS) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in JavaScript which can target both the browser and Node.js.
-* RxCpp: The Reactive Extensions for Native (RxCpp) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C++.
+###Resources
+
+* [Intro](http://reactivex.io/intro.html)
+* [Tutorials](http://reactivex.io/tutorials.html)
+* [Marble Diagrams](http://rxmarbles.com/)
+
+#Cloning RxCpp
+
+RxCpp uses a git submodule (in `ext/catch`) for the excellent [Catch](https://github.com/philsquared/Catch) library. The easiest way to ensure that the submodules are included in the clone is to add `--recursive` in the clone command.
+
+```shell
+git clone --recursive https://github.com/Reactive-Extensions/RxCpp.git
+cd RxCpp
+```
#Building RxCpp
@@ -125,13 +142,13 @@ cd projects/build
cmake -G"Xcode" ../CMake -B.
```
-####Visual Studio 13
+####Visual Studio 2013
```batch
mkdir projects\build
cd projects\build
-cmake -G"Visual Studio 12" ..\CMake -B.
+cmake -G"Visual Studio 14" ..\CMake -B.
+msbuild rxcpp.sln
```
-* Note: open in VC2013 and upgrade to the 2013 toolset
###makefile builds
@@ -171,18 +188,18 @@ The build only produces test and example binaries.
#Running tests
-* You can use the CMake test runner ```ctest```
-* You can run the test binaries directly ```rxcppv2_test_*```
+* You can use the CMake test runner `ctest`
+* You can run the test binaries directly `rxcppv2_test_*`
* Tests can be selected by name or tag
Example of by-tag
-```rxcppv2_test_subscription [perf]```
+`rxcppv2_test_subscription [perf]`
#Documentation
RxCpp uses Doxygen to generate project [documentation](http://reactive-extensions.github.io/RxCpp).
-When Doxygen+Graphviz is installed, CMake creates a special build task named ```doc```. It creates actual documentation and puts it to ```projects/doxygen/html/``` folder, which can be published to the `gh-pages` branch. Each merged pull request will build the docs and publish them.
+When Doxygen+Graphviz is installed, CMake creates a special build task named `doc`. It creates actual documentation and puts it to `projects/doxygen/html/` folder, which can be published to the `gh-pages` branch. Each merged pull request will build the docs and publish them.
[Developers Material](DeveloperManual.md)
@@ -190,4 +207,4 @@ When Doxygen+Graphviz is installed, CMake creates a special build task named ```
Before submitting a feature or substantial code contribution please discuss it with the team and ensure it follows the product roadmap. Note that all code submissions will be rigorously reviewed and tested by the Rx Team, and only those that meet an extremely high bar for both quality and design/roadmap appropriateness will be merged into the source.
-You will be promted to submit a Contributor License Agreement form after submitting your pull request. This needs to only be done once for any Microsoft OSS project. Fill in the [Contributor License Agreement](https://cla2.msopentech.com/) (CLA).
+You will be prompted to submit a Contributor License Agreement form after submitting your pull request. This needs to only be done once for any Microsoft OSS project. Fill in the [Contributor License Agreement](https://cla2.msopentech.com/) (CLA).