diff --git a/.travis.yml b/.travis.yml index d113e625e..a2cd58971 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ cache: directories: - ${HOME}/deps/cmake - ${HOME}/deps/protobuf +# - ${HOME}/deps/proto2cpp # Handle dependencies in separate directory. before_install: @@ -21,6 +22,7 @@ before_install: - mkdir -p "${DEPS_DIR}" - cd "${DEPS_DIR}" +# Install necessary packages. install: # Install a recent version of CMake - | @@ -33,12 +35,34 @@ install: PROTOBUF_URL="https://github.com/google/protobuf/releases/download/v3.2.0/protobuf-cpp-3.2.0.tar.gz" if [ ! -f ${DEPS_DIR}/protobuf/install/bin/protoc ] ; then mkdir -p protobuf ; travis_retry wget --no-check-certificate --quiet -O - ${PROTOBUF_URL} | tar --strip-components=1 -xz -C protobuf ; cd protobuf ; ./configure --prefix=${DEPS_DIR}/protobuf/install ; make ; make install ; fi export PATH=${DEPS_DIR}/protobuf/install/bin:${PATH} + + # Install proto2cpp for doxygen + - | + PROTO2CPP_URL="https://github.com/OpenSimulationInterface/proto2cpp.git" + if [ ! -f ${DEPS_DIR}/proto2cpp ] ; then mkdir -p proto2cpp ; git clone ${PROTO2CPP_URL} ${DEPS_DIR}/proto2cpp ; fi + +# Environment variables. +env: + global: + - GH_REPO_ORG=`echo $TRAVIS_REPO_SLUG | cut -d "/" -f 1` + - GH_REPO_NAME=`echo $TRAVIS_REPO_SLUG | cut -d "/" -f 2` + - GH_REPO_REF="github.com/$GH_REPO_ORG/$GH_REPO_NAME.git" + +# Addons necessary for documentation. +addons: + apt: + packages: + - doxygen + - doxygen-doc + - doxygen-latex + - doxygen-gui + - graphviz # Change directory back to default build directory. before_script: - cd "${TRAVIS_BUILD_DIR}" -# Run the build script. +# Run the build script and generate documentation. script: - mkdir -p build - cd build @@ -50,3 +74,20 @@ script: - python setup.py sdist - cd build - cmake --build . --target install + - cd .. + - echo "" >> VERSION + - echo "VERSION_PATCH = \"GitHub_MasterBranch\"" >> VERSION + - cd build + - cmake -D FILTER_PROTO2CPP_PY_PATH=${DEPS_DIR}/proto2cpp .. + - doxygen + - cd .. + +# Deploy the documentation on github (only for master branch). +deploy: + provider: pages + skip_cleanup: true + local_dir: doc/html + keep-history: true + github_token: ${GH_REPO_TOKEN} + on: + branch: master diff --git a/VERSION b/VERSION index acc700dd0..69cb18ed1 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ VERSION_MAJOR = 3 VERSION_MINOR = 0 -VERSION_PATCH = 0 +VERSION_PATCH = 1