<commit_before>#!/bin/bash

set -ex


if [ -n "${PACKAGE-}" ]
then
    # build using opam, run tests, build package, install package

    wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh

    . .travis-opam.sh

else
    # install ocaml, install basic build dependencies, run standard build

    if [ "$TRAVIS_OS_NAME" = "osx" ]
    then
        brew update

        # see https://github.com/Homebrew/homebrew-core/issues/26358
        brew upgrade python

        # build dependencies (Mac OS X)
        brew install ocaml opam

        # optional dependencies for running tests
        brew install protobuf

        echo OCaml version
        ocaml -version

        echo OPAM versions
        opam --version
        opam --git-version

        export OPAMYES=1

        opam init
        eval `opam config env`

        # install basic build dependencies using opam
        opam install ocamlfind camlp4
<commit_msg>Travis: make tests work with the latest protobuf version on osx<commit_after>#!/bin/bash

set -ex


if [ -n "${PACKAGE-}" ]
then
    # build using opam, run tests, build package, install package

    wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh

    . .travis-opam.sh

else
    # install ocaml, install basic build dependencies, run standard build

    if [ "$TRAVIS_OS_NAME" = "osx" ]
    then
        brew update

        # see https://github.com/Homebrew/homebrew-core/issues/26358
        brew upgrade python

        # build dependencies (Mac OS X)
        brew install ocaml opam

        # optional dependencies for running tests
        brew install protobuf

        echo OCaml version
        ocaml -version

        echo OPAM versions
        opam --version
        opam --git-version

        export OPAMYES=1

        opam init
        eval `opam config env`

        # install basic build dependencies using opam
        opam install ocamlfind camlp4

        # so that tests pass with the latest protobuf version
        export CXXFLAGS='-std=c++14'

{'fraction_non_alphanumeric': 0.0762135922330097, 'fraction_numerical': 0.007766990291262136, 'mean_word_length': 2.118003025718608, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6559201', 'n_tokens_mistral': 632, 'n_tokens_neox': 596, 'n_words': 195}