Skip to content

Commit

Permalink
Travis CI: Cleanup scripts and add more MacOSX build pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
TSC21 committed Oct 11, 2019
1 parent da3131f commit 6d16e03
Showing 1 changed file with 55 additions and 28 deletions.
83 changes: 55 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,25 @@ matrix:
env:
- PX4_DOCKER_REPO=px4io/px4-dev-simulation-bionic:2019-10-04
- BUILD="source ./scripts/validate_sdf.bash"
- name: MacOSX 10.14 (Xcode 11.0) build with Gazebo 9
- name: MacOSX Sierra (Xcode 9.2) build with Gazebo 7
os: osx
osx_image: xcode11
osx_image: xcode9.2
language: cpp
cache:
ccache: true
env:
- GAZEBO_VERSION="gazebo7"
- name: MacOSX High Sierra (Xcode 10.1) build with Gazebo 9
os: osx
osx_image: xcode10.1
language: cpp
cache:
ccache: true
env:
- GAZEBO_VERSION="gazebo9"
- name: MacOSX Mojave (Xcode 11.2) build with Gazebo 9
os: osx
osx_image: xcode11.2
language: cpp
cache:
ccache: true
Expand All @@ -90,38 +106,49 @@ matrix:

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
curl https://gstreamer.freedesktop.org/data/pkg/osx/1.0.10/gstreamer-1.0-1.0.10-universal.pkg -vlo gstreamer-1.0-1.0.10-universal.pkg;
curl https://gstreamer.freedesktop.org/data/pkg/osx/1.0.10/gstreamer-1.0-devel-1.0.10-universal.pkg -vlo gstreamer-1.0-devel-1.0.10-universal.pkg;
git clone --depth 1 https://github.com/mavlink/c_library_v2.git /usr/local/include/mavlink/v2.0;
rm -rf /usr/local/include/mavlink/v2.0/.git;
git clone https://github.com/google/googletest;
pushd googletest;
mkdir build;
pushd build;
cmake ..;
make;
make install;
popd;
popd;
brew update;
git clone https://github.com/google/googletest;
git clone --depth 1 https://github.com/mavlink/c_library_v2.git /usr/local/include/mavlink/v2.0;
curl https://gstreamer.freedesktop.org/data/pkg/osx/1.0.10/gstreamer-1.0-1.0.10-universal.pkg -vlo gstreamer-1.0-1.0.10-universal.pkg;
curl https://gstreamer.freedesktop.org/data/pkg/osx/1.0.10/gstreamer-1.0-devel-1.0.10-universal.pkg -vlo gstreamer-1.0-devel-1.0.10-universal.pkg;
fi

install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew tap PX4/px4;
brew install px4-dev pkg-config;
sudo installer -allowUntrusted -verboseR -pkg gstreamer-1.0-1.0.10-universal.pkg -target /;
sudo installer -allowUntrusted -verboseR -pkg gstreamer-1.0-devel-1.0.10-universal.pkg -target /;
export PKG_CONFIG_PATH="/Frameworks/GStreamer.framework/Versions/Current/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}";
brew tap osrf/simulation;
brew install opencv ${GAZEBO_VERSION};
sudo -H pip2 install --upgrade pip setuptools;
sudo -H pip2 install rospkg pyserial empy toml numpy pandas jinja2;
pushd googletest;
mkdir build;
pushd build;
cmake ..;
make;
make install;
popd;
popd;
brew tap PX4/px4;
brew install px4-dev;
brew tap osrf/simulation;
brew install opencv ${GAZEBO_VERSION};
sudo -H pip2 install --upgrade pip setuptools;
sudo -H pip2 install rospkg pyserial empy toml numpy pandas jinja2;
sudo installer -allowUntrusted -verboseR -pkg gstreamer-1.0-1.0.10-universal.pkg -target /;
sudo installer -allowUntrusted -verboseR -pkg gstreamer-1.0-devel-1.0.10-universal.pkg -target /;
fi

after_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew cleanup;
rm -rf /usr/local/include/mavlink/v2.0/.git googletest/.git;
rm gstreamer-1.0-1.0.10-universal.pkg gstreamer-1.0-devel-1.0.10-universal.pkg;
fi

before_script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export PKG_CONFIG_PATH="/Frameworks/GStreamer.framework/Versions/Current/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}";
fi

script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
mkdir Build;
cd Build && cmake -DENABLE_UNIT_TESTS=On .. && make -j$(sysctl -n hw.physicalcpu) -l$(sysctl -n hw.physicalcpu); make test;
else docker run -it --rm -w ${TRAVIS_BUILD_DIR} --env=CCACHE_DIR="${CCACHE_DIR}" --volume=${CCACHE_DIR}:${CCACHE_DIR}:rw --volume=${TRAVIS_BUILD_DIR}:${TRAVIS_BUILD_DIR}:rw ${PX4_DOCKER_REPO} /bin/bash -e -c "${BUILD}";
mkdir Build;
cd Build && cmake -DENABLE_UNIT_TESTS=On .. && make -j$(sysctl -n hw.physicalcpu) -l$(sysctl -n hw.physicalcpu); make test;
else
docker run -it --rm -w ${TRAVIS_BUILD_DIR} --env=CCACHE_DIR="${CCACHE_DIR}" --volume=${CCACHE_DIR}:${CCACHE_DIR}:rw --volume=${TRAVIS_BUILD_DIR}:${TRAVIS_BUILD_DIR}:rw ${PX4_DOCKER_REPO} /bin/bash -e -c "${BUILD}";
fi

0 comments on commit 6d16e03

Please sign in to comment.