Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Travis to the new travis-ci.com platform #2538

Merged
merged 3 commits into from
Oct 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
239 changes: 29 additions & 210 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,237 +27,54 @@ 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
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=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
SergioRAgostinho marked this conversation as resolved.
Show resolved Hide resolved

# Configure
mkdir $BUILD_DIR && cd $BUILD_DIR
cmake -DDOXYGEN_USE_SHORT_NAMES=OFF \
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

51 changes: 20 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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?
SergioRAgostinho marked this conversation as resolved.
Show resolved Hide resolved
before_install:
- bash .travis.sh before-install

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down