<commit_before>language: cpp
sudo: false

linux64_addons:
    addons: &linux64
      apt:
        sources:
        - ubuntu-toolchain-r-test
        - kalakris-cmake
        packages:
        - g++-4.8
        - cmake
        - doxygen
        - valgrind
        - libnetcdf-dev

linux32_addons:
    addons: &linux32
      apt:
        sources:
        - ubuntu-toolchain-r-test
        - kalakris-cmake
        packages:
        - g++-4.8
        - cmake
        - doxygen
        - valgrind
        - g++-4.8-multilib
        - linux-libc-dev:i386
        - libc6-dev-i386

matrix:
  fast_finish: true
  include:
    - os: linux
      compiler: clang
      env: SHARED_LIBS=ON CMAKE_EXTRA=-DCHFL_SYSTEM_NETCDF=ON
      addons: *linux64
    - os: linux
      compiler: clang
      env: SHARED_LIBS=OFF DEPLOY_DOCS=ON
      addons: *linux64
    - os: linux
      compiler: gcc
      env: SHARED_LIBS=ON
      addons: *linux64
    - os: linux
      compiler: gcc
      env: SHARED_LIBS=OFF
      addons: *linux64
    - os: linux
      compiler: gcc
      env: SHARED_LIBS=ON ARCH="x86" CMAKE_EXTRA=-DHAVE_LIBM=/lib32/libm.so.6
      addons: *linux32
    - os: linux
      compiler: gcc
      env: SHARED_LIBS=OFF ARCH="x86" CMAKE_EXTRA=-DHAVE_LIBM=/lib32/libm.so.6
      addons: *linux32
    - os: osx
      compiler: clang
      env: SHARED_LIBS=ON
    - os: osx
      compiler: clang
      env: SHARED_LIBS=OFF
    - os: osx
      compiler: gcc
      env: SHARED_LIBS=ON
    - os: osx
      compiler: gcc
      env: SHARED_LIBS=OFF

before_install:
  # Setting environement
  - cd $TRAVIS_BUILD_DIR
  - source scripts/ci/setup-travis.sh

script:
  - cd $TRAVIS_BUILD_DIR
  - mkdir build && cd build
  - cmake $CMAKE_ARGS $CMAKE_EXTRA ..
  - make
  - ctest --output-on-failure
  - cd $TRAVIS_BUILD_DIR
  # Check C API documentation
  - ./scripts/ci/check-capi.py
  # Build docs
  - |
    if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
        ./scripts/ci/build-docs.sh
    fi
  # Generate and upload coverage
  - |
    if ${DO_COVERAGE_ON_TRAVIS}; then
        cd $TRAVIS_BUILD_DIR
        find . -type f -name '*.gcno' -exec gcov-4.8 -pb {} +<commit_msg>Use 2 cores for Travis build<commit_after>language: cpp
sudo: false

linux64_addons:
    addons: &linux64
      apt:
        sources:
        - ubuntu-toolchain-r-test
        - kalakris-cmake
        packages:
        - g++-4.8
        - cmake
        - doxygen
        - valgrind
        - libnetcdf-dev

linux32_addons:
    addons: &linux32
      apt:
        sources:
        - ubuntu-toolchain-r-test
        - kalakris-cmake
        packages:
        - g++-4.8
        - cmake
        - doxygen
        - valgrind
        - g++-4.8-multilib
        - linux-libc-dev:i386
        - libc6-dev-i386

matrix:
  fast_finish: true
  include:
    - os: linux
      compiler: clang
      env: SHARED_LIBS=ON CMAKE_EXTRA=-DCHFL_SYSTEM_NETCDF=ON
      addons: *linux64
    - os: linux
      compiler: clang
      env: SHARED_LIBS=OFF DEPLOY_DOCS=ON
      addons: *linux64
    - os: linux
      compiler: gcc
      env: SHARED_LIBS=ON
      addons: *linux64
    - os: linux
      compiler: gcc
      env: SHARED_LIBS=OFF
      addons: *linux64
    - os: linux
      compiler: gcc
      env: SHARED_LIBS=ON ARCH="x86" CMAKE_EXTRA=-DHAVE_LIBM=/lib32/libm.so.6
      addons: *linux32
    - os: linux
      compiler: gcc
      env: SHARED_LIBS=OFF ARCH="x86" CMAKE_EXTRA=-DHAVE_LIBM=/lib32/libm.so.6
      addons: *linux32
    - os: osx
      compiler: clang
      env: SHARED_LIBS=ON
    - os: osx
      compiler: clang
      env: SHARED_LIBS=OFF
    - os: osx
      compiler: gcc
      env: SHARED_LIBS=ON
    - os: osx
      compiler: gcc
      env: SHARED_LIBS=OFF

before_install:
  # Setting environement
  - cd $TRAVIS_BUILD_DIR
  - source scripts/ci/setup-travis.sh

script:
  - cd $TRAVIS_BUILD_DIR
  - mkdir build && cd build
  - cmake $CMAKE_ARGS $CMAKE_EXTRA ..
  - make -j2
  - ctest -j2 --output-on-failure
  - cd $TRAVIS_BUILD_DIR
  # Check C API documentation
  - ./scripts/ci/check-capi.py
  # Build docs
  - |
    if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
        ./scripts/ci/build-docs.sh
    fi
  # Generate and upload coverage
  - |
    if ${DO_COVERAGE_ON_TRAVIS}; then
        cd $TRAVIS_BUILD_DIR
        find . -type f -name '*.gcno' -exec gcov-4.8 -pb {} +
{'fraction_non_alphanumeric': 0.1057981057981058, 'fraction_numerical': 0.021483021483021482, 'mean_word_length': 1.8116883116883118, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1394360', 'n_tokens_mistral': 1759, 'n_tokens_neox': 1661, 'n_words': 339}