diff --git a/.travis.sh b/.travis.sh index 6a4c1e204d4..02959aa9a33 100755 --- a/.travis.sh +++ b/.travis.sh @@ -27,69 +27,30 @@ function before_install () fi } -function build () -{ - case $CC in - clang ) build_lib;; - gcc ) build_lib_core;; - esac -} - -function build_lib () +function build_all () { # A complete build # Configure mkdir $BUILD_DIR && cd $BUILD_DIR cmake -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ -DPCL_ONLY_CORE_POINT_TYPES=ON \ - -DPCL_QT_VERSION=4 \ - -DBUILD_simulation=ON \ - -DBUILD_global_tests=OFF \ - -DBUILD_examples=OFF \ - -DBUILD_tools=OFF \ - -DBUILD_apps=OFF \ - $PCL_DIR - # Build - make -j2 -} - -function build_examples () -{ - # A complete build - # Configure - mkdir $BUILD_DIR && cd $BUILD_DIR - cmake -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ - -DPCL_ONLY_CORE_POINT_TYPES=ON \ - -DPCL_QT_VERSION=4 \ + -DPCL_QT_VERSION=5 \ -DBUILD_simulation=ON \ -DBUILD_global_tests=OFF \ -DBUILD_examples=ON \ - -DBUILD_tools=OFF \ - -DBUILD_apps=OFF \ - $PCL_DIR - # Build - make -j2 -} - -function build_tools () -{ - # A complete build - # Configure - mkdir $BUILD_DIR && cd $BUILD_DIR - cmake -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ - -DPCL_ONLY_CORE_POINT_TYPES=ON \ - -DPCL_QT_VERSION=4 \ - -DBUILD_simulation=ON \ - -DBUILD_global_tests=OFF \ - -DBUILD_examples=OFF \ -DBUILD_tools=ON \ - -DBUILD_apps=OFF \ + -DBUILD_apps=ON \ + -DBUILD_apps_3d_rec_framework=ON \ + -DBUILD_apps_cloud_composer=ON \ + -DBUILD_apps_in_hand_scanner=ON \ + -DBUILD_apps_modeler=ON \ + -DBUILD_apps_point_cloud_editor=ON \ $PCL_DIR # Build make -j2 } -function build_apps () +function test_all () { # A complete build # Configure @@ -97,167 +58,23 @@ function build_apps () cmake -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ -DPCL_ONLY_CORE_POINT_TYPES=ON \ -DPCL_QT_VERSION=4 \ - -DBUILD_simulation=OFF \ - -DBUILD_outofcore=OFF \ - -DBUILD_people=OFF \ - -DBUILD_global_tests=OFF \ + -DBUILD_simulation=ON \ + -DBUILD_global_tests=ON \ -DBUILD_examples=OFF \ -DBUILD_tools=OFF \ - -DBUILD_apps=ON \ - $PCL_DIR - # Build - make -j2 -} - -function build_lib_core () -{ - # A reduced build, only pcl_common - # Configure - mkdir $BUILD_DIR && cd $BUILD_DIR - cmake -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ - -DPCL_ONLY_CORE_POINT_TYPES=ON \ - -DBUILD_2d=OFF \ - -DBUILD_features=OFF \ - -DBUILD_filters=OFF \ - -DBUILD_geometry=OFF \ - -DBUILD_global_tests=OFF \ - -DBUILD_io=OFF \ - -DBUILD_kdtree=OFF \ - -DBUILD_keypoints=OFF \ - -DBUILD_ml=OFF \ - -DBUILD_octree=OFF \ - -DBUILD_outofcore=OFF \ - -DBUILD_people=OFF \ - -DBUILD_recognition=OFF \ - -DBUILD_registration=OFF \ - -DBUILD_sample_consensus=OFF \ - -DBUILD_search=OFF \ - -DBUILD_segmentation=OFF \ - -DBUILD_stereo=OFF \ - -DBUILD_surface=OFF \ - -DBUILD_tools=OFF \ - -DBUILD_tracking=OFF \ - -DBUILD_visualization=OFF \ - $PCL_DIR - # Build - make -j2 -} - -function test_core () -{ - # Configure - mkdir $BUILD_DIR && cd $BUILD_DIR - cmake -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ - -DPCL_ONLY_CORE_POINT_TYPES=ON \ - -DBUILD_tools=OFF \ - -DBUILD_examples=OFF \ -DBUILD_apps=OFF \ - -DBUILD_simulation=OFF \ - -DBUILD_stereo=OFF \ - -DBUILD_tracking=OFF \ - -DBUILD_global_tests=ON \ - -DBUILD_2d=ON \ - -DBUILD_features=ON \ - -DBUILD_filters=ON \ - -DBUILD_geometry=ON \ - -DBUILD_io=ON \ - -DBUILD_kdtree=ON \ - -DBUILD_keypoints=ON \ - -DBUILD_ml=OFF \ - -DBUILD_octree=ON \ - -DBUILD_outofcore=ON \ - -DBUILD_people=OFF \ - -DBUILD_recognition=OFF \ - -DBUILD_registration=OFF \ - -DBUILD_sample_consensus=ON \ - -DBUILD_search=ON \ - -DBUILD_segmentation=OFF \ - -DBUILD_simulation=OFF \ - -DBUILD_surface=OFF \ - -DBUILD_visualization=ON \ - -DBUILD_tests_2d=ON \ - -DBUILD_tests_common=ON \ - -DBUILD_tests_features=ON \ - -DBUILD_tests_filters=OFF \ - -DBUILD_tests_geometry=ON \ - -DBUILD_tests_io=ON \ - -DBUILD_tests_kdtree=ON \ - -DBUILD_tests_keypoints=ON \ - -DBUILD_tests_octree=ON \ - -DBUILD_tests_outofcore=ON \ - -DBUILD_tests_people=OFF \ - -DBUILD_tests_recognition=OFF \ - -DBUILD_tests_registration=OFF \ - -DBUILD_tests_sample_consensus=ON \ - -DBUILD_tests_search=ON \ - -DBUILD_tests_segmentation=OFF \ - -DBUILD_tests_surface=OFF \ - -DBUILD_tests_visualization=ON \ $PCL_DIR - # Build and run tests + # Build make -j2 tests } -function test_ext () -{ - # Configure - mkdir $BUILD_DIR && cd $BUILD_DIR - cmake -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ - -DPCL_ONLY_CORE_POINT_TYPES=ON \ - -DBUILD_tools=OFF \ - -DBUILD_examples=OFF \ - -DBUILD_apps=OFF \ - -DBUILD_simulation=OFF \ - -DBUILD_stereo=OFF \ - -DBUILD_tracking=OFF \ - -DBUILD_global_tests=ON \ - -DBUILD_2d=ON \ - -DBUILD_features=ON \ - -DBUILD_filters=ON \ - -DBUILD_geometry=ON \ - -DBUILD_io=ON \ - -DBUILD_kdtree=ON \ - -DBUILD_keypoints=OFF \ - -DBUILD_ml=ON \ - -DBUILD_octree=ON \ - -DBUILD_outofcore=OFF \ - -DBUILD_people=ON \ - -DBUILD_recognition=ON \ - -DBUILD_registration=ON \ - -DBUILD_sample_consensus=ON \ - -DBUILD_search=ON \ - -DBUILD_segmentation=ON \ - -DBUILD_surface=ON \ - -DBUILD_visualization=ON \ - -DBUILD_tests_2d=OFF \ - -DBUILD_tests_common=OFF \ - -DBUILD_tests_features=OFF \ - -DBUILD_tests_filters=ON \ - -DBUILD_tests_geometry=OFF \ - -DBUILD_tests_io=OFF \ - -DBUILD_tests_kdtree=OFF \ - -DBUILD_tests_keypoints=OFF \ - -DBUILD_tests_octree=OFF \ - -DBUILD_tests_outofcore=OFF \ - -DBUILD_tests_people=ON \ - -DBUILD_tests_recognition=ON \ - -DBUILD_tests_registration=ON \ - -DBUILD_tests_sample_consensus=OFF \ - -DBUILD_tests_search=OFF \ - -DBUILD_tests_segmentation=ON \ - -DBUILD_tests_surface=ON \ - -DBUILD_tests_visualization=OFF \ - $PCL_DIR - # Build and run tests - make -j2 tests -} function doc () { - # Do not generate documentation for pull requests - if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then exit; fi # Install sphinx + pip3 install --user setuptools pip3 install --user Jinja2==2.8.1 sphinx sphinxcontrib-doxylink + # Configure mkdir $BUILD_DIR && cd $BUILD_DIR cmake -DDOXYGEN_USE_SHORT_NAMES=OFF \ @@ -269,6 +86,19 @@ function doc () git config --global user.email "documentation@pointclouds.org" git config --global user.name "PointCloudLibrary (via TravisCI)" + cd $DOC_DIR + git clone https://github.com/PointCloudLibrary/documentation.git . + + # Generate documentation and tutorials + cd $BUILD_DIR + make doc tutorials advanced + + # Do not push documentation in pull requests + if [[ $TRAVIS_EVENT_TYPE == 'pull_request' ]] ; then exit; fi + + # update the remote url to git-ssh protocol for commit + git remote set-url origin git@github.com:PointCloudLibrary/documentation.git + if [ -z "$id_rsa_{1..23}" ]; then echo 'No $id_rsa_{1..23} found !' ; exit 1; fi echo -n $id_rsa_{1..23} >> ~/.ssh/travis_rsa_64 @@ -278,13 +108,6 @@ function doc () echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - cd $DOC_DIR - git clone git@github.com:PointCloudLibrary/documentation.git . - - # Generate documentation and tutorials - cd $BUILD_DIR - make doc tutorials advanced - # Upload to GitHub if generation succeeded if [[ $? == 0 ]]; then # Copy generated tutorials to the doc directory @@ -302,12 +125,8 @@ function doc () case $1 in before-install ) before_install;; - build ) build;; - build-examples ) build_examples;; - build-tools ) build_tools;; - build-apps ) build_apps;; - test-core ) test_core;; - test-ext ) test_ext;; + build ) build_all;; + test ) test_all;; doc ) doc;; esac diff --git a/.travis.yml b/.travis.yml index 6c6c265dcb6..d89f02b64ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,32 +1,34 @@ sudo: required +dist: xenial language: cpp cache: ccache: true +git: + depth: 1 addons: apt: - sources: - - sourceline: 'ppa:v-launchpad-jochen-sprickerhof-de/pcl' packages: - cmake - - libboost-filesystem1.54-dev - - libboost-iostreams1.54-dev - - libboost-thread1.54-dev - - libboost-chrono1.54-dev + - libboost-filesystem-dev + - libboost-iostreams-dev + - libboost-thread-dev + - libboost-chrono-dev - libeigen3-dev - libgtest-dev - doxygen-latex - dvipng - libusb-1.0-0-dev - libqhull-dev - - libvtk5-dev + - libvtk6-dev + - libvtk6-qt-dev - libflann-dev - doxygen - - libqt4-dev - - libqt4-opengl-dev - - libvtk5-qt4-dev + - qtbase5-dev + - libqt5opengl5-dev - libglew-dev - libopenni-dev - python3-pip + - libproj-dev #missing dependency from vtk? before_install: - bash .travis.sh before-install @@ -56,31 +58,18 @@ env: - secure: LNsNoBvqY/jYDoBjWCE5cM+f1H8xOwSBc/tbWZo6E/jPRjUOLzXSicMMUMrlVto+bFzSUT8OVajV3XmoRx+Qntzv6bDSAGjdycvHd2YZQPn8BYrsFtR4So7SsJkF9FlxzbiOXaiSRpwGn7TP/DO7Neubrr4IS2ef4nWowGrnCE8= - secure: PZivWbaCWFA2BFFY8n3UMxdEWjz7rBh568u9LF5LH3HgWADnfiwWzNriACqX9fhe7tSmDru5Bk978s+xPPAY9v24cfiDEX5a5MQ/XVr2rP48n3vlUDWERDhIodJ73F9F9GGZXToGdNz0MBUAHgiv7Lb0GYUfmOYzUJjWghngLBw= + jobs: include: - - stage: Core Build - env: TASK="build" + - name: "Documentation" compiler: gcc - script: bash .travis.sh $TASK - - env: TASK="build" - compiler: clang - script: bash .travis.sh $TASK - - stage: Extended Build and Tests - compiler: clang - env: TASK="build-examples" - script: bash .travis.sh $TASK - - compiler: clang - env: TASK="build-tools" - script: bash .travis.sh $TASK - - compiler: clang - env: TASK="build-apps" - script: bash .travis.sh $TASK - - compiler: gcc env: TASK="doc" script: bash .travis.sh $TASK - - compiler: gcc - env: TASK="test-core" + - name: "Library, Examples, Tools, Apps" + compiler: clang + env: TASK="build" script: bash .travis.sh $TASK - - compiler: gcc - env: TASK="test-ext" + - name: "Unit Tests" + compiler: gcc + env: TASK="test" script: bash .travis.sh $TASK diff --git a/README.md b/README.md index 8749d6104a1..d85d596f8f6 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Continuous integration [license-image]: https://img.shields.io/badge/license-BSD-green.svg?style=flat [license]: https://github.com/PointCloudLibrary/pcl/blob/master/LICENSE.txt -[![Build Status](https://travis-ci.org/PointCloudLibrary/pcl.svg?branch=master)](https://travis-ci.org/PointCloudLibrary/pcl) +[![Build Status](https://travis-ci.com/PointCloudLibrary/pcl.svg?branch=master)](https://travis-ci.com/PointCloudLibrary/pcl) [![Build Status](https://ci.appveyor.com/api/projects/status/oiep6oktpmuap7qr/branch/master?svg=true)](https://ci.appveyor.com/project/PointCloudLibrary/pcl/branch/master) Description