qbittorrent/qBittorrent — pull request #731 by john-peterson (2013-07-02 05:28:56+00:00)
Title: Adding Travis CI script

### Problem

A commit with build errors is sometimes pushed to origin because

*

This is a problem because

* the build fix commit use space in the history
* it's better if every commit build on all systems

It's necessary to build test structurally sound changes to detect minor compile errors because of f.e. a typing error

* a build test after push reduce the time used to test builds for minor errors

### Solution

Adding a Travis CI script because

* that solve the problem in the topic "Problem"

### Build time

Linux: [1:24](https://travis-ci.org/john-peterson/qBittorrent/builds/8645097)
OS X: none, the build doesn't complete (described in the topic "OS X")

### Platform

The build is on [either Linux or OS X](https://github.com/travis-ci/travis-ci/issues/216#issuecomment-19430107) rather than both

The reason to build in Linux is

* the build time is significantly lower

### System

The [output](https://www.dropbox.com/sh/2z5p162ovqtbn17/bQWX1aKTQK/note/travis) from

uname
nproc
lscpu
system_profiler

### OS X

The OS X build halt with this error

Checking for libboost ...Could not find boost system library!
no
Error: need libboost!

#### Simultaneous make jobs

The simultaneous make jobs is 4 despite `nproc` returning 1 because

* `-j 4` is around 100% faster than `-j 1`
* `-j 4` is around 20% faster than `-j 3`
* `-j 8` isn't faster than `-j 4`

### Linux

#### Simultaneous make jobs

The make command is ``make -j $((`nproc` / 2))`` rather than ``make -j `nproc``` because

* nproc return "32" which use much memory
* ``make -j `nproc``` [return](https://travis-ci.org/john-peterson/dolphin-emu/builds/8127049) "Killed (program cc1plus)" because memory is inadequate