<commit_before>#!/bin/bash

set -o errtrace
set -x

pushd libopflex
./autogen.sh
./configure --enable-coverage &> /dev/null
make -j2
make check
sudo make install
find . -name test-suite.log|xargs cat
popd

pushd genie
mvn compile exec:java &> /dev/null
pushd target/libmodelgbp
bash autogen.sh &> /dev/null
./configure &> /dev/null
make &> /dev/null
sudo make install &> /dev/null
popd
popd

git clone https://github.com/openvswitch/ovs.git --branch v2.12.0 --depth 1
pushd ovs
./boot.sh &> /dev/null
./configure  --enable-shared &> /dev/null
make -j2 &> /dev/null
sudo make install &> /dev/null
sudo mkdir -p /usr/local/include/openvswitch/openvswitch
sudo mv /usr/local/include/openvswitch/*.h /usr/local/include/openvswitch/openvswitch
sudo mv /usr/local/include/openflow /usr/local/include/openvswitch
sudo cp -t "/usr/local/include/openvswitch/" include/*.h
sudo find lib -name "*.h" -exec cp --parents -t "/usr/local/include/openvswitch/" {} \;
popd

pushd agent-ovs
./autogen.sh &> /dev/null
./configure --enable-coverage &> /dev/null
make -j2
sudo make install
make check
find . -name test-suite.log|xargs cat
popd<commit_msg>Enable prometheus support in Travis CI builds<commit_after>#!/bin/bash

set -o errtrace
set -x

pushd libopflex
./autogen.sh
./configure --enable-coverage &> /dev/null
make -j2
make check
sudo make install
find . -name test-suite.log|xargs cat
popd

pushd genie
mvn compile exec:java &> /dev/null
pushd target/libmodelgbp
bash autogen.sh &> /dev/null
./configure &> /dev/null
make &> /dev/null
sudo make install &> /dev/null
popd
popd

git clone https://github.com/openvswitch/ovs.git --branch v2.12.0 --depth 1
pushd ovs
./boot.sh &> /dev/null
./configure  --enable-shared &> /dev/null
make -j2 &> /dev/null
sudo make install &> /dev/null
sudo mkdir -p /usr/local/include/openvswitch/openvswitch
sudo mv /usr/local/include/openvswitch/*.h /usr/local/include/openvswitch/openvswitch
sudo mv /usr/local/include/openflow /usr/local/include/openvswitch
sudo cp -t "/usr/local/include/openvswitch/" include/*.h
sudo find lib -name "*.h" -exec cp --parents -t "/usr/local/include/openvswitch/" {} \;
popd

git clone https://github.com/noironetworks/3rdparty-debian.git
cp 3rdparty-debian/prometheus/prometheus-cpp.patch ~
git clone https://github.com/jupp0r/prometheus-cpp.git
pushd prometheus-cpp
git checkout 9effb90b0c266316358680cbf862a8564eb2c2d4
git submodule init
git submodule update
git apply ~/prometheus-cpp.patch
mkdir _build && cd _build
cmake .. -DBUILD_SHARED_LIBS=ON &> /dev/null
make $make_args
make install
ls -l /usr/local/lib64
mv /usr/local/lib64/libprometheus-cpp-* /usr/local/lib/
popd

pushd agent-ovs
./autogen.sh &> /dev/null
./configure --enable-coverage --enable-prometheus &> /dev/null
make -j2
sudo make install
make check
find . -name test-suite.log|xargs cat
popd
{'fraction_non_alphanumeric': 0.14022662889518414, 'fraction_numerical': 0.017351274787535412, 'mean_word_length': 3.586038961038961, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 28, 'https://': 4, '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': '6237866', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1050, 'n_words': 272}