Linux using no travis

2

So I'm trying to add my project to Travis, I noticed that it makes use of Ubuntu, I was wondering if there is any way to compile my project in CentOS and Ubuntu using Travis?

    
asked by anonymous 05.04.2015 / 05:07

2 answers

1

No. As the documentation itself says, this is only available for Ubuntu and OS X, being OS X used only for Objective-C builds.

From the CI environment OS :

  

Travis CI virtual machines are based on Ubuntu 12.04 LTS Server Edition 64 bit, with the exception of Objective-C builds, which runs on Mac OS X Mavericks.

Documentation link:

Travis CI: The Build Environment

    
05.04.2015 / 05:57
0

You can do this through a contour solution: Put a virtualizer into virtualization. If you add a Docker container to Travis it will be possible to run your build inside any OS. The file .travis.yml would look similar to the file below:

sudo: required
env:
  matrix:
  - OS_TYPE=centos OS_VERSION=6
  - OS_TYPE=centos OS_VERSION=7

services:
  - docker

before_install:
  - sudo apt-get update
  - echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"' | sudo tee /etc/default/docker > /dev/null
  - sudo service docker restart
  - sleep 5
  - sudo docker pull centos:centos${OS_VERSION}

script:
 # Run tests in Container
- tests/setup_tests.sh ${OS_VERSION}

Translating, you would be starting the Docker service by downloading the CentOS image in the desired version and running the build or tests in the CentOS Docker container.

References : link

    
19.06.2018 / 17:10