Merge pull request #58 from nlesc-dirac/ci_test

Continuous Integration
This commit is contained in:
Sarod Yatawatta 2018-08-28 16:44:34 +02:00 committed by GitHub
commit 24c45b0102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 82 additions and 10 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
build
.idea
*/*.png

View File

@ -8,16 +8,18 @@ language: cpp
before_install:
- docker pull ubuntu:xenial
- docker run -itd -v "${TRAVIS_BUILD_DIR}:/travis/workdir" --name ubuntu-build ubuntu:xenial
# - docker pull base/archlinux
# - docker run -itd -v "${TRAVIS_BUILD_DIR}:/travis/workdir" --name arch-build base/archlinux
# - docker pull scientificlinux/sl:7
# - docker run -itd -v "${TRAVIS_BUILD_DIR}:/travis/workdir" --name sl-build scientificlinux/sl:7
script:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
- docker exec ubuntu-build apt-get update -y
- docker exec ubuntu-build apt-get install software-properties-common -y
- docker exec ubuntu-build add-apt-repository -s ppa:kernsuite/kern-3 -y
- docker exec ubuntu-build apt-add-repository multiverse
- docker exec ubuntu-build apt-get update -y
- docker exec ubuntu-build apt-get install -y git cmake g++ pkg-config libcfitsio-bin libcfitsio-dev libopenblas-base libopenblas-dev wcslib-dev wcslib-tools libglib2.0-dev libcasa-casa2 casacore-dev casacore-data casacore-tools
- |
docker exec --env BRANCH=$BRANCH ubuntu-build /bin/bash -c "/travis/workdir/test-builds/test-ubuntu.sh"
- docker exec --env BRANCH=$BRANCH ubuntu-build /bin/bash -c "/travis/workdir/build-tests/ubuntu/prepare-ubuntu.sh"
- docker exec --env BRANCH=$BRANCH ubuntu-build /bin/bash -c "/travis/workdir/build-tests/ubuntu/compile-ubuntu.sh"
# - docker exec --env BRANCH=$BRANCH arch-build /bin/bash -c "/travis/workdir/build-tests/arch/prepare-arch.sh"
# - docker exec --env BRANCH=$BRANCH arch-build /bin/bash -c "/travis/workdir/build-tests/arch/compile-arch.sh"
# - docker exec --env BRANCH=$BRANCH sl-build /bin/bash -c "/travis/workdir/build-tests/sl/prepare-sl.sh"
# - docker exec --env BRANCH=$BRANCH sl-build /bin/bash -c "/travis/workdir/build-tests/sl/compile-sl.sh"

View File

@ -10,6 +10,7 @@ set(PROJECT_VERSION_REVISION 1)
set(PROJECT_VERSION
"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
message(STATUS "\n############################\n# HOST SYSTEM v${CMAKE_HOST_SYSTEM_NAME}\n############################")
message(STATUS "\n############################\n# Building SageCal v${PROJECT_VERSION}\n############################")
include(CheckCXXCompilerFlag)

View File

@ -3,7 +3,7 @@
echo "Building SageCal" && \
echo "Branch --> $BRANCH" && \
cd /travis/workdir && \
mkdir build && cd build && \
mkdir build-arch && cd build-arch && \
cmake .. -DENABLE_CUDA=OFF && \
make -j4 && \
ls -alsrt ./dist/bin && \

View File

@ -0,0 +1,4 @@
#!/bin/bash
pacman -Syy --needed --noconfirm \
base-devel cmake git glib2 cfitsio wcslib

32
build-tests/sl/compile-sl.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
echo "Building SageCal for Scientific Linux" && \
echo "Branch --> $BRANCH" && \
cd /travis/workdir
# compile casacore first
# mkdir -p /opt/soft/casacore/data
# cd /opt/soft/casacore/data
# wget -c ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar
# tar zxfv WSRT_Measures.ztar && rm -f WSRT_Measures.ztar
cd /travis/workdir
git clone --progress --verbose https://github.com/casacore/casacore.git casacore_src && cd casacore_src
mkdir build && cd build
cmake3 -DUSE_FFTW3=ON -DCMAKE_INSTALL_PREFIX=/opt/soft/casacore -DDATA_DIR=/opt/soft/casacore/data -DUSE_OPENMP=ON \
-DUSE_HDF5=ON -DBUILD_PYTHON=ON -DUSE_THREADS=ON ..
make -j4
make install
# compile sagecal
cd /travis/workdir && \
mkdir build-sl && cd build-sl
cmake3 .. -DENABLE_CUDA=OFF && \
-DCASACORE_ROOT_DIR=/opt/soft/casacore -DCASACORE_INCLUDE=/opt/soft/casacore/include/casacore
make -j4 && \
ls -alsrt ./dist/bin && \
./dist/bin/sagecal

11
build-tests/sl/prepare-sl.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
# add EPEL repository for openblas
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# install dependencies
yum -y install wget git pkgconfig make cmake3 cmake3-gui gcc-gfortran gcc-c++ flex bison \
openblas openblas-devel glib2-devel lapack lapack-devel cfitsio cfitsio-devel \
wcslib wcslib-devel ncurses ncurses-devel readline readline-devel\
python-devel boost boost-devel fftw fftw-devel hdf5 hdf5-devel\
numpy boost-python

View File

@ -0,0 +1,11 @@
#!/bin/bash
echo "Building SageCal" && \
echo "Branch --> $BRANCH" && \
cd /travis/workdir && \
mkdir build-ubuntu && cd build-ubuntu && \
cmake .. -DENABLE_CUDA=OFF && \
make -j4 && \
ls -alsrt ./dist/bin && \
./dist/bin/sagecal

View File

@ -0,0 +1,9 @@
#!/bin/bash
apt-get update -y
apt-get install software-properties-common -y
add-apt-repository -s ppa:kernsuite/kern-3 -y
apt-add-repository multiverse
apt-get update -y
apt-get install -y git cmake g++ pkg-config libcfitsio-bin libcfitsio-dev libopenblas-base libopenblas-dev wcslib-dev wcslib-tools libglib2.0-dev libcasa-casa2 casacore-dev casacore-data casacore-tools