<commit_before>language: cpp
os: linux

notifications:
  email: false

cache:
  - apt
  - ccache

jobs:
    include:
        - os: linux
          name: "Linux Trusty with gcc 5.0, Python2.7 and the Pin tracer"
          dist: trusty
          compiler: gcc
          addons:
            apt:
              sources: ['ubuntu-toolchain-r-test']
              packages: ['g++-5', 'ccache', 'libboost1.55-all-dev', 'cmake', 'cmake-data', 'libpython2.7']
          env: [ PINTOOL=ON, KERNEL4=ON, PYTHON36=OFF, CXX_COMPILER=g++-5, C_COMPILER=gcc-5, Z3_PKG=z3-4.6.0-x64-ubuntu-14.04, PYTHON_VERSION=2.7, PYTHON_BINARY=/usr/bin/python2.7 ]

        - os: linux
          name: "Linux Trusty with gcc 5.0 and Python3.6"
          dist: trusty
          compiler: gcc
          addons:
            apt:
              sources: ['ubuntu-toolchain-r-test', 'deadsnakes']
              packages: ['g++-5', 'ccache', 'libboost1.55-all-dev', 'cmake', 'cmake-data', 'python3.6-dev']
          env: [ CXX_COMPILER=g++-5, C_COMPILER=gcc-5, Z3_PKG=z3-4.6.0-x64-ubuntu-14.04, PYTHON36=ON, PYTHON_VERSION=3.6, PYTHON_INCLUDE_DIR=/usr/include/python3.6m, PYTHON_LIBRARY=/usr/lib/libpython3.6m.so, PYTHON_BINARY=/usr/bin/python3.6 ]

        - os: linux
          name: "Linux Trusty with gcc 5.0, Python3.6 and GCOV"
          dist: trusty
          compiler: gcc
          addons:
            apt:
              sources: ['ubuntu-toolchain-r-test', 'deadsnakes']
              packages: ['g++-5', 'ccache', 'libboost1.55-all-dev', 'cmake', 'cmake-data', 'python3.6-dev']
          env: [ GCOV=ON, CXX_COMPILER=g++-5, C_COMPILER=gcc-5, Z3_PKG=z3-4.6.0-x64-ubuntu-14.04, PYTHON36=ON, PYTHON_VERSION=3.6, PYTHON_INCLUDE_DIR=/usr/include/python3.6m, PYTHON_LIBRARY=/usr/lib/libpython3.6m.so, PYTHON_BINARY=/usr/bin/python3.6 ]

        - os: linux
          name: "Linux Trusty with clang 5.0 and Python3.6"
          dist: trusty
          compiler: clang
          addons:
            apt:
              sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0', 'deadsnakes']
              packages: ['clang-5.0', 'ccache', 'libboost1.55-all-dev', 'cmake', 'cmake-data', 'python3.6-dev']
          env: [ CXX_COMPILER=clang++-5.0, C_COMPILER=clang-5.0, Z3_PKG=z3-4.6.0-x64-ubuntu-14.04, PYTHON36=ON, PYTHON_VERSION=3.6, PYTHON_INCLUDE_DIR=/usr/include/python3.6m, PYTHON_LIBRARY=/usr/lib/libpython3.6m.so, PYTHON_BINARY=/usr/bin/python3.6 ]

        - os: osx
          name: "OSX with xcode 10 and Python2.7"
          osx_image: xcode10
          compiler: clang
          env: [ CXX_COMPILER=clang++, C_COMPILER=clang, Z3_PKG=z3-4.6.0-x64-osx-10.11.6, PYTHON36=OFF, PYTHON_VERSION=2.7, PYTHON_BINARY=/usr/local/bin/python2 ]

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install python-setuptools; fi
  - export CC="$C_COMPILER"
  - export CXX="$CXX_COMPILER"
  # Install pip
  - wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py
  - sudo ${PYTHON_BINARY} ./get-pip.py
  # Install z3
  - wget https://github.com/Z3Prover/z3/releases/download/z3-4.6.0/${Z3_PKG}.zip
  - unzip ${Z3_PKG}.zip
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cp ${Z3_PKG}/bin/libz3.dylib /usr/local/lib/; fi
  # Back to /home/travis/build/JonathanSalwan
  - cd ..
  # Install gcov
  - if [[ "$GCOV" == "ON" ]]; then sudo ln -sf /usr/bin/gcov-5 /usr/bin/gcov; fi
  - if [[ "$GCOV" == "ON" ]]; then wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz; fi
  - if [[ "$GCOV" == "ON" ]]; then tar xf lcov_1.13.orig.tar.gz; fi
  - if [[ "$GCOV" == "ON" ]]; then sudo make -C lcov-1.13/ install; fi
  # Install capstone
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export DYLD_LIBRARY_PATH=/usr/local/opt/capstone/lib/:$DYLD_LIBRARY_PATH; fi
  - wget https://github.com/aquynh/capstone/archive/4.0.1.tar.gz
  - tar -xf ./4.0.1.tar.gz
  - cd ./capstone-4.0.1
  - bash ./make.sh
  - sudo make install
  - cd ../
  # Install unicorn. Only test AArch64 with Unicorn on Linux.
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git clone https://github.com/unicorn-engine/unicorn; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ./unicorn; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git checkout ec4c6365c3c91703b3725540100023f6a03db742; fi # 1.0.2-rc2
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then UNICORN_ARCHS="x86 arm aarch64" ./make.sh; fi # we use unicorn to only test some semantics
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo make install; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd bindings/python; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo ${PYTHON_BINARY} ./setup.py install; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ../../../; fi
  # Install LIEF
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo ${PYTHON_BINARY} -m pip install https://github.com/lief-project/LIEF/releases/download/0.7.0/linux_lief-0.7.0_py${PYTHON_VERSION}.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo ${PYTHON_BINARY} -m pip install https://github.com/lief-project/LIEF/releases/download/0.7.0/osx_lief-0.7.0_py${PYTHON_VERSION}.tar.gz; fi
  # Download pin
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget http://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-gcc.4.4.7-linux.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -xf pin-2.14-71313-gcc.4.4.7-linux.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget http://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-clang.4.2-mac.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar -xf pin-2.14-71313-clang.4.2-mac.tar.gz; fi
  # Move Triton into pin
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv ./Triton ./pin-2.14-71313-gcc.4.4.7-linux/source/tools/; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ./pin-2.14-71313-gcc.4.4.7-linux/source/tools/Triton; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mv ./Triton ./pin-2.14-71313-clang.4.2-mac/source/tools/; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd ./pin-2.14-71313-clang.4.2-mac/source/tools/Triton; fi

install:
  # Prepare build
  - mkdir build
  - cd build

script:
  # Needs for unittests
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo sh -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"; fi
  # Install
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cmake -DZ3_INCLUDE_DIRS=$PWD/../${Z3_PKG}/include -DZ3_LIBRARIES=$PWD/../${Z3_PKG}/bin/libz3.so -DCMAKE_C_COMPILER=$C_COMPILER -DCMAKE_CXX_COMPILER=$CXX_COMPILER -DGCOV=${GCOV:OFF} -DPYTHON36=${PYTHON36:OFF} -DPINTOOL=${PINTOOL:OFF} -DKERNEL4=${KERNEL4:OFF} ..; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake -DZ3_INCLUDE_DIRS=$PWD/../${Z3_PKG}/include -DZ3_LIBRARIES=$PWD/../${Z3_PKG}/bin/libz3.dylib -DPYTHON36=${PYTHON36:OFF} $(echo 'from os.path import abspath, join; from distutils.sysconfig import get_python_inc, get_python_lib; print "-DPYTHON_INCLUDE_DIR=%s -DPYTHON_LIBRARY=%s" % (get_python_inc(), abspath(join(get_python_lib(), "../../libpython2.7.dylib")))' | ${PYTHON_BINARY}) ..; fi
  - make -j2
  # Unittests
  - travis_wait 60 make check
  # Check installation succeed
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p /Users/travis/Library/Python/2.7/lib/python/site-packages; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/travis/Library/Python/2.7/lib/python/site-packages/homebrew.pth; fi
  - sudo make install

after_success:
  - if [[ "$GCOV" == "ON" ]]; then bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"; fi
<commit_msg>Bypass restriction<commit_after>language: cpp
os: linux

notifications:
  email: false

cache:
  - apt
  - ccache

jobs:
    include:
        - os: linux
          name: "Linux Trusty with gcc 5.0, Python2.7 and the Pin tracer"
          dist: trusty
          compiler: gcc
          addons:
            apt:
              sources: ['ubuntu-toolchain-r-test']
              packages: ['g++-5', 'ccache', 'libboost1.55-all-dev', 'cmake', 'cmake-data', 'libpython2.7']
          env: [ PINTOOL=ON, KERNEL4=ON, PYTHON36=OFF, CXX_COMPILER=g++-5, C_COMPILER=gcc-5, Z3_PKG=z3-4.6.0-x64-ubuntu-14.04, PYTHON_VERSION=2.7, PYTHON_BINARY=/usr/bin/python2.7 ]

        - os: linux
          name: "Linux Trusty with gcc 5.0 and Python3.6"
          dist: trusty
          compiler: gcc
          addons:
            apt:
              sources: ['ubuntu-toolchain-r-test', 'deadsnakes']
              packages: ['g++-5', 'ccache', 'libboost1.55-all-dev', 'cmake', 'cmake-data', 'python3.6-dev']
          env: [ CXX_COMPILER=g++-5, C_COMPILER=gcc-5, Z3_PKG=z3-4.6.0-x64-ubuntu-14.04, PYTHON36=ON, PYTHON_VERSION=3.6, PYTHON_INCLUDE_DIR=/usr/include/python3.6m, PYTHON_LIBRARY=/usr/lib/libpython3.6m.so, PYTHON_BINARY=/usr/bin/python3.6 ]

        - os: linux
          name: "Linux Trusty with gcc 5.0, Python3.6 and GCOV"
          dist: trusty
          compiler: gcc
          addons:
            apt:
              sources: ['ubuntu-toolchain-r-test', 'deadsnakes']
              packages: ['g++-5', 'ccache', 'libboost1.55-all-dev', 'cmake', 'cmake-data', 'python3.6-dev']
          env: [ GCOV=ON, CXX_COMPILER=g++-5, C_COMPILER=gcc-5, Z3_PKG=z3-4.6.0-x64-ubuntu-14.04, PYTHON36=ON, PYTHON_VERSION=3.6, PYTHON_INCLUDE_DIR=/usr/include/python3.6m, PYTHON_LIBRARY=/usr/lib/libpython3.6m.so, PYTHON_BINARY=/usr/bin/python3.6 ]

        - os: linux
          name: "Linux Trusty with clang 5.0 and Python3.6"
          dist: trusty
          compiler: clang
          addons:
            apt:
              sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0', 'deadsnakes']
              packages: ['clang-5.0', 'ccache', 'libboost1.55-all-dev', 'cmake', 'cmake-data', 'python3.6-dev']
          env: [ CXX_COMPILER=clang++-5.0, C_COMPILER=clang-5.0, Z3_PKG=z3-4.6.0-x64-ubuntu-14.04, PYTHON36=ON, PYTHON_VERSION=3.6, PYTHON_INCLUDE_DIR=/usr/include/python3.6m, PYTHON_LIBRARY=/usr/lib/libpython3.6m.so, PYTHON_BINARY=/usr/bin/python3.6 ]

        - os: osx
          name: "OSX with xcode 10 and Python2.7"
          osx_image: xcode10
          compiler: clang
          env: [ CXX_COMPILER=clang++, C_COMPILER=clang, Z3_PKG=z3-4.6.0-x64-osx-10.11.6, PYTHON36=OFF, PYTHON_VERSION=2.7, PYTHON_BINARY=/usr/local/bin/python2 ]

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install python-setuptools; fi
  - export CC="$C_COMPILER"
  - export CXX="$CXX_COMPILER"
  # Install pip
  - wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py
  - sudo ${PYTHON_BINARY} ./get-pip.py
  # Install z3
  - wget https://github.com/Z3Prover/z3/releases/download/z3-4.6.0/${Z3_PKG}.zip
  - unzip ${Z3_PKG}.zip
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cp ${Z3_PKG}/bin/libz3.dylib /usr/local/lib/; fi
  # Back to /home/travis/build/JonathanSalwan
  - cd ..
  # Install gcov
  - if [[ "$GCOV" == "ON" ]]; then sudo ln -sf /usr/bin/gcov-5 /usr/bin/gcov; fi
  - if [[ "$GCOV" == "ON" ]]; then wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz; fi
  - if [[ "$GCOV" == "ON" ]]; then tar xf lcov_1.13.orig.tar.gz; fi
  - if [[ "$GCOV" == "ON" ]]; then sudo make -C lcov-1.13/ install; fi
  # Install capstone
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export DYLD_LIBRARY_PATH=/usr/local/opt/capstone/lib/:$DYLD_LIBRARY_PATH; fi
  - wget https://github.com/aquynh/capstone/archive/4.0.1.tar.gz
  - tar -xf ./4.0.1.tar.gz
  - cd ./capstone-4.0.1
  - bash ./make.sh
  - sudo make install
  - cd ../
  # Install unicorn. Only test AArch64 with Unicorn on Linux.
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git clone https://github.com/unicorn-engine/unicorn; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ./unicorn; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git checkout ec4c6365c3c91703b3725540100023f6a03db742; fi # 1.0.2-rc2
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then UNICORN_ARCHS="x86 arm aarch64" ./make.sh; fi # we use unicorn to only test some semantics
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo make install; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd bindings/python; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo ${PYTHON_BINARY} ./setup.py install; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ../../../; fi
  # Install LIEF
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo ${PYTHON_BINARY} -m pip install https://github.com/lief-project/LIEF/releases/download/0.7.0/linux_lief-0.7.0_py${PYTHON_VERSION}.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo ${PYTHON_BINARY} -m pip install https://github.com/lief-project/LIEF/releases/download/0.7.0/osx_lief-0.7.0_py${PYTHON_VERSION}.tar.gz; fi
  # Download pin
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget -U 'TritonBrowser/13.37 (X11; Linux x86_64; rv:31.337) Firefox/30.0' http://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-gcc.4.4.7-linux.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -xf pin-2.14-71313-gcc.4.4.7-linux.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget -U 'TritonBrowser/13.37 (X11; Linux x86_64; rv:31.337) Firefox/30.0' http://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-clang.4.2-mac.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar -xf pin-2.14-71313-clang.4.2-mac.tar.gz; fi
  # Move Triton into pin
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv ./Triton ./pin-2.14-71313-gcc.4.4.7-linux/source/tools/; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ./pin-2.14-71313-gcc.4.4.7-linux/source/tools/Triton; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mv ./Triton ./pin-2.14-71313-clang.4.2-mac/source/tools/; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd ./pin-2.14-71313-clang.4.2-mac/source/tools/Triton; fi

install:
  # Prepare build
  - mkdir build
  - cd build

script:
  # Needs for unittests
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo sh -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"; fi
  # Install
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cmake -DZ3_INCLUDE_DIRS=$PWD/../${Z3_PKG}/include -DZ3_LIBRARIES=$PWD/../${Z3_PKG}/bin/libz3.so -DCMAKE_C_COMPILER=$C_COMPILER -DCMAKE_CXX_COMPILER=$CXX_COMPILER -DGCOV=${GCOV:OFF} -DPYTHON36=${PYTHON36:OFF} -DPINTOOL=${PINTOOL:OFF} -DKERNEL4=${KERNEL4:OFF} ..; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake -DZ3_INCLUDE_DIRS=$PWD/../${Z3_PKG}/include -DZ3_LIBRARIES=$PWD/../${Z3_PKG}/bin/libz3.dylib -DPYTHON36=${PYTHON36:OFF} $(echo 'from os.path import abspath, join; from distutils.sysconfig import get_python_inc, get_python_lib; print "-DPYTHON_INCLUDE_DIR=%s -DPYTHON_LIBRARY=%s" % (get_python_inc(), abspath(join(get_python_lib(), "../../libpython2.7.dylib")))' | ${PYTHON_BINARY}) ..; fi
  - make -j2
  # Unittests
  - travis_wait 60 make check
  # Check installation succeed
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p /Users/travis/Library/Python/2.7/lib/python/site-packages; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/travis/Library/Python/2.7/lib/python/site-packages/homebrew.pth; fi
  - sudo make install

after_success:
  - if [[ "$GCOV" == "ON" ]]; then bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"; fi

{'fraction_non_alphanumeric': 0.18680820765098063, 'fraction_numerical': 0.04828791507540941, 'mean_word_length': 2.998447204968944, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '165232', 'n_tokens_mistral': 6994, 'n_tokens_neox': 6515, 'n_words': 1131}