Travis CI is a platform where you can test the software you build after every Github push (in my case).
After you have did the push, Github send a request to Travis and it start to clone and build your project about the instructions from
.travis.yml
configuration file from your repo.
But, this time I will tell you how to instruct Travis to compile your code with GCC 5 compiler version. And it’s very simple. I was needed to do that while I was working at WebDollar cryptocurrency project.
Bellow you have the config of Travis:
{ "language": "node_js", "sudo": "required", "before_install": [ "npm install -g node-gyp" ], "node_js": "stable", "env": "CXX=g++-5", "addons": { "apt": { "sources": [ "ubuntu-toolchain-r-test" ], "packages": [ "g++-5" ] } }, "group": "stable", "dist": "trusty", "os": "linux" }
As you can see, in the apt section, in sources I have the ubuntu-toolchain-r-test. This source contain the g++ version 5 compiler.
Bellow apt section I instruct the environment to use that GCC compiler.