New shell scripts for testing, used for travis CI (#957)
[stockfish] / .travis.yml
1 language: cpp
2 sudo: required
3 dist: trusty
4
5 matrix:
6   include:
7     - os: linux
8       compiler: gcc
9       addons:
10         apt:
11           sources: ['ubuntu-toolchain-r-test']
12           packages: ['g++-6', 'g++-6-multilib', 'g++-multilib', 'valgrind', 'expect']
13       env:
14         - COMPILER=g++-6
15         - COMP=gcc
16
17     - os: linux
18       compiler: clang
19       addons:
20         apt:
21           sources: ['ubuntu-toolchain-r-test']
22           packages: ['clang', 'g++-multilib', 'valgrind', 'expect']
23       env:
24         - COMPILER=clang++
25         - COMP=clang
26
27     - os: osx
28       compiler: gcc
29       env:
30         - COMPILER=g++
31         - COMP=gcc
32
33     - os: osx
34       compiler: clang
35       env:
36         - COMPILER=clang++ V='Apple LLVM 6.0' # Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
37         - COMP=clang
38
39 branches:
40   only:
41    - master
42
43 before_script:
44   - cd src
45
46 script:
47   #
48   # checking bench for various build types
49   #
50   # obtain reference
51   - make clean && make ARCH=x86-64 optimize=no debug=yes build > /dev/null && export benchref=$(../tests/signature.sh)
52   - echo "Reference bench:" $benchref
53   # verify against reference
54   - make clean && make ARCH=x86-64 build > /dev/null && ../tests/signature.sh $benchref
55   - make clean && make ARCH=x86-32 build > /dev/null && ../tests/signature.sh $benchref
56   #
57   # perft
58   #
59   - make clean && make ARCH=x86-64 build > /dev/null && ../tests/perft.sh
60   #
61   # reproducible search
62   #
63   - make clean && make ARCH=x86-64 build > /dev/null && ../tests/reprosearch.sh
64   #
65   # valgrind
66   #
67   - if [ -x "$(command -v valgrind )" ]; then make clean && make ARCH=x86-64 debug=yes optimize=no build > /dev/null && ../tests/instrumented.sh --valgrind; fi
68   #
69   # sanitizer
70   #
71   # use g++-6 as a proxy for having sanitizers, might need revision as they become available for more recent versions of clang/gcc
72   - if [[ "$COMPILER" == "g++-6" ]]; then make clean && make ARCH=x86-64 sanitize=yes build > /dev/null && ../tests/instrumented.sh --sanitizer; fi