Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic TravisCI configuration file to build chopBAI #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peterjc
Copy link

@peterjc peterjc commented Nov 18, 2015

This pull request adds a basic .travis.yml file based on https://github.com/samtools/samtools/blob/develop/.travis.yml to compile chopBAI on both Linux and Mac.

This would address #5, results of this build here: https://travis-ci.org/peterjc/chopBAI/builds/91841166 (Initial failure visible in TravisCI build history from #7 resolved)

You would need to log into https://travis-ci.org/ as DecodeGenetics using your GitHub account, then enable testing for https://github.com/DecodeGenetics/chopBAI/ before this would be available from your repository.

@pmelsted
Copy link
Contributor

The Makefile now has a make test but it depends on samtools being in the path. Do you know if it's feasible to install the dependency before running the test?

@peterjc
Copy link
Author

peterjc commented Nov 24, 2015

Yes. The simplest route would be to add sudo apt-get install samtools to the .travis.yml recipe, but that has two downsides. First, using sudo excludes the preferred TravsisCI infrastructure https://docs.travis-ci.com/user/workers/container-based-infrastructure/ (note to self, I should update my pull request to do that, and make the same proposal to samtools [Update: Done, see https://github.com/samtools/samtools/pull/492 for samtools]). Second, it will likely get a very old version of samtools.

Alternatively one can download and compile samtools within the .travis.yml file, or for least overhead download a pre-compiled version (e.g. something like the collection from the Galaxy project used for their dependencies: https://depot.galaxyproject.org/package/linux/x86_64/samtools/ ), and put it on the local $PATH.

Which version of samtools do you need/recommend? I can try the later.

@pmelsted
Copy link
Contributor

The only thing we need is the samtools view command so any old version will do. I agree with that it's nicer to use the container based one.

@peterjc peterjc force-pushed the travisci branch 3 times, most recently from 919338f to 5b4df30 Compare November 24, 2015 14:31
This follows the example used by samtools to compile using GCC
and clang, under both 64 bit Linux and Mac OS X.

We require samtools to run "make test", and to make the TravisCI
run a quick as possible want to avoid downloading and compiling
it. Therefore using pre-compiled packages for Mac OS X and Linux
used by the Galaxy project for their dependency management.

Likewise require the seqan include files, and rather than cloning
their complete repository with full history just get a tar-ball
of the latest code, and extract just the include files we need.
@peterjc
Copy link
Author

peterjc commented Nov 24, 2015

Following the samtools example, we can get TravisCI to test under both gcc and clang on both 64 bit Linux and Mac OS X. The later means rules out downloading just one pre-compiled binary, hence the if statements in this revised version of the .travis.yml file where I download samtools.

Working now after a few false starts: https://travis-ci.org/peterjc/chopBAI/builds/92945368

@cmdcolin
Copy link

You can install certain apt packages from their whitelist under the container infrastructure. They have a "whitelist" of packages here https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise https://docs.travis-ci.com/user/apt/

Perhaps something like this might work

addons:
  apt:
    packages:
    - samtools

@peterjc
Copy link
Author

peterjc commented Nov 25, 2015

Good point - I forgot I asked them to whitelist samtools a while back, travis-ci/travis-ci#3599

I'm not sure what would be best practise here to continue to test under Mac OS X though, I presume the apt packages for TravisCI only apply to the Linux build targets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants