Skip to content

Commit

Permalink
Add OSX TravisCI configuration
Browse files Browse the repository at this point in the history
- Use the current build target to decide which dependency script to run. 
- Add an OSX dependency script which installs dependencies with homebrew.
  • Loading branch information
seanhoughton committed Nov 13, 2016
1 parent 5a84dfb commit 3a04034
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@ compiler: gcc
language: cpp
sudo: required
dist: trusty
os: linux
os:
- linux
- osx

branches:
only:
- develop
- master
- refactor/unittest
- refactor/unittest
- feature/travisosx

before_install:
- echo Install dependencies
- travis-ci/deps.sh
- travis-ci/deps-${TRAVIS_OS_NAME}.sh

install:
- echo Building INDI Core
Expand Down
19 changes: 19 additions & 0 deletions travis-ci/deps-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -x

sudo apt-get -qq update
sudo apt-get -q -y install libusb-1.0-0-dev libcfitsio3-dev libnova-dev
sudo apt-get -q -y install libgphoto2-dev libgps-dev libjpeg-dev cdbs
sudo apt-get -q -y install libopenal-dev libgsl0-dev libboost-dev
sudo apt-get -q -y install libboost-regex-dev libftdi-dev dcraw fakeroot
sudo apt-get -q -y install wget curl

if [ ! -z $BUILD_INSTALL_GTEST ]; then
/bin/bash install-gtest.sh
else
echo "==> BUILD_INSTALL_GTEST not specified"
fi

exit 0

35 changes: 35 additions & 0 deletions travis-ci/deps-osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

set -e

brew update
brew tap polakovic/astronomy

# Not available in homebrew:
# cdbs \
# boost-regex \
# libgps \
# libgsl0 \
# libopenal \

# Already installed:
# boost \


brew install \
curl \
dcraw \
fakeroot \
libftdi \
libgphoto2 \
libjpeg \
libusb \
polakovic/astronomy/libcfitsio \
polakovic/astronomy/libnova \
wget

if [ ! -z $BUILD_INSTALL_GTEST ]; then
/bin/bash install-gtest.sh
else
echo "==> BUILD_INSTALL_GTEST not specified"
fi
18 changes: 18 additions & 0 deletions travis-ci/install-gtest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -e

mkdir -p build
pushd build
git clone https://github.com/google/googletest.git
if [ ! -d googletest ]; then
echo "Failed to get googletest.git repo"
exit 1
fi
pushd googletest
mkdir build
cd build
cmake ..
sudo make install
popd
rm -rf googletest
popd

0 comments on commit 3a04034

Please sign in to comment.