<commit_before>#!/usr/bin/env bash

set -eu
set -o pipefail


# defaults
export TARGET=${TARGET:-Release}
export COVERAGE=${COVERAGE:-false}
export NODE=${NODE:-4}

export CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

source ${CURRENT_DIR}/travis_helper.sh

mapbox_time "setup-mason" source ${CURRENT_DIR}/setup_mason.sh
mapbox_time "setup-compiler" source ${CURRENT_DIR}/setup_compiler.sh

# ensure we start inside the root directory (one level up)
cd ${CURRENT_DIR}/../

if [[ ! $(which wget) ]]; then
    echo "echo wget must be installed";
    exit 1;
fi;

if [[ ! $(which pkg-config) ]]; then
    echo "echo pkg-config must be installed";
    exit 1;
fi;

if [[ "$(uname -s)" == "Darwin" ]]; then
    if [[ -f /etc/sysctl.conf ]] && [[ $(grep shmmax /etc/sysctl.conf) ]]; then
        echo "Note: found shmmax setting in /etc/sysctl.conf, not modifying"
    else
        echo "WARNING: Did not find shmmax setting in /etc/sysctl.conf, adding now (requires sudo and restarting)..."
        sudo sysctl -w kern.sysv.shmmax=4294967296
        sudo sysctl -w kern.sysv.shmall=1048576
        sudo sysctl -w kern.sysv.shmseg=128
    fi
fi

# install consistent node version
mapbox_time "install_node" source ./scripts/install_node.sh ${NODE}

if [[ ${TARGET} == 'Debug' ]]; then
    mapbox_time "bootstrap" export BUILD_TYPE=Debug && source ./bootstrap.sh
else
    mapbox_time "bootstrap" source ./bootstrap.sh
fi

echo "showing osrm-backend libosrm.pc details"
pkg-config libosrm --debug
<commit_msg>travis folding improvements [skip ci]<commit_after>#!/usr/bin/env bash

set -eu
set -o pipefail


# defaults
export TARGET=${TARGET:-Release}
export COVERAGE=${COVERAGE:-false}
export NODE=${NODE:-4}

export CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

source ${CURRENT_DIR}/travis_helper.sh

mapbox_time "setup-mason" source ${CURRENT_DIR}/setup_mason.sh
mapbox_time "setup-compiler" source ${CURRENT_DIR}/setup_compiler.sh

# ensure we start inside the root directory (one level up)
cd ${CURRENT_DIR}/../

if [[ ! $(which wget) ]]; then
    echo "echo wget must be installed";
    exit 1;
fi;

if [[ ! $(which pkg-config) ]]; then
    echo "echo pkg-config must be installed";
    exit 1;
fi;

if [[ "$(uname -s)" == "Darwin" ]]; then
    if [[ -f /etc/sysctl.conf ]] && [[ $(grep shmmax /etc/sysctl.conf) ]]; then
        echo "Note: found shmmax setting in /etc/sysctl.conf, not modifying"
    else
        echo "WARNING: Did not find shmmax setting in /etc/sysctl.conf, adding now (requires sudo and restarting)..."
        sudo sysctl -w kern.sysv.shmmax=4294967296
        sudo sysctl -w kern.sysv.shmall=1048576
        sudo sysctl -w kern.sysv.shmseg=128
    fi
fi

# install consistent node version
mapbox_time "install_node" source ./scripts/install_node.sh ${NODE}

if [[ ${TARGET} == 'Debug' ]]; then
    export BUILD_TYPE=Debug
fi

mapbox_time "bootstrap" source ./bootstrap.sh

echo "showing osrm-backend libosrm.pc details"
mapbox_time "libosrm.pc-details" pkg-config libosrm --debug

{'fraction_non_alphanumeric': 0.14375, 'fraction_numerical': 0.015789473684210527, 'mean_word_length': 3.6427480916030532, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7510372', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1039, 'n_words': 305}