Skip to content

Commit

Permalink
CI scripts update
Browse files Browse the repository at this point in the history
  • Loading branch information
aportelli committed Feb 10, 2024
1 parent 7d55fc3 commit ccdc542
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 91 deletions.
10 changes: 5 additions & 5 deletions ci-scripts/install-deps.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/env bash

if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
if (($# != 2)); then
echo "usage: $(basename "$0") <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
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} ${NTASKS}
./install-${d}.sh "${prefix}" "${ntasks}"
fi
done
36 changes: 18 additions & 18 deletions ci-scripts/install-gsl.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#!/usr/bin/env bash

NAME='gsl-2.6'
name='gsl-2.6'

if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
if (($# != 2)); then
echo "usage: $(basename "$0") <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
prefix=$1
ntasks=$2

set -ex
INITDIR=$(pwd -P)
mkdir -p ${PREFIX}
cd ${PREFIX}
PREFIX=$(pwd -P)
cd ${INITDIR}/local/build
wget http://ftpmirror.gnu.org/gsl/${NAME}.tar.gz
tar -xzvf ${NAME}.tar.gz
mkdir -p ${NAME}/build
cd ${NAME}/build
../configure --prefix=${PREFIX}
make -j${NTASKS}
init_dir=$(pwd -P)
mkdir -p "${prefix}"
cd "${prefix}"
prefix=$(pwd -P)
cd "${init_dir}/local/build"
wget http://ftpmirror.gnu.org/gsl/${name}.tar.gz
tar -xzvf ${name}.tar.gz
mkdir -p ${name}/build
cd ${name}/build
../configure --prefix="${prefix}"
make -j"${ntasks}"
make install
cd ${INITDIR}/local
cd "${init_dir}/local"
touch .built.gsl
cd ${INITDIR}
cd "${init_dir}"
36 changes: 18 additions & 18 deletions ci-scripts/install-hdf5.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#!/usr/bin/env bash

NAME='hdf5-1.10.8'
name='hdf5-1.14.3'

if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
if (($# != 2)); then
echo "usage: $(basename "$0") <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
prefix=$1
ntasks=$2

set -ex
INITDIR=$(pwd -P)
mkdir -p ${PREFIX}
cd ${PREFIX}
PREFIX=$(pwd -P)
cd ${INITDIR}/local/build
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/${NAME}/src/${NAME}.tar.gz
tar -xzvf ${NAME}.tar.gz
mkdir ${NAME}/build
cd ${NAME}/build
../configure --prefix=${PREFIX} --enable-cxx
make -j${NTASKS}
init_dir=$(pwd -P)
mkdir -p "${prefix}"
cd "${prefix}"
prefix=$(pwd -P)
cd "${init_dir}/local/build"
wget "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/${name}/src/${name}.tar.gz"
tar -xzvf ${name}.tar.gz
mkdir ${name}/build
cd ${name}/build
../configure --prefix="${prefix}" --enable-cxx
make -j "${ntasks}"
make install
cd ${INITDIR}/local
cd "${init_dir}/local"
touch .built.hdf5
cd ${INITDIR}
cd "${init_dir}"
31 changes: 15 additions & 16 deletions ci-scripts/install-latan.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
#!/usr/bin/env bash

if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
if (($# != 2)); then
echo "usage: $(basename "$0") <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
prefix=$1
ntasks=$2

set -ex
INITDIR=$(pwd -P)
mkdir -p ${PREFIX}
cd ${PREFIX}
PREFIX=$(pwd -P)
cd ${INITDIR}
./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=native -mtune=native"
make -j${NTASKS}
init_dir=$(pwd -P)
mkdir -p "${prefix}"
cd "${prefix}"
prefix=$(pwd -P)
cd "${init_dir}"
./install-deps.sh "${prefix}" "${ntasks}"
mkdir -p "${init_dir}/local/build/latan"
cd "${init_dir}/local/build/latan"
cmake -DCMAKE_INSTALL_PREFIX="${prefix}" -DCMAKE_PREFIX_PATH="${prefix}" \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" "${init_dir}/.."
make -j "${ntasks}"
make install
30 changes: 15 additions & 15 deletions ci-scripts/install-minuit.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
#!/usr/bin/env bash


if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
if (($# != 2)); then
echo "usage: $(basename "$0") <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
prefix=$1
ntasks=$2

set -ex
INITDIR=$(pwd -P)
mkdir -p ${PREFIX}
cd ${PREFIX}
PREFIX=$(pwd -P)
cd ${INITDIR}/local/build
init_dir=$(pwd -P)
mkdir -p "${prefix}"
cd "${prefix}"
prefix=$(pwd -P)
cd "${init_dir}/local/build"
rm -rf root
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 -j${NTASKS}
mkdir build
cd build
cmake .. -Dminuit2_standalone=ON -DCMAKE_INSTALL_PREFIX="${prefix}"
make -j "${ntasks}"
make install
cd ${INITDIR}/local
cd "${init_dir}/local"
touch .built.minuit
cd ${INITDIR}
cd "${init_dir}"
40 changes: 21 additions & 19 deletions ci-scripts/install-nlopt.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
#!/usr/bin/env bash

NAME='2.6.1'
name='2.6.1'

if (( $# != 2 )); then
echo "usage: `basename $0` <prefix> <ntasks>" 1>&2
if (($# != 2)); then
echo "usage: $(basename "$0") <prefix> <ntasks>" 1>&2
exit 1
fi
PREFIX=$1
NTASKS=$2
prefix=$1
ntasks=$2

set -ex
INITDIR=$(pwd -P)
mkdir -p ${PREFIX}
cd ${PREFIX}
PREFIX=$(pwd -P)
cd ${INITDIR}/local/build
wget https://github.com/stevengj/nlopt/archive/v${NAME}.tar.gz
tar -xzvf v${NAME}.tar.gz
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 -j${NTASKS}
init_dir=$(pwd -P)
mkdir -p "${prefix}"
cd "${prefix}"
prefix=$(pwd -P)
cd "${init_dir}/local/build"
wget "https://github.com/stevengj/nlopt/archive/v${name}.tar.gz"
tar -xzvf v${name}.tar.gz
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" -DNLOPT_PYTHON=OFF -DNLOPT_OCTAVE=OFF \
-DNLOPT_MATLAB=OFF -DNLOPT_GUILE=OFF -DNLOPT_SWIG=OFF ..
make -j "${ntasks}"
make install
cd ${INITDIR}/local
cd "${init_dir}/local"
touch .built.nlopt
cd ${INITDIR}
cd "${init_dir}"

0 comments on commit ccdc542

Please # to comment.