2018-10-02 06:20:34 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
echo 'script: ' $0
|
|
|
|
|
|
|
|
echo "Building SageCal" && \
|
|
|
|
echo "Branch --> $BRANCH" && \
|
|
|
|
echo "Image --> $IMAGE"
|
|
|
|
|
|
|
|
cd /travis/workdir && \
|
|
|
|
mkdir build && cd build
|
|
|
|
|
2018-10-02 06:32:35 +08:00
|
|
|
CMAKE_EXE=$(which cmake)
|
2018-10-02 06:20:34 +08:00
|
|
|
OPTS=''
|
|
|
|
|
|
|
|
case $IMAGE in
|
|
|
|
ubuntu)
|
|
|
|
OPTS=''
|
|
|
|
;;
|
|
|
|
sl7)
|
2018-10-02 06:32:35 +08:00
|
|
|
CMAKE_EXE=$(which cmake3)
|
2018-10-02 06:20:34 +08:00
|
|
|
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 options: ' $OPTS
|
|
|
|
|
2018-10-02 06:32:35 +08:00
|
|
|
$CMAKE_EXE .. -DCMAKE_INSTALL_PREFIX=/opt/sagecal \
|
2018-10-02 06:20:34 +08:00
|
|
|
$OPTS
|
|
|
|
|
|
|
|
make -j4 && \
|
|
|
|
make install && \
|
|
|
|
ls -alsrt /opt/sagecal && \
|
|
|
|
/opt/sagecal/bin/sagecal
|