build.sh 1.31 KB
Newer Older
incardon's avatar
incardon committed
1 2 3
#! /bin/bash

source $HOME/.bashrc
incardon's avatar
incardon committed
4
source $HOME/openfpm_vars_$3
incardon's avatar
incardon committed
5

incardon's avatar
incardon committed
6 7
echo "Branch: $3"

incardon's avatar
incardon committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
echo "$PATH"

# Make a directory in /tmp/openfpm_data

mkdir /tmp/openfpm_io
mv * .[^.]* /tmp/openfpm_io
mv /tmp/openfpm_io openfpm_io

mkdir openfpm_io/src/config

git clone git@git.mpi-cbg.de:openfpm/openfpm_devices.git openfpm_devices
git clone git@git.mpi-cbg.de:openfpm/openfpm_data.git openfpm_data
git clone git@git.mpi-cbg.de:openfpm/openfpm_pdata.git openfpm_pdata
git clone git@git.mpi-cbg.de:openfpm/openfpm_vcluster.git openfpm_vcluster

incardon's avatar
incardon committed
23 24
# Go in the right branch

incardon's avatar
incardon committed
25

incardon's avatar
incardon committed
26 27 28 29
cd "$1/openfpm_io"

echo "Compiling on $2"

incardon's avatar
incardon committed
30 31
source $HOME/openfpm_vars_$3

incardon's avatar
incardon committed
32 33 34
sh ./autogen.sh
if [ "$2" == "master" ]
then
incardon's avatar
incardon committed
35
 sh ./configure CXX=mpic++ --with-hdf5=$HOME/$3/HDF5/bin/h5pcc --disable-gpu
incardon's avatar
incardon committed
36 37 38 39
elif [ "$2" == "gin" ]
then
 module load gcc/4.8.2
 module load boost/1.54.0
incardon's avatar
incardon committed
40
 sh ./configure CXX=mpic++ --with-boost=/sw/apps/boost/1.54.0/ --with-hdf5=$HOME/$3/HDF5/bin/h5pcc
incardon's avatar
incardon committed
41
else
incardon's avatar
incardon committed
42
 sh ./configure CXX=mpic++ --with-hdf5=$HOME/$3/HDF5/bin/h5pcc
incardon's avatar
incardon committed
43 44 45 46 47 48 49 50
fi
make

if [ $? -ne 0 ]; then
   curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\"  , \"attachments\":[{ \"title\":\"Error:\", \"color\": \"#FF0000\", \"text\":\"$2 failed to compile the openfpm_io test \" }] }" https://hooks.slack.com/services/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
   exit 1 ; 
fi