-
Notifications
You must be signed in to change notification settings - Fork 30
Integration with Travis CI
Travis CI is a hosted continuous integration platform that is free for all open source projects hosted on Github. With just a file called .travis.yml
containing some information about our project, we can trigger automated builds with every change to our code.
These instructions are based on following links:
-
Sign in to Travis CI with your GitHub account, accepting the GitHub access permissions confirmation.
-
Once you’re signed in, and Travis CI has synchronized your repositories from GitHub, go to your profile page and enable Travis CI for the repository you want to build.
-
Flip the switch to on for all repositories you'd like to enable.
In order for Travis CI to build your project, you'll need to write a file named .travis.yml
.
-
Add a
.travis.yml
file to the root of your repository. -
Following the link below to write configuration information into
.travis.yml
file.
https://docs.travis-ci.com/user/getting-started/
- Here is a sample
.travis.yml
configuration file for ipop-tincan repository:
language: cpp
compiler:
- g++
os:
- linux
before_install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -qq
install:
- sudo apt-get install g++-4.8 -y
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
script: make
Tip: Because the g++ version(4.6) on Travis CI is lack of support for c++11, so we need to install a newer version g++(4.8+) to build the code.
- To start a build, perform one of the following:
- Commit and push something to your repository
- Go to your repository's settings page, click on "Webhooks & Services" on the left menu, choose "Travis CI" in the "Services", and use the "Test service" button.
Note: You cannot trigger your first build using Test Hook button. It has to be triggered by a push to your repository.
- Check the build status page to see if your build passes or fails.