From 5a354eaab7c064a155857d377a2fa3f0f8390c34 Mon Sep 17 00:00:00 2001 From: William Woodall Date: Mon, 5 Feb 2018 19:44:04 -0800 Subject: [PATCH] reduce the number of jobs on travis (#172) * reduce the number of jobs on travis * update usage of pip due to changes in Homebrew * update pip and ensure the right one is being used with an alias * force reinstall pip to get `pip` on PATH * use python2 explicitly to run catkin_make * force use of python2 executable by catkin packages * python! * simpler * how to which * Update .travis.yml * make tests and run_tests * test results * disable timer tests on macOS --- .travis.yml | 6 ++---- Makefile | 9 ++++++--- tests/CMakeLists.txt | 6 ++++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index bc145be..d626c6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,11 +2,9 @@ os: - linux - osx language: cpp -compiler: - - gcc - - clang install: - make install_deps - source setup.bash script: - - make && make test + - mkdir build && cd build && cmake .. -DPYTHON_EXECUTABLE=$(which python2) && make && make tests && make run_tests + - catkin_test_results . diff --git a/Makefile b/Makefile index ced63b1..e172072 100644 --- a/Makefile +++ b/Makefile @@ -8,14 +8,17 @@ ifeq ($(UNAME),Darwin) brew tap ros/deps brew update brew outdated boost || brew upgrade boost || brew install boost - sudo pip install rosinstall_generator wstool rosdep empy catkin_pkg - sudo rosdep init + brew outdated python || brew upgrade python || brew install python + sudo -H python2 -m pip install -U pip setuptools + sudo -H python2 -m pip install --force-reinstall --no-deps -U pip + sudo -H python2 -m pip install rosinstall_generator wstool rosdep empy catkin_pkg + sudo -H rosdep init rosdep update mkdir catkin_ws cd catkin_ws && rosinstall_generator catkin --rosdistro hydro --tar > catkin.rosinstall cd catkin_ws && wstool init src catkin.rosinstall cd catkin_ws && rosdep install --from-paths src --ignore-src -y - cd catkin_ws && ./src/catkin/bin/catkin_make install + cd catkin_ws && python2 ./src/catkin/bin/catkin_make -DPYTHON_EXECUTABLE=`which python2` install echo "source catkin_ws/install/setup.bash" > setup.bash else sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 38718e6..e52a4d3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,6 +5,8 @@ if(UNIX) target_link_libraries(${PROJECT_NAME}-test util) endif() - catkin_add_gtest(${PROJECT_NAME}-test-timer unit/unix_timer_tests.cc) - target_link_libraries(${PROJECT_NAME}-test-timer ${PROJECT_NAME}) + if(NOT APPLE) # these tests are unreliable on macOS + catkin_add_gtest(${PROJECT_NAME}-test-timer unit/unix_timer_tests.cc) + target_link_libraries(${PROJECT_NAME}-test-timer ${PROJECT_NAME}) + endif() endif()