<commit_before><commit_msg>Add build script for Jenkins CI<commit_after>#!/usr/bin/env bash

# number of processes with default value
: ${NPROC:=8}
# append the option flag --allow-run-as-root to mpiexec
mv ${MPI_DIR}/bin/mpiexec ${MPI_DIR}/bin/mpiexec.alias
echo '#!/usr/bin/env bash' > ${MPI_DIR}/bin/mpiexc
echo 'mpiexec.alias --allow-run-as-root "$@"' >> ${MPI_DIR}/bin/mpiexec
chmod +x ${MPI_DIR}/bin/mpiexec
# build the code
rm -rf build
mkdir build
cd build
#mkdir ${PREFIX}/build/cap
#cd ${PREFIX}/build/cap
cmake \
    -D CMAKE_BUILD_TYPE=Debug \
    -D CMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Weffc++"\
    -D CMAKE_CXX_COMPILER=mpicxx \
    -D BUILD_SHARED_LIBS=ON \
    -D ENABLE_PYTHON=ON \
    -D PYTHON_LIBRARY=${PYTHON_DIR}/lib/libpython3.5.so \
    -D PYTHON_INCLUDE_DIR=${PYTHON_DIR}/include/python3.5 \
    -D BOOST_DIR=${BOOST_DIR} \
    -D ENABLE_DEAL_II=ON \
    -D DEAL_II_DIR=${DEAL_II_DIR} \
    -D ENABLE_COVERAGE=OFF \
    -D ENABLE_FORMAT=ON \
    ..
#    ${PREFIX}/source/cap
make -j${NPROC} -i
# run unit tests
export LD_LIBRARY_PATH=${BOOST_DIR}/lib:${LD_LIBRARY_PATH}
ctest -j${NPROC} --no-compress-output -T Test
{'fraction_non_alphanumeric': 0.15940766550522648, 'fraction_numerical': 0.004355400696864111, 'mean_word_length': 3.5776892430278884, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1423988', 'n_tokens_mistral': 504, 'n_tokens_neox': 483, 'n_words': 91}