Skip to content

Commit

Permalink
Merge pull request #2 from indilib/celestron_work
Browse files Browse the repository at this point in the history
Celestron work
  • Loading branch information
Chris-Rowland committed Feb 25, 2019
2 parents 4202f5f + da8cb3e commit 3b34f91
Show file tree
Hide file tree
Showing 1,086 changed files with 121,765 additions and 36,683 deletions.
11 changes: 5 additions & 6 deletions .circleci/build-3rdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@

set -x -e

echo ${TRAVIS_OS_NAME}
FLAGS="-DCMAKE_INSTALL_PREFIX=/usr/local -DFIX_WARNINGS=ON -DCMAKE_BUILD_TYPE=$1"

# The build-libs.sh must be run first for this to work
if [ .${TRAVIS_BRANCH%_*} == '.drv' ] ; then
DRV="indi-${TRAVIS_BRANCH#drv_}"
if [ .${CIRCLE_BRANCH%_*} == '.drv' -a `lsb_release -si` == 'Ubuntu' ] ; then
DRV="indi-${CIRCLE_BRANCH#drv_}"
echo "Building $DRV"
mkdir -p build/$DRV
pushd build/$DRV
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ . ../../3rdparty/$DRV -DFIX_WARNINGS=ON -DCMAKE_BUILD_TYPE=$1
cmake $FLAGS . ../../3rdparty/$DRV
make
popd
else
echo "Building all 3rd party drivers"
mkdir -p build/3rdparty
pushd build/3rdparty
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ . ../../3rdparty/ -DFIX_WARNINGS=ON -DCMAKE_BUILD_TYPE=$1
cmake $FLAGS . ../../3rdparty/
make
popd
fi

exit 0

26 changes: 26 additions & 0 deletions .circleci/build-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -x -e

br=( master develop package travis pull )

build_all () {
.circleci/build-core.sh
.circleci/build-libs.sh
.circleci/build-3rdparty.sh
}


if [ .${CIRCLE_BRANCH%_*} == '.drv' -a `lsb_release -si` == 'Ubuntu' ] ; then
# Driver build branch
build_all
else
for i in "${br[@]}"
do
if [ .${CIRCLE_BRANCH%/*} == .$i ]; then
build_all
elif [[ ${CIRCLE_BRANCH%/*} =~ [a-zA-Z][a-zA-Z]*-patch-[0-9][0-9]* ]]; then
build_all
fi
done
fi
19 changes: 9 additions & 10 deletions .circleci/build-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@

set -x -e

if [ .${TRAVIS_BRANCH%_*} == '.drv' ] ; then
FLAGS="-DCMAKE_INSTALL_PREFIX=/usr/local -DFIX_WARNINGS=ON -DCMAKE_BUILD_TYPE=$1"
FLAGS+=" -DINDI_BUILD_UNITTESTS=ON"

if [ .${CIRCLE_BRANCH%_*} == '.drv' -a `lsb_release -si` == 'Ubuntu' ] ; then
# Skip the build just use recent upstream version if it exists
if [ ${TRAVIS_OS_NAME} == 'linux' ] ; then
sudo apt-add-repository -y ppa:jochym/indi-devel
sudo apt-get -qq update
sudo apt-get -q -y install libindi-dev
else
brew install jochym/indi/libindi
fi
echo 'deb http://ppa.launchpad.net/jochym/indi-devel/ubuntu ' `lsb_release -cs` main > /etc/apt/sources.list.d/indi.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys DD9784BC4376B5DC
apt-get -qq update
apt-get -q -y install libindi-dev
else
# Build everything on master
echo "==> Building INDI Core"
mkdir -p build/libindi
pushd build/libindi
cmake -DINDI_BUILD_UNITTESTS=ON -DCMAKE_INSTALL_PREFIX=/usr/local/ . ../../libindi/ -DFIX_WARNINGS=ON -DCMAKE_BUILD_TYPE=$1
cmake $FLAGS . ../../libindi/
make
make install
popd
fi

exit 0

5 changes: 2 additions & 3 deletions .circleci/build-deb-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -x

if [ ${TRAVIS_OS_NAME} == "linux" ] ; then
if [ ${TRAVIS_BRANCH} == 'package' ] ; then
if [ ${TRAVIS_BRANCH} == 'package' ] ; then
echo "==> BUILD_DEB_PACKAGES activated"
mkdir -p build/deb_libindi
pushd build/deb_libindi
Expand All @@ -12,11 +12,10 @@ if [ ${TRAVIS_OS_NAME} == "linux" ] ; then
cp -r ../../debian/libindi debian
fakeroot debian/rules binary
cd ..
../3rdparty/make_deb_pkgs
../3rdparty/make_deb_pkgs
else
echo "==> BUILD_DEB_PACKAGES not specified"
fi
fi

exit 0

21 changes: 6 additions & 15 deletions .circleci/build-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,26 @@
# It is *not* for general audience

SRC=../../3rdparty/
FLAGS="-DCMAKE_INSTALL_PREFIX=/usr/local -DFIX_WARNINGS=ON -DCMAKE_BUILD_TYPE=$1"

if [ ${TRAVIS_OS_NAME} == "linux" ] ; then
LIBS="libapogee libfishcamp libfli libqhy libqsi libsbig libinovasdk libdspau"
else
LIBS="libqsi"
fi
LIBS="libapogee libfishcamp libfli libqhy libqsi libsbig libinovasdk libdspau"

if [ .${TRAVIS_BRANCH%_*} == '.drv' ] ; then
DRV=lib"${TRAVIS_BRANCH#drv_}"
if [ .${CIRCLE_BRANCH%_*} == '.drv' -a `lsb_release -si` == 'Ubuntu' ] ; then
DRV=lib"${CIRCLE_BRANCH#drv_}"
if [ -d 3rdparty/$DRV ] ; then
LIBS="$DRV"
else
else
LIBS=""
fi
echo "[$DRV] [$LIBS]"
if [ ${TRAVIS_OS_NAME} == "osx" ] ; then
echo "Cannot build one driver on OSX"
LIBS=""
fi
fi

for lib in $LIBS ; do
(
echo "Building $lib ..."
mkdir -p build/$lib
pushd build/$lib
cmake -DCMAKE_INSTALL_PREFIX=/usr/local . $SRC/$lib -DFIX_WARNINGS=ON -DCMAKE_BUILD_TYPE=$1
cmake $FLAGS . $SRC/$lib
make
make install
popd
)
done
Loading

0 comments on commit 3b34f91

Please sign in to comment.