Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add Travis CI compilation #1458

Merged
merged 5 commits into from

2 participants

@noirbizarre

Added Travis CI script and badge in README.md.

It's working against gcc and lang compiler (I've got to tune the build according to https://github.com/mapnik/mapnik/wiki/FasterCompiling to make it pass under the 25 minutes timeout).

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

@springmeyer
Owner

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.

@noirbizarre

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++.

@springmeyer
Owner

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.

@noirbizarre

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).

@noirbizarre

After many tests, best performance with JOBS=2.

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

@springmeyer
Owner

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 from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 23 additions and 8 deletions.
  1. +13 −0 .travis.yml
  2. +10 −8 README.md
View
13 .travis.yml
@@ -0,0 +1,13 @@
+language: cpp
+
+matrix:
+ include:
+ - compiler: clang
+ env: CXX_SCONS="-Qunused-arguments -fcolor-diagnostics" WARNING_CXXFLAGS="-Wno-unused-function -Wno-uninitialized -Wno-array-bounds -Wno-parentheses -Wno-char-subscripts -Wno-internal-linkage-in-inline"
+
+before_install:
+ - echo 'yes' | sudo add-apt-repository ppa:mapnik/boost
+ - sudo apt-get update -qq
+ - sudo apt-get install -qq libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev libboost-system-dev libboost-thread-dev python-nose libicu-dev libpng-dev libjpeg-dev libtiff-dev libz-dev libfreetype6-dev libxml2-dev libproj-dev libpq-dev libgdal-dev libcairomm-1.0-dev python-cairo-dev libsqlite3-dev
+
+script: scons configure JOBS=2 FAST=True CXX="$CXX $CXX_SCONS" WARNING_CXXFLAGS=$WARNING_CXXFLAGS && sudo make install && make test
View
18 README.md
@@ -1,12 +1,14 @@
-```
- _/ _/ _/ _/
- _/_/ _/_/ _/_/_/ _/_/_/ _/_/_/ _/ _/
- _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/
- _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
-_/ _/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/
- _/
- _/
```
+ _/ _/ _/ _/
+ _/_/ _/_/ _/_/_/ _/_/_/ _/_/_/ _/ _/
+ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/
+ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
+_/ _/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/
+ _/
+ _/
+```
+
+[![Build Status](https://secure.travis-ci.org/mapnik/mapnik.png)](http://travis-ci.org/mapnik/mapnik)
# What is Mapnik?
Something went wrong with that request. Please try again.