-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Travis to the new travis-ci.com platform.
- upgrade distribution to xenial - merge test jobs into a single one - merge lib, examples, tools, apps jobs into a single one - docs are now also built in PRs
- Loading branch information
1 parent
e78bc58
commit cb007cb
Showing
2 changed files
with
42 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
# Configure | ||
mkdir $BUILD_DIR && cd $BUILD_DIR | ||
cmake -DDOXYGEN_USE_SHORT_NAMES=OFF \ | ||
|
@@ -269,6 +86,19 @@ function doc () | |
git config --global user.email "[email protected]" | ||
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 [email protected]: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 [email protected]: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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters