<commit_before>language: rust

sudo: false

addons:
  apt:
    packages:
      # for building MPI libraries
      - build-essential
      - gfortran
      # bindgen dependency
      - libclang-3.4-dev

rust:
  - stable
  - beta

env:
  matrix:
    - MPI_LIBRARY=mpich MPI_LIBRARY_VERSION=3.1.4
    - MPI_LIBRARY=mpich MPI_LIBRARY_VERSION=3.0.4
    - MPI_LIBRARY=openmpi MPI_LIBRARY_VERSION=1.10.0
    - MPI_LIBRARY=openmpi MPI_LIBRARY_VERSION=1.8.8
  global:
    - RELEASE_LIBRARY=mpich
    - RELEASE_LIBRARY_VERSION=3.1.4
    - LIBCLANG_PATH=/usr/lib/llvm-3.4/lib
    # GH_TOKEN=...
    - secure: "<KEY>
    # CRATES_IO_TOKEN=...
    - secure: "<KEY>

install:
  - sh ci/install-mpi.sh
  - pip install 'ghp-import' --user
  - export MPI_PREFIX="${HOME}/opt/${MPI_LIBRARY}-${MPI_LIBRARY_VERSION}"
  - export PATH="${HOME}/.local/bin:${MPI_PREFIX}/bin${PATH:+":${PATH}"}"
  - export LD_LIBRARY_PATH="${MPI_PREFIX}/lib${LD_LIBRARY_PATH:+":${LD_LIBRARY_PATH}"}"

script:
  - cargo build -v && cargo test -v && sh ci/run-examples.sh

before_deploy:
  # Set up credentials for deploying
  # Decrypt GitHub deploy SSH key
  - mkdir -p ${HOME}/.ssh && touch ${HOME}/.ssh/deploy_key && chmod 0600 ${HOME}/.ssh/deploy_key
  - openssl aes-256-cbc -K $encrypted_180303504686_key -iv $encrypted_180303504686_iv -in ci/deploy_key.enc -out ${HOME}/.ssh/deploy_key -d
  # Make SSH aware of key
  - echo -e "Host github.com\n  IdentityFile ${HOME}/.ssh/deploy_key" >> ${HOME}/.ssh/config
  # Make git push via SSH
  - git remote set-url origin <EMAIL>:bsteinb/rsmpi.git
  # Login to cates.io
  - cargo login "${CRATES_IO_TOKEN}"
  # Build crate
  - cargo package -v

deploy:
  # Build an upload documentation to GitHub pages
  - provider: script
    script: ci/deploy-docs.sh
    skip_cleanup: true
    on:
      tags: true
      condition: "${MPI_LIBRARY} = ${RELEASE_LIBRARY} && ${MPI_LIBRARY_VERSION} = ${RELEASE_LIBRARY_VERSION} && ${TRAVIS_RUST_VERSION} = stable"
  # Deploy the crate to crates.io
   - provider: script
     script: ci/deploy-crate.sh
     skip_cleanup: true
     on:
       tags: true
       condition: "${MPI_LIBRARY} = ${RELEASE_LIBRARY} && ${MPI_LIBRARY_VERSION} = ${RELEASE_LIBRARY_VERSION} && ${TRAVIS_RUST_VERSION} = stable"
  # Deploy crate to GitHub releases<commit_msg>Fix .travis.yml syntax.<commit_after>language: rust

sudo: false

addons:
  apt:
    packages:
      # for building MPI libraries
      - build-essential
      - gfortran
      # bindgen dependency
      - libclang-3.4-dev

rust:
  - stable
  - beta

env:
  matrix:
    - MPI_LIBRARY=mpich MPI_LIBRARY_VERSION=3.1.4
    - MPI_LIBRARY=mpich MPI_LIBRARY_VERSION=3.0.4
    - MPI_LIBRARY=openmpi MPI_LIBRARY_VERSION=1.10.0
    - MPI_LIBRARY=openmpi MPI_LIBRARY_VERSION=1.8.8
  global:
    - RELEASE_LIBRARY=mpich
    - RELEASE_LIBRARY_VERSION=3.1.4
    - LIBCLANG_PATH=/usr/lib/llvm-3.4/lib
    # GH_TOKEN=...
    - secure: "<KEY>
    # CRATES_IO_TOKEN=...
    - secure: "<KEY>

install:
  - sh ci/install-mpi.sh
  - pip install 'ghp-import' --user
  - export MPI_PREFIX="${HOME}/opt/${MPI_LIBRARY}-${MPI_LIBRARY_VERSION}"
  - export PATH="${HOME}/.local/bin:${MPI_PREFIX}/bin${PATH:+":${PATH}"}"
  - export LD_LIBRARY_PATH="${MPI_PREFIX}/lib${LD_LIBRARY_PATH:+":${LD_LIBRARY_PATH}"}"

script:
  - cargo build -v && cargo test -v && sh ci/run-examples.sh

before_deploy:
  # Set up credentials for deploying
  # Decrypt GitHub deploy SSH key
  - mkdir -p ${HOME}/.ssh && touch ${HOME}/.ssh/deploy_key && chmod 0600 ${HOME}/.ssh/deploy_key
  - openssl aes-256-cbc -K $encrypted_180303504686_key -iv $encrypted_180303504686_iv -in ci/deploy_key.enc -out ${HOME}/.ssh/deploy_key -d
  # Make SSH aware of key
  - echo -e "Host github.com\n  IdentityFile ${HOME}/.ssh/deploy_key" >> ${HOME}/.ssh/config
  # Make git push via SSH
  - git remote set-url origin <EMAIL>:bsteinb/rsmpi.git
  # Login to cates.io
  - cargo login "${CRATES_IO_TOKEN}"
  # Build crate
  - cargo package -v

deploy:
  # Build an upload documentation to GitHub pages
  - provider: script
    script: ci/deploy-docs.sh
    skip_cleanup: true
    on:
      tags: true
      condition: "${MPI_LIBRARY} = ${RELEASE_LIBRARY} && ${MPI_LIBRARY_VERSION} = ${RELEASE_LIBRARY_VERSION} && ${TRAVIS_RUST_VERSION} = stable"
  # Deploy the crate to crates.io
  - provider: script
    script: ci/deploy-crate.sh
    skip_cleanup: true
    on:
      tags: true
      condition: "${MPI_LIBRARY} = ${RELEASE_LIBRARY} && ${MPI_LIBRARY_VERSION} = ${RELEASE_LIBRARY_VERSION} && ${TRAVIS_RUST_VERSION} = stable"
  # Deploy crate to GitHub releases
{'fraction_non_alphanumeric': 0.13926541320507216, 'fraction_numerical': 0.02229995627459554, 'mean_word_length': 3.2282809611829943, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 13, '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': '42849', 'n_tokens_mistral': 1862, 'n_tokens_neox': 1687, 'n_words': 349}