1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-09-19 21:25:36 +01:00

CI scripts expose number of build tasks

This commit is contained in:
Antonin Portelli 2021-11-16 21:35:35 +00:00
parent 9341a31cf4
commit d6e5ba724d
6 changed files with 26 additions and 20 deletions

View File

@ -1,15 +1,16 @@
#!/usr/bin/env bash
if (( $# != 1 )); then
echo "usage: `basename $0` <prefix>" 1>&2
if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
set -ex
mkdir -p local/build
for d in gsl nlopt minuit hdf5; do
if [ ! -e local/.built.${d} ]; then
./install-${d}.sh ${PREFIX}
./install-${d}.sh ${PREFIX} ${NTASKS}
fi
done

View File

@ -2,11 +2,12 @@
NAME='gsl-2.6'
if (( $# != 1 )); then
echo "usage: `basename $0` <prefix>" 1>&2
if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
set -ex
INITDIR=$(pwd -P)
@ -19,7 +20,7 @@ tar -xzvf ${NAME}.tar.gz
mkdir -p ${NAME}/build
cd ${NAME}/build
../configure --prefix=${PREFIX}
make -j4
make -j${NTASKS}
make install
cd ${INITDIR}/local
touch .built.gsl

View File

@ -2,11 +2,12 @@
NAME='hdf5-1.10.5'
if (( $# != 1 )); then
echo "usage: `basename $0` <prefix>" 1>&2
if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
set -ex
INITDIR=$(pwd -P)
@ -19,7 +20,7 @@ tar -xzvf ${NAME}.tar.gz
mkdir ${NAME}/build
cd ${NAME}/build
../configure --prefix=${PREFIX} --enable-cxx
make -j4
make -j${NTASKS}
make install
cd ${INITDIR}/local
touch .built.hdf5

View File

@ -1,10 +1,11 @@
#!/usr/bin/env bash
if (( $# != 1 )); then
echo "usage: `basename $0` <prefix>" 1>&2
if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
set -ex
INITDIR=$(pwd -P)
@ -12,11 +13,11 @@ mkdir -p ${PREFIX}
cd ${PREFIX}
PREFIX=$(pwd -P)
cd ${INITDIR}
./install-deps.sh ${PREFIX}
./install-deps.sh ${PREFIX} ${NTASKS}
cd ..
./bootstrap.sh
mkdir -p build
cd build
../configure --prefix=${PREFIX} --with-minuit=${PREFIX} --with-nlopt=${PREFIX} --with-hdf5=${PREFIX} --with-gsl=${PREFIX} CXXFLAGS="${CXXFLAGS} -O3 -march=haswell -mtune=haswell"
make -j4
../configure --prefix=${PREFIX} --with-minuit=${PREFIX} --with-nlopt=${PREFIX} --with-hdf5=${PREFIX} --with-gsl=${PREFIX} CXXFLAGS="${CXXFLAGS} -O3 -march=native -mtune=native"
make -j${NTASKS}
make install

View File

@ -1,11 +1,12 @@
#!/usr/bin/env bash
if (( $# != 1 )); then
echo "usage: `basename $0` <prefix>" 1>&2
if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
set -ex
INITDIR=$(pwd -P)
@ -18,7 +19,7 @@ git clone https://github.com/root-project/root.git
cd root/math/minuit2/
mkdir build; cd build
cmake .. -Dminuit2_standalone=ON -DCMAKE_INSTALL_PREFIX=${PREFIX}
make -j4
make -j${NTASKS}
make install
cd ${INITDIR}/local
touch .built.minuit

View File

@ -2,11 +2,12 @@
NAME='2.6.1'
if (( $# != 1 )); then
echo "usage: `basename $0` <prefix>" 1>&2
if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
set -ex
INITDIR=$(pwd -P)
@ -20,7 +21,7 @@ NAME=nlopt-${NAME}
mkdir -p ${NAME}/build
cd ${NAME}/build
cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=TRUE -DCMAKE_INSTALL_NAME_DIR="${PREFIX}/lib" ..
make -j4
make -j${NTASKS}
make install
cd ${INITDIR}/local
touch .built.nlopt