<commit_before>#!/bin/bash
# ci.sh, <NAME>, 2016, LGPL v2, see LICENSE
#
# This script builds all targets and runs the fuzzer on the solvers. Therefore it
# creates the build folder for Debug-builds and the release folder for Release-builds.
#
# It is intended to be used as a script for a CI-runner but can be used for local runs too.

# exits the script immediately if a command exits with a non-zero status
set -e

# solvers with their specific parameters
solver=('riss-simp' 'riss-core -config=Riss427:BMC_FULL' 'riss-core -config=CSSC2014' 'pfolio')

# parameters that are the same for all solvers
params="-mem-lim=2048"

# directory of this script (in repo/scripts)
script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# get absolute path for root directory of the repository
repo_dir="$(dirname "$script_dir")"

echo "Build all targets"
cd $repo_dir

# make directories for debug and release builds
if [ ! -d "build" ]; then
    mkdir build
fi
if [ ! -d "release" ]; then
    mkdir release
fi

# test debug and release version
build_types=('Debug' 'Release')

# store exit code for fuzzchecker-runs to provide that debug and release are both build once
exitcode=0

# write error msg for fuzz-runs that will be displayed at the bottom of the log
# but for building errors (there the script exits immediately)
error_msg=""

# build in parallel


build_pids=""
builds=""
for build_type in "${build_types[@]}"
do
    # different build folder for debug build and release build
    # splitting the two builds speeds up local building
    if [ "$build_type" == "Release" ]; then
        build_folder="$repo_dir/release"
    else
        build_folder="$repo_dir/build"
    fi

    cd $build_folder

    # make all
    echo "$build_type build"
    cmake -DCMAKE_BUILD_TYPE=$build_type -DDRATPROOF=OFF ..
    make all -j $(nproc)
    # necessary for parallel builds
    pid=$!
    build_pids+=" $pid"
    echo "build $build_type with $pid"
    builds+=" $build_type:$pid"
    # go back to calling directory
    cd $repo_dir
done

# collect results of the two builds
# for p in $build_pids; do
#    if ! wait $p; then
#        echo "Process $p failed"
#        echo "Type-PID-map: $builds"
#        exit 1
#    fi
# done
echo "build complete"<commit_msg>ci: check more cmake flags<commit_after>#!/bin/bash
# ci.sh, <NAME>, 2016, LGPL v2, see LICENSE
#
# This script builds all targets and runs the fuzzer on the solvers. Therefore it
# creates the build folder for Debug-builds and the release folder for Release-builds.
#
# It is intended to be used as a script for a CI-runner but can be used for local runs too.

# exits the script immediately if a command exits with a non-zero status
set -e

# solvers with their specific parameters
solver=('riss-simp' 'riss-core -config=Riss427:BMC_FULL' 'riss-core -config=CSSC2014' 'pfolio')

# parameters that are the same for all solvers
params="-mem-lim=2048"

# directory of this script (in repo/scripts)
script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# get absolute path for root directory of the repository
repo_dir="$(dirname "$script_dir")"

echo "Build all targets"
cd $repo_dir

# make directories for debug and release builds
if [ ! -d "build" ]; then
    mkdir build
fi
if [ ! -d "release" ]; then
    mkdir release
fi

# test debug and release version
build_types=('Debug' 'Release')

# store exit code for fuzzchecker-runs to provide that debug and release are both build once
exitcode=0

# write error msg for fuzz-runs that will be displayed at the bottom of the log
# but for building errors (there the script exits immediately)
error_msg=""

# build in parallel


build_pids=""
builds=""
for build_type in "${build_types[@]}"
do
    # different build folder for debug build and release build
    # splitting the two builds speeds up local building
    if [ "$build_type" == "Release" ]; then
        build_folder="$repo_dir/release"
    else
        build_folder="$repo_dir/build"
    fi

    cd $build_folder

    # make all
    echo "$build_type build - test cmake flags"
    rm -rf *
    cmake -DCMAKE_BUILD_TYPE=$build_type -DDRATPROOF=ON  -DFPIC=ON -DSTATIC_BINARIES=OFF ..
    make all -j $(nproc)

    # create the actual build files
    echo "$build_type build"
    rm -rf *
    cmake -DCMAKE_BUILD_TYPE=$build_type -DDRATPROOF=OFF ..
    make all -j $(nproc)
    # necessary for parallel builds
    pid=$!
    build_pids+=" $pid"
    echo "build $build_type with $pid"
    builds+=" $build_type:$pid"
    # go back to calling directory
    cd $repo_dir
done

# collect results of the two builds
# for p in $build_pids; do
#    if ! wait $p; then
#        echo "Process $p failed"
#        echo "Type-PID-map: $builds"
#        exit 1
#    fi
# done
echo "build complete"
{'fraction_non_alphanumeric': 0.09943241538784948, 'fraction_numerical': 0.007988227874710952, 'mean_word_length': 3.4886792452830186, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6907772', 'n_tokens_mistral': 1546, 'n_tokens_neox': 1487, 'n_words': 597}