sagecal/build-tests/compile_sagecal.sh

61 lines
1.1 KiB
Bash
Raw 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 06:45:42 +08:00
CMAKE_EXE=$(which cmake)
OPTS=''
;;
sl7)
2018-10-02 06:32:35 +08:00
CMAKE_EXE=$(which cmake3)
OPTS='-DUSE_FFTW3=ON \
-DCMAKE_INSTALL_PREFIX=/opt/casacore \
-DDATA_DIR=/opt/casacore/data -DUSE_OPENMP=ON \
-DUSE_HDF5=ON \
-DBUILD_PYTHON=ON \
-DUSE_THREADS=ON'
;;
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:12:23 +08:00
$CMAKE_EXE /travis/workdir -DCMAKE_INSTALL_PREFIX=/opt/sagecal \
$OPTS
make -j4 && \
make install && \
ls -alsrt /opt/sagecal && \
/opt/sagecal/bin/sagecal