<commit_before>
sudo: required
dist: trusty

language: c

before_install:
  - |
    DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
    mkdir ${DEPS_DIR} && cd ${DEPS_DIR}

  # Get cmake v3.5
  - |
    CMAKE_URL="https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz"
    mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
    export PATH=${DEPS_DIR}/cmake/bin:${PATH}

  # Get cmocka 1.0.1
  - |
    CMOCKA_URL="https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz"
    mkdir cmocka && travis_retry wget --no-check-certificate --quiet -O - ${CMOCKA_URL} | tar --strip-components=1 -xJ -C cmocka
    mkdir cmocka/build
    cd cmocka/build
    cmake -DCMAKE_BUILD_TYPE=Debug ..
    make
    sudo make install
    cd ../..
  
  - cd ..

  # Pystache needed for generation of MourOS diagnostic code
  - sudo pip install pystache

  # Create the build directories
  - |
    mkdir build
    mkdir build/install

install:    
  # Install libopencm3
  - ./build_libopencm3.sh ./build/install

before_script:
  # Generate the makefiles
  - |
    mkdir build/mouros
    mkdir build/mouros_tests
  - |
    cd build/mouros
    cmake -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_TOOLCHAIN_FILE=../../cmake/arm-none-eabi-toolchain.cmake -DCHIP_FAMILY=STM32F0 -DCMAKE_BUILD_TYPE=Debug ../..
    cd ../..
  - |
    cd build/mouros_tests
    cmake ../../tests
    cd ../..


script:
  # Build it
  - cmake --build build/mouros --clean-first
  # Build & run tests
  - cmake --build build/mouros_tests --clean-first && cmake --build build/mouros_tests --target test



addons:
  apt:
    packages:
      # arm-none-eabi gcc & newlib
      - gcc-arm-none-eabi
      - libnewlib-arm-none-eabi<commit_msg>Added documentation & coverage generation to Travis CI build.<commit_after>
sudo: required
dist: trusty

language: c

before_install:
  - |
    DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
    mkdir ${DEPS_DIR} && cd ${DEPS_DIR}

  # Get cmake v3.5
  - |
    CMAKE_URL="https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz"
    mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
    export PATH=${DEPS_DIR}/cmake/bin:${PATH}

  # Get cmocka 1.0.1
  - |
    CMOCKA_URL="https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz"
    mkdir cmocka && travis_retry wget --no-check-certificate --quiet -O - ${CMOCKA_URL} | tar --strip-components=1 -xJ -C cmocka
    mkdir cmocka/build
    cd cmocka/build
    cmake -DCMAKE_BUILD_TYPE=Debug ..
    make
    sudo make install
    cd ../..

  - cd ..

  # Pystache needed for generation of MourOS diagnostic code
  - sudo pip install pystache

  # Create the build directories
  - |
    mkdir build
    mkdir build/install

  # Needed for generation of coverage reports
  - sudo pip install gcovr

install:
  # Install libopencm3
  - ./build_libopencm3.sh ./build/install

before_script:
  # Generate the makefiles
  - |
    mkdir build/mouros
    mkdir build/mouros_tests
  - |
    cd build/mouros
    cmake -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_TOOLCHAIN_FILE=../../cmake/arm-none-eabi-toolchain.cmake -DCHIP_FAMILY=STM32F0 -DCMAKE_BUILD_TYPE=Debug ../..
    cd ../..
  - |
    cd build/mouros_tests
    cmake ../../tests
    cd ../..


script:
  # Build it
  - cmake --build build/mouros --clean-first
  # Build docs
  - cmake --build build/mouros --target mouros-doc
  # Build & run tests
  - cmake --build build/mouros_tests --clean-first && cmake --build build/mouros_tests --target test
  # Generate coverage
  - cmake --build build/mouros_tests --target coverage

addons:
  apt:
    packages:
      # arm-none-eabi gcc & newlib
      - gcc-arm-none-eabi
      - libnewlib-arm-none-eabi
      # Documentation tools
      - doxygen
      - graphviz
{'fraction_non_alphanumeric': 0.13249211356466878, 'fraction_numerical': 0.013669821240799159, 'mean_word_length': 2.4156193895870737, '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': '853200', 'n_tokens_mistral': 1517, 'n_tokens_neox': 1423, 'n_words': 302}