diff --git a/.travis.yml b/.travis.yml index 74d237ade0c..2a75418a55f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -64,13 +64,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' make - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' sudo make install &>/dev/null + - /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of %C -- %E (real)' make + - /usr/bin/time -f 'Spend time of %C -- %E (real)' sudo make install &>/dev/null - cd .. script: - cd ./.travis - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash ./build_package.sh $PACKAGE notifications: email: on_success: change diff --git a/.travis/build_package.sh b/.travis/build_package.sh index 809d6629220..e7bf90935a1 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -4,15 +4,15 @@ set -e CXX_FLAGS="-DCGAL_NDEBUG -ftemplate-backtrace-limit=0" -function time { +function mytime { /usr/bin/time -f "Spend time of %C: %E (real)" "$@" } function build_examples { mkdir -p build-travis cd build-travis - time cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" .. - time make -j2 + mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" .. + mytime make -j2 } function build_tests { @@ -28,8 +28,8 @@ function build_demo { EXTRA_CXX_FLAGS="-Werror=inconsistent-missing-override" ;; esac - time cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" .. - time make -j2 + mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" .. + mytime make -j2 } old_IFS=$IFS IFS=$' ' @@ -46,20 +46,20 @@ cd $ROOT [ "$ARG" = Polygon_mesh_processing ] || [ "$ARG" = Property_map ] ||\ [ "$ARG" = Surface_mesh_deformation ] || [ "$ARG" = Surface_mesh_shortest_path ] ||\ [ "$ARG" = Surface_mesh_simplification ]; then - time sudo bash .travis/install_openmesh.sh + mytime sudo bash .travis/install_openmesh.sh fi if [ "$ARG" = "CHECK" ] then cd .travis - time ./generate_travis.sh --check + mytime ./generate_travis.sh --check cd .. IFS=$old_IFS - time zsh $ROOT/Scripts/developer_scripts/test_merge_of_branch HEAD + mytime zsh $ROOT/Scripts/developer_scripts/test_merge_of_branch HEAD #test dependencies cd $ROOT - time bash Scripts/developer_scripts/cgal_check_dependencies.sh --check_headers /usr/bin/doxygen + mytime bash Scripts/developer_scripts/cgal_check_dependencies.sh --check_headers /usr/bin/doxygen cd .travis #parse current matrix and check that no package has been forgotten @@ -96,8 +96,8 @@ cd $ROOT cd $ROOT mkdir build_test cd build_test - time cmake -DCMAKE_INSTALL_PREFIX=install/ .. - time make install + mytime cmake -DCMAKE_INSTALL_PREFIX=install/ .. + mytime make install # test install with minimal downstream example mkdir installtest cd installtest @@ -110,7 +110,7 @@ cd $ROOT echo 'target_link_libraries(${PROJECT_NAME} CGAL::CGAL)' >> CMakeLists.txt echo '#include "CGAL/remove_outliers.h"' >> main.cpp cd build - time cmake -DCMAKE_INSTALL_PREFIX=../../install .. + mytime cmake -DCMAKE_INSTALL_PREFIX=../../install .. cd .. exit 0 fi diff --git a/.travis/template.txt b/.travis/template.txt index 64fa386792e..0958db78412 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -11,7 +11,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -19,13 +19,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' make - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' sudo make install &>/dev/null + - /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of %C -- %E (real)' make + - /usr/bin/time -f 'Spend time of %C -- %E (real)' sudo make install &>/dev/null - cd .. script: - cd ./.travis - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash ./build_package.sh $PACKAGE notifications: email: on_success: change