Combination of two ideas:
[stockfish] / .travis.yml
1 language: cpp
2
3 matrix:
4   include:
5     - os: linux
6       compiler: gcc
7       addons:
8         apt:
9           sources: ['ubuntu-toolchain-r-test']
10           packages: ['g++-4.8']
11       env:
12         - COMPILER=g++-4.8
13         - COMP=gcc
14
15     - os: linux
16       compiler: clang
17       addons:
18         apt:
19           sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7']
20           packages: ['clang-3.7']
21       env:
22         - COMPILER=clang++-3.7
23         - COMP=clang
24
25     - os: osx
26       compiler: gcc
27       env:
28         - COMPILER=g++-4.8
29         - COMP=gcc
30
31     - os: osx
32       compiler: clang
33       env:
34         - COMPILER=clang++ V='Apple LLVM 6.0' # Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
35         - COMP=clang
36
37 branches:
38   only:
39    - master
40
41 before_script:
42   - cd src
43
44 script:
45   - make clean && make build ARCH=x86-64 && ./stockfish bench 2>&1 >/dev/null | grep 'Nodes searched' | tee bench1
46   - make clean && make build ARCH=x86-32 && ./stockfish bench 2>&1 >/dev/null | grep 'Nodes searched' | tee bench2
47   - echo "Checking for same bench numbers..."
48   - diff bench1 bench2 > result
49   - test ! -s result