MRocklin
MRocklin

Reputation: 57319

Use sudo: true with single element of build matrix in travis.ci?

I use and love the Travis CI continuous integration for an open source project on GitHub. I like the fast container builds, so I set sudo: false globally on my script.

However, in one particular build of my build matrix I want to spin up my own a docker container, so I think I need sudo: true here. Does this mean that I need to use sudo: true for all of my builds or is there some way around this? I would like to set sudo: true for just one build. Alternatively, is it possible to have multiple .travis.yml scripts in the same GitHub repository?

Upvotes: 4

Views: 485

Answers (1)

MRocklin
MRocklin

Reputation: 57319

As shown in the numpy .travis.yml script you can specify sudo: true on a per-element basis.

  include:
    - python: 2.7
      sudo: true
      dist: trusty
      env: ...
    - python: 2.7
      env: ...

Upvotes: 3

Related Questions