Skip to content

Add Travis CI compilation #1458

merged 5 commits into from Oct 3, 2012

2 participants


Added Travis CI script and badge in

It's working against gcc and lang compiler (I've got to tune the build according to to make it pass under the 25 minutes timeout).

Some tests are failing so the badge will be red until it's fixed.

Mapnik member

This is great, thanks for the work on this. In my experience using ccache will slow down the build significantly the first run. I would assume travis creates a new sandbox from scratch each time, making ccache not able to benefit from its compiler caches.

Also, I think the choice of clang++ is good because its much faster, and uses less memory than g++. But, just beware as I've started to notice some odd clang++ on 32bit linux oddities/crashes. Hopefully 64 bit will be fine, but I need to test more.


clang++ is blazing fast comparing to g++, I confirm that!!! It's impressive!!!

I confirm that Travis CI create a new sandbox each time.
Following your reasoning, ccache should be useless (or worse).
I will try disabling it to see if the build time change.

I noticed something different: test results are not the same on g++ and clang++.

Mapnik member

thanks for the followup. Please post the test differences you see and confirm if the machine is 32 bit or 64, and what clang version.

Also, do you know how many cores and RAM travis-ci machines have? Is it predictable? Generally you can compile mapnik with JOBS==# Cores, but only if RAM is slightly > Cores. This is because, even with clang++, some cpp files will take up to 1/1.5 GB memory. I have an 8 core, 8 GB ram machine, so I compile with JOBS=6.


I have the same build time without ccache (as expected)

I don't know how many cores and RAM Travis CI machines have.
I think they all have the same configuration by language.

I started with JOBS=1 and increased until JOBS=4.
It reduced build duration but I can maybe try with more jobs to see if it still reduce the build time (which is around 18 minutes for clang and between 20/22 minutes for gcc).


After many tests, best performance with JOBS=2.

I know a little bit more about Travis CI machines: they are single core.

Mapnik member

sad that travis machines are a single core, but let's see how this goes :) Worth a shot. If it fails consistently due to build times I will simply disable. Or perhaps we could request somehow paying for machines with more cores or memory.

@springmeyer springmeyer merged commit 4ccec7f into mapnik:master Oct 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.