sagecal/build-tests/compile_sagecal.sh

57 lines
1018 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
echo 'script: ' $0
echo "Building SageCal" && \
echo "Branch --> $BRANCH" && \
echo "Image --> $IMAGE"
2018-10-02 06:39:27 +08:00
BUILD_DIR=$IMAGE'-build'
cd /travis/workdir && \
2018-10-02 06:39:27 +08:00
mkdir $BUILD_DIR && cd $BUILD_DIR
2018-10-02 06:45:42 +08:00
CMAKE_EXE=''
OPTS=''
case $IMAGE in
ubuntu)
2018-10-02 07:45:42 +08:00
echo 'Building for Ubuntu'
2018-10-02 06:45:42 +08:00
CMAKE_EXE=$(which cmake)
OPTS=''
;;
sl7)
2018-10-02 07:45:42 +08:00
echo 'Building for Scientific Linux'
2018-10-02 06:32:35 +08:00
CMAKE_EXE=$(which cmake3)
2018-10-02 08:17:45 +08:00
OPTS='-DCASACORE_ROOT_DIR=/opt/casacore'
;;
arch)
OPTS=''
;;
*)
echo 'Unknown image $IMAGE!'
exit 1
;;
esac
echo 'CMAKE_EXE: ' $CMAKE_EXE
echo 'CMake options: ' $OPTS
echo 'pwd: ' $PWD
2018-10-02 07:28:36 +08:00
echo 'ls -asl: '
ls -asl
2018-10-02 07:28:36 +08:00
echo 'ls -asl /travis/workdir: '
ls -asl /travis/workdir
echo 'ls -asl /travis/workdir/$BUILD_DIR: '
ls -asl /travis/workdir/$BUILD_DIR
2018-10-02 07:45:42 +08:00
$CMAKE_EXE /travis/workdir -DCMAKE_INSTALL_PREFIX=/opt/sagecal $OPTS
make -j4 && \
make install && \
ls -alsrt /opt/sagecal && \
/opt/sagecal/bin/sagecal