<commit_before>#!/bin/bash
set -e
set -x

THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR=${THIS_DIR}/../

BUILD_DIR=$(mktemp -d)
INSTALL_DIR=$(mktemp -d)
trap "rm -rf ${BUILD_DIR} ${INSTALL_DIR}" EXIT

WITH_CCACHE=OFF
export CCACHE_DIR=/opt/ccache
if [ -d "${CCACHE_DIR}" ]; then
  WITH_CCACHE=ON
fi

CMAKE_BUILD_TYPE=Release
if [ -n "${USE_NINJA}" ]; then
  CMAKE_GENERATOR="Ninja"
  MAKE=ninja
  MAKE_J=
else
  CMAKE_GENERATOR="Unix Makefiles"
  MAKE=make
  MAKE_J="-j$(nproc)"
fi

pushd ${BUILD_DIR}
cmake -G "${CMAKE_GENERATOR}" \
  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
  -DSEASTAR_DIR=/src/seastar \
  -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
  -DENABLE_INTEGRATION_TESTS=ON \
  -DENABLE_UNIT_TESTS=ON \
  -DENABLE_BENCHMARK_TESTS=ON \
  -DWITH_CCACHE=${WITH_CCACHE} \
  ${ROOT_DIR}

${MAKE} doc 2> /dev/null
${MAKE} ${MAKE_J}
ctest -V
${MAKE} install<commit_msg>CI: only run smf tests<commit_after>#!/bin/bash
set -e
set -x

THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR=${THIS_DIR}/../

BUILD_DIR=$(mktemp -d)
INSTALL_DIR=$(mktemp -d)
trap "rm -rf ${BUILD_DIR} ${INSTALL_DIR}" EXIT

WITH_CCACHE=OFF
export CCACHE_DIR=/opt/ccache
if [ -d "${CCACHE_DIR}" ]; then
  WITH_CCACHE=ON
fi

CMAKE_BUILD_TYPE=Release
if [ -n "${USE_NINJA}" ]; then
  CMAKE_GENERATOR="Ninja"
  MAKE=ninja
  MAKE_J=
else
  CMAKE_GENERATOR="Unix Makefiles"
  MAKE=make
  MAKE_J="-j$(nproc)"
fi

pushd ${BUILD_DIR}
cmake -G "${CMAKE_GENERATOR}" \
  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
  -DSEASTAR_DIR=/src/seastar \
  -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
  -DENABLE_INTEGRATION_TESTS=ON \
  -DENABLE_UNIT_TESTS=ON \
  -DENABLE_BENCHMARK_TESTS=ON \
  -DWITH_CCACHE=${WITH_CCACHE} \
  ${ROOT_DIR}

${MAKE} doc 2> /dev/null
${MAKE} ${MAKE_J}
ctest -V -N -R "^smf"
${MAKE} install
{'fraction_non_alphanumeric': 0.17758046614872364, 'fraction_numerical': 0.0022197558268590455, 'mean_word_length': 4.778846153846154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5054948', 'n_tokens_mistral': 850, 'n_tokens_neox': 802, 'n_words': 138}