<commit_before>dist: trusty
language: rust
services: docker
sudo: required
env:
  global:
    # This will be part of the release tarball
    # TODO change the project name
    - CRATE_NAME=polylabel-rs
    - TRAVIS_CARGO_NIGHTLY_FEATURE=""
    - DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
    # GH_TOKEN
    - secure: <KEY>

matrix:
  include:
    # STABLE
    - os: osx
      osx_image: xcode8.3
      rust: stable
      env: TARGET=x86_64-apple-darwin

    - os: linux
      rust: stable
      env: TARGET=x86_64-unknown-linux-gnu
      services: docker

    # BETA
    - os: osx
      rust: beta
      osx_image: xcode8.3
      env: TARGET=x86_64-apple-darwin

    - os: linux
      rust: beta
      env: TARGET=x86_64-unknown-linux-gnu

    # NIGHTLY
    - os: osx
      osx_image: xcode8.3
      rust: nightly
      env: TARGET=x86_64-apple-darwin

    - os: linux
      rust: nightly
      env: TARGET=x86_64-unknown-linux-gnu

before_install:
  - set -e

install:
  - bash ci/install.sh
  - source ~/.cargo/env || true

script:
  - bash ci/script.sh

after_script: set +e

before_deploy:
  # OSX deploy doesn't need a Dockerised manylinux1 build
  - if ! [[ "$TARGET" == "x86_64-unknown-linux-gnu" ]]; then bash ci/before_deploy_osx.sh; fi
  # Linux deploy needs Dockerised manylinux1 artefacts
  - if [[ "$TARGET" == "x86_64-unknown-linux-gnu" ]]; then docker pull $DOCKER_IMAGE; fi
  - if [[ "$TARGET" == "x86_64-unknown-linux-gnu" ]]; then sudo docker run -e TRAVIS_TAG="$TRAVIS_TAG" --rm -v `pwd`:/io $DOCKER_IMAGE /io/ci/before_deploy_manylinux1.sh; fi
  
deploy:
  # TODO update `api_key.secure`
  # - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new
  # - Encrypt it: `travis encrypt 0123456789012345678901234567890123456789
  # - Paste the output down here
  api_key:<commit_msg>Attempt to use Tarpaulin for coverage<commit_after>dist: trusty
language: rust
services: docker
sudo: required
addons:
    apt:
        packages:
            - libssl-dev
env:
  global:
    # This will be part of the release tarball
    # TODO change the project name
    - CRATE_NAME=polylabel-rs
    - TRAVIS_CARGO_NIGHTLY_FEATURE=""
    - DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
    # GH_TOKEN
    - secure: <KEY>

matrix:
  include:
    # STABLE
    - os: osx
      osx_image: xcode8.3
      rust: stable
      env: TARGET=x86_64-apple-darwin

    - os: linux
      rust: stable
      env: TARGET=x86_64-unknown-linux-gnu
      services: docker

    # BETA
    - os: osx
      rust: beta
      osx_image: xcode8.3
      env: TARGET=x86_64-apple-darwin

    - os: linux
      rust: beta
      env: TARGET=x86_64-unknown-linux-gnu

    # NIGHTLY
    - os: osx
      osx_image: xcode8.3
      rust: nightly
      env: TARGET=x86_64-apple-darwin

    - os: linux
      rust: nightly
      env: TARGET=x86_64-unknown-linux-gnu

before_install:
  - set -e

install:
  - bash ci/install.sh
  - source ~/.cargo/env || true

script:
  - bash ci/script.sh

after_script: set +e

after_success: |
  if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
    bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh)
    # Uncomment the following line for coveralls.io
    cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID

  fi

before_deploy:
  # OSX deploy doesn't need a Dockerised manylinux1 build
  - if ! [[ "$TARGET" == "x86_64-unknown-linux-gnu" ]]; then bash ci/before_deploy_osx.sh; fi
  # Linux deploy needs Dockerised manylinux1 artefacts
  - if [[ "$TARGET" == "x86_64-unknown-linux-gnu" ]]; then docker pull $DOCKER_IMAGE; fi
  - if [[ "$TARGET" == "x86_64-unknown-linux-gnu" ]]; then sudo docker run -e TRAVIS_TAG="$TRAVIS_TAG" --rm -v `pwd`:/io $DOCKER_IMAGE /io/ci/before_deploy_manylinux1.sh; fi
  
deploy:
  # TODO update `api_key.secure`
  # - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new
  # - Encrypt it: `travis encrypt 0123456789012345678901234567890123456789
  # - Paste the output down here
  api_key:
{'fraction_non_alphanumeric': 0.11188290746712974, 'fraction_numerical': 0.04614239642768544, 'mean_word_length': 2.764705882352941, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 3, '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': '283074', 'n_tokens_mistral': 1655, 'n_tokens_neox': 1493, 'n_words': 351}