Configure Travis-CI to use the GCC 5 compiler

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


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": [
"packages": [
"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.

Silviu Stroe

Silviu is a full stack developer and entrepreneur. He is the founder of one of the first VPN services in Romania, RoTunneling and is part of Yahoo - Wall of Fame. He also loves bleeding edge technologies and new challenges.

No Comments

You can leave the first : )

Leave a Reply

Your email address will not be published. Required fields are marked *