Closed yarden closed 7 years ago
Hi @yarden,
Hope you are well. If you like, you can install samtools on the travis box if you want via Homebrew, or just grabbing it and installing it:
before_install:
- echo -ne '\n' | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
- export PATH=/home/travis/.linuxbrew/bin:$PATH
- brew tap homebrew/science
- brew install samtools
Thanks @roryk, this is super helpful! Is this cross-platform? I guess Travis CI defines variables for Mac OS X and Linux so I can make the installation of samtools conditional. I didn't know if there's a brew
installation call that works on both Linux and Mac OS X.
Hi Yarden,
Sweet. That installs linuxbrew. I didn’t know you could test on OSX as well. If you want to test on OSX, you can install Homebrew and tap homebrew-science the same way:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
So I think just changing that one line should make it work on OSX too.
On Mar 6, 2015, at 3:04 PM, Yarden Katz notifications@github.com wrote:
Thanks @roryk https://github.com/roryk, this is super helpful! Is this cross-platform? I guess Travis CI defines variables for Mac OS X and Linux so I can make the installation of samtools conditional
— Reply to this email directly or view it on GitHub https://github.com/yarden/MISO/issues/73#issuecomment-77625971.
Travis CI keeps giving me a "build timed out" error and can't see why. pip install .
works great for me.
https://travis-ci.org/yarden/MISO/jobs/53883802
Odd no? To deal with samtools I just had sudo apt-get install samtools
as pre installation step.
Looks like the timeout is happening from taking too long to install everything. I suggest using miniconda for installing python packages, e.g. from https://github.com/YeoLab/flotilla/blob/master/.travis.yml#L9
# Set up our virtualenv
before_install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.4.2-Linux-x86_64.sh -O miniconda.sh; fi
- chmod +x miniconda.sh
- ./miniconda.sh -b
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then export PATH=~/miniconda/bin:$PATH; else export PATH=~/miniconda3/bin/:$PATH; fi
- conda update --yes conda
Alternatively you can create docker instances of your test environments and test on those, which will greatly cut down on your test time since you'll just have to call the docker instance and install the latest version of misopy
Thanks for this. The miniconda looks complicated... and Docker is yet another system to worry about. I hear good things but then it gets to supporting too many fragmented ways of installing things (pip/pypi, travis-ci, conda for Linux, conda for Mac, Docker....).
I ended up fixing the Travis CI issue by adding the travis_wait
command: https://travis-ci.org/yarden/MISO
It works for 2.7 on Travis CI and for some weird reason not in 2.6, even though I know misopy installs on 2.6. But as you mentioned the testing time takes forever since it installs scipy, numpy, and other heavy weight dependencies every time it tests a github commit.
Yeah miniconda is not the best solution, but it's a solution. travis_wait
sounds like a really helpful command! I hadn't seen it before
Add support for Travis CI. Requires fix to
test_miso.py
: check ifsamtools
available upfront, quit testing successfully if not.