File: .travis.yml

package info (click to toggle)
trinityrnaseq 2.11.0+dfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 417,528 kB
  • sloc: perl: 48,420; cpp: 17,749; java: 12,695; python: 3,124; sh: 1,030; ansic: 983; makefile: 688; xml: 62
file content (205 lines) | stat: -rw-r--r-- 6,581 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
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
before_script:
  - |
    function show_log {
      for file in $(find . -name config.log); do
        echo "config.log File: ${file}"
        cat "${file}"
      done
    }
  - export TRINITY_HOME=`pwd`
  - make || (show_log; false)
  - make plugins || (show_log; false)
  - sudo make install > /dev/null
script:
  - make test -C sample_data/test_Trinity_Assembly