<commit_before>dist: trusty
sudo: false
git:
  depth: 1
language: generic
# Custom definitions
.conditions:
  if: &secondary type = cron OR env(SECONDARY) = true
matrix:
  include:
    # http://www.cpan.org/src/
    # X.XX-shrplib is a perl built with -Duseithreads.
    # https://docs.travis-ci.com/user/languages/perl/
    - language: perl
      perl: "5.26-shrplib"
      env: CC=gcc-8 CXX=g++-8
    # https://docs.travis-ci.com/user/languages/java/
    - language: java
      jdk: oraclejdk9
      env: CC=gcc-6 CXX=g++-6
    # https://docs.travis-ci.com/user/languages/python/
    - language: python
      python: "3.6"
    - language: generic
      env: CC=clang-3.9 CXX=clang++-3.9 LDFLAGS="-fopenmp=libiomp5"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.9
          packages:
            - clang-3.9
      if: *secondary
    - language: generic
      # Open MP support is available from clang-3.7.
      env: CC=clang-3.7 CXX=clang++-3.7 LDFLAGS="-fopenmp=libiomp5"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.7
          packages:
            - clang-3.7
      if: *secondary
    # Test old version of the dependency packages.
    - language: perl
      perl: "5.18-shrplib"
      env: BOWTIE2_VERSION=2.2.6
      if: *secondary
    # https://docs.travis-ci.com/user/reference/osx
    - os: osx
      osx_image: xcode9.4
      env: CC=gcc-8 CXX=g++-8
    - os: osx
      osx_image: xcode9.4
      # "clang++" installed by llvm@3.9 instead of "clang++-3.9".
      env: CC=clang-3.9 CXX=clang++
      if: *secondary
    - os: osx
      osx_image: xcode9.4
      env: CC=clang-3.7 CXX=clang++-3.7
      if: *secondary
  allow_failures:
    - env: BOWTIE2_VERSION=2.2.6
    - env: CC=clang-3.7 CXX=clang++-3.7 LDFLAGS="-fopenmp=libiomp5"
    - os: osx
      env: CC=clang-3.7 CXX=clang++-3.7
  fast_finish: true
install:
  - |
    if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
      # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
      sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
      sudo apt-get update -qq
      # Dependency packages for samtools.
      sudo apt-get install -qq \
        liblzma-dev \
        libbz2-dev
      if [[ "${CC}" =~ gcc- ]]; then
        echo "Installing ${CC}."
        sudo apt-get install -qq "${CC}"
      fi
      if [[ "${CXX}" =~ g\+\+- ]]; then
        echo "Installing ${CXX}."
        sudo apt-get install -qq "${CXX}"
      fi
      if [[ "${CC}" =~ clang- ]]; then
        echo "Installing ${CC}."
        sudo apt-get install -qq "${CC}" libiomp-dev
      fi
    else
      # osx
      export HOMEBREW_NO_AUTO_UPDATE=1
      if [[ "${CC}" =~ gcc- ]]; then
        # Update command line tool to avoid an error:
        # "_stdio.h: No such file or directory", when building samtools.
        softwareupdate --list
        softwareupdate --install "Command Line Tools (macOS High Sierra version 10.13) for Xcode-9.4"

        # Uninstall oclint to install gcc on OSX.
        # https://github.com/travis-ci/travis-ci/issues/8826
        brew cask uninstall oclint
        CC_PKG="$(echo "${CC}" | sed -e 's/-/@/')"
        echo "Installing ${CC_PKG}."
        brew install "${CC_PKG}"
      fi
      if [[ "${CC}" =~ clang- ]]; then
        echo "Installing ${CC}."
        CC_VERSION=$(echo "${CC}" | sed -e 's/^clang-//')
        brew install "llvm@${CC_VERSION}"
        brew install libomp
        CC_PREFIX=$(brew --prefix "llvm@${CC_VERSION}")
        export PATH="${CC_PREFIX}/bin:$PATH"
        export LDFLAGS="-L${CC_PREFIX}/lib -Wl,-rpath,${CC_PREFIX}/lib"
        export CPPFLAGS="-I${CC_PREFIX}/include"
      fi
    fi

  - pushd "${HOME}"

  # htslib.
  # A dependency of samtools.
  - wget https://github.com/samtools/htslib/archive/1.9.tar.gz
  - mv 1.9.tar.gz htslib-1.9.tar.gz
  - tar xzf htslib-1.9.tar.gz
  - pushd htslib-1.9
  - make
  - sudo make install
  - popd

  # Samtools.
  # Install from autoconf to avoid a lib file load error on Trinity unit test.
  - wget https://github.com/samtools/samtools/archive/1.9.tar.gz
  - mv 1.9.tar.gz samtools-1.9.tar.gz
  - tar xzf samtools-1.9.tar.gz
  - pushd samtools-1.9
  - autoheader
  - autoconf -Wno-syntax
  - ./configure || (cat config.log; false)
  - make
  - sudo make install
  - popd
  - samtools --version

  # Bowtie2
  - export BOWTIE2_VERSION="${BOWTIE2_VERSION:-2.3.4.1}"
  - |
    if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
      BOWTIE2_OS_NAME="${TRAVIS_OS_NAME}"
    else
      # osx
      BOWTIE2_OS_NAME=macos
    fi
  - wget https://github.com/BenLangmead/bowtie2/releases/download/v${BOWTIE2_VERSION}/bowtie2-${BOWTIE2_VERSION}-${BOWTIE2_OS_NAME}-x86_64.zip
  - unzip bowtie2-${BOWTIE2_VERSION}-${BOWTIE2_OS_NAME}-x86_64.zip
  - sudo cp -p bowtie2-${BOWTIE2_VERSION}*/bowtie2* /usr/local/bin/
  - bowtie2 --version

  # Jellyfish
  - export JELLYFISH_VERSION="${JELLYFISH_VERSION:-2.2.10}"
  - wget https://github.com/gmarcais/Jellyfish/releases/download/v${JELLYFISH_VERSION}/jellyfish-${JELLYFISH_VERSION}.tar.gz
  - tar xzf jellyfish-${JELLYFISH_VERSION}.tar.gz
  - pushd jellyfish-${JELLYFISH_VERSION}
  - ./configure || (cat config.log; false)
  - make
  - sudo make install
  - popd
  - jellyfish --version

  # Salmon
  - |
    if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
      export SALMON_VERSION="${SALMON_VERSION:-0.11.2}"
      wget https://github.com/COMBINE-lab/salmon/releases/download/v${SALMON_VERSION}/salmon-${SALMON_VERSION}-linux_x86_64.tar.gz
      tar xzf salmon-${SALMON_VERSION}-linux_x86_64.tar.gz
      sudo ln -s $(pwd)/salmon-${SALMON_VERSION}-linux_x86_64/bin/salmon /usr/local/bin/salmon
    else
      # osx
      # osx binary archive with required shared library files (tbb + libc++).
      # https://github.com/COMBINE-lab/salmon/issues/260
      wget https://github.com/COMBINE-lab/salmon/files/2284726/salmon-latest_mac_osx_sierra_x86_64.tar.gz
      tar xzvf salmon-latest_mac_osx_sierra_x86_64.tar.gz
      sudo cp -p salmon-*/bin/salmon /usr/local/bin/salmon
      # Check used shared libraries.
      otool -L /usr/local/bin/salmon
      # Copy the bundled required library files.
      sudo cp -p salmon-*/lib/*.{a,dylib} /usr/local/lib/
    fi
  - salmon --version

  # numpy
  - sudo pip install numpy

  - popd
script:
  - |
    export TRINITY_HOME=`pwd` && \
    make && \
    make plugins && \
    sudo make install > /dev/null && \
    make test -C sample_data/test_Trinity_Assembly
<commit_msg>.travis.yml: Fix osx gcc-8 case.<commit_after>dist: trusty
sudo: false
git:
  depth: 1
language: generic
# Custom definitions
.conditions:
  if: &secondary type = cron OR env(SECONDARY) = true
matrix:
  include:
    # http://www.cpan.org/src/
    # X.XX-shrplib is a perl built with -Duseithreads.
    # https://docs.travis-ci.com/user/languages/perl/
    - language: perl
      perl: "5.26-shrplib"
      env: CC=gcc-8 CXX=g++-8
    # https://docs.travis-ci.com/user/languages/java/
    - language: java
      jdk: oraclejdk9
      env: CC=gcc-6 CXX=g++-6
    # https://docs.travis-ci.com/user/languages/python/
    - language: python
      python: "3.6"
    - language: generic
      env: CC=clang-3.9 CXX=clang++-3.9 LDFLAGS="-fopenmp=libiomp5"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.9
          packages:
            - clang-3.9
      if: *secondary
    - language: generic
      # Open MP support is available from clang-3.7.
      env: CC=clang-3.7 CXX=clang++-3.7 LDFLAGS="-fopenmp=libiomp5"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.7
          packages:
            - clang-3.7
      if: *secondary
    # Test old version of the dependency packages.
    - language: perl
      perl: "5.18-shrplib"
      env: BOWTIE2_VERSION=2.2.6
      if: *secondary
    # https://docs.travis-ci.com/user/reference/osx
    - os: osx
      osx_image: xcode9.4
      env: CC=gcc-8 CXX=g++-8
    - os: osx
      osx_image: xcode9.4
      # "clang++" installed by llvm@3.9 instead of "clang++-3.9".
      env: CC=clang-3.9 CXX=clang++
      if: *secondary
    - os: osx
      osx_image: xcode9.4
      env: CC=clang-3.7 CXX=clang++-3.7
      if: *secondary
  allow_failures:
    - env: BOWTIE2_VERSION=2.2.6
    - env: CC=clang-3.7 CXX=clang++-3.7 LDFLAGS="-fopenmp=libiomp5"
    - os: osx
      env: CC=clang-3.7 CXX=clang++-3.7
  fast_finish: true
install:
  - |
    if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
      # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
      sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
      sudo apt-get update -qq
      # Dependency packages for samtools.
      sudo apt-get install -qq \
        liblzma-dev \
        libbz2-dev
      if [[ "${CC}" =~ gcc- ]]; then
        echo "Installing ${CC}."
        sudo apt-get install -qq "${CC}"
      fi
      if [[ "${CXX}" =~ g\+\+- ]]; then
        echo "Installing ${CXX}."
        sudo apt-get install -qq "${CXX}"
      fi
      if [[ "${CC}" =~ clang- ]]; then
        echo "Installing ${CC}."
        sudo apt-get install -qq "${CC}" libiomp-dev
      fi
    else
      # osx
      export HOMEBREW_NO_AUTO_UPDATE=1
      if [[ "${CC}" =~ gcc- ]]; then
        # Update command line tool to avoid an error:
        # "_stdio.h: No such file or directory", when building samtools.
        softwareupdate --list
        softwareupdate --install "Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.1"

        CC_PKG="$(echo "${CC}" | sed -e 's/-/@/')"
        echo "Installing ${CC_PKG}."
        brew install "${CC_PKG}"
      fi
      if [[ "${CC}" =~ clang- ]]; then
        echo "Installing ${CC}."
        CC_VERSION=$(echo "${CC}" | sed -e 's/^clang-//')
        brew install "llvm@${CC_VERSION}"
        brew install libomp
        CC_PREFIX=$(brew --prefix "llvm@${CC_VERSION}")
        export PATH="${CC_PREFIX}/bin:$PATH"
        export LDFLAGS="-L${CC_PREFIX}/lib -Wl,-rpath,${CC_PREFIX}/lib"
        export CPPFLAGS="-I${CC_PREFIX}/include"
      fi
    fi

  - pushd "${HOME}"

  # htslib.
  # A dependency of samtools.
  - wget https://github.com/samtools/htslib/archive/1.9.tar.gz
  - mv 1.9.tar.gz htslib-1.9.tar.gz
  - tar xzf htslib-1.9.tar.gz
  - pushd htslib-1.9
  - make
  - sudo make install
  - popd

  # Samtools.
  # Install from autoconf to avoid a lib file load error on Trinity unit test.
  - wget https://github.com/samtools/samtools/archive/1.9.tar.gz
  - mv 1.9.tar.gz samtools-1.9.tar.gz
  - tar xzf samtools-1.9.tar.gz
  - pushd samtools-1.9
  - autoheader
  - autoconf -Wno-syntax
  - ./configure || (cat config.log; false)
  - make
  - sudo make install
  - popd
  - samtools --version

  # Bowtie2
  - export BOWTIE2_VERSION="${BOWTIE2_VERSION:-2.3.4.1}"
  - |
    if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
      BOWTIE2_OS_NAME="${TRAVIS_OS_NAME}"
    else
      # osx
      BOWTIE2_OS_NAME=macos
    fi
  - wget https://github.com/BenLangmead/bowtie2/releases/download/v${BOWTIE2_VERSION}/bowtie2-${BOWTIE2_VERSION}-${BOWTIE2_OS_NAME}-x86_64.zip
  - unzip bowtie2-${BOWTIE2_VERSION}-${BOWTIE2_OS_NAME}-x86_64.zip
  - sudo cp -p bowtie2-${BOWTIE2_VERSION}*/bowtie2* /usr/local/bin/
  - bowtie2 --version

  # Jellyfish
  - export JELLYFISH_VERSION="${JELLYFISH_VERSION:-2.2.10}"
  - wget https://github.com/gmarcais/Jellyfish/releases/download/v${JELLYFISH_VERSION}/jellyfish-${JELLYFISH_VERSION}.tar.gz
  - tar xzf jellyfish-${JELLYFISH_VERSION}.tar.gz
  - pushd jellyfish-${JELLYFISH_VERSION}
  - ./configure || (cat config.log; false)
  - make
  - sudo make install
  - popd
  - jellyfish --version

  # Salmon
  - |
    if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
      export SALMON_VERSION="${SALMON_VERSION:-0.11.2}"
      wget https://github.com/COMBINE-lab/salmon/releases/download/v${SALMON_VERSION}/salmon-${SALMON_VERSION}-linux_x86_64.tar.gz
      tar xzf salmon-${SALMON_VERSION}-linux_x86_64.tar.gz
      sudo ln -s $(pwd)/salmon-${SALMON_VERSION}-linux_x86_64/bin/salmon /usr/local/bin/salmon
    else
      # osx
      # osx binary archive with required shared library files (tbb + libc++).
      # https://github.com/COMBINE-lab/salmon/issues/260
      wget https://github.com/COMBINE-lab/salmon/files/2284726/salmon-latest_mac_osx_sierra_x86_64.tar.gz
      tar xzvf salmon-latest_mac_osx_sierra_x86_64.tar.gz
      sudo cp -p salmon-*/bin/salmon /usr/local/bin/salmon
      # Check used shared libraries.
      otool -L /usr/local/bin/salmon
      # Copy the bundled required library files.
      sudo cp -p salmon-*/lib/*.{a,dylib} /usr/local/lib/
    fi
  - salmon --version

  # numpy
  - sudo pip install numpy

  - popd
script:
  - |
    export TRINITY_HOME=`pwd` && \
    make && \
    make plugins && \
    sudo make install > /dev/null && \
    make test -C sample_data/test_Trinity_Assembly

{'fraction_non_alphanumeric': 0.14874634671588988, 'fraction_numerical': 0.025688355637594217, 'mean_word_length': 2.251562890722681, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 25, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3767755', 'n_tokens_mistral': 5174, 'n_tokens_neox': 4920, 'n_words': 976}