]> git.sesse.net Git - stockfish/blob - .travis.yml
Also dampen NNUE eval with 50 move rule
[stockfish] / .travis.yml
1 language: cpp
2 dist: bionic
3
4 matrix:
5   include:
6     - os: linux
7       compiler: gcc
8       addons:
9         apt:
10           packages: ['g++-8', 'g++-8-multilib', 'g++-multilib', 'valgrind', 'expect', 'curl']
11       env:
12         - COMPILER=g++-8
13         - COMP=gcc
14
15     - os: linux
16       compiler: clang
17       addons:
18         apt:
19           packages: ['clang-10', 'llvm-10-dev', 'g++-multilib', 'valgrind', 'expect', 'curl']
20       env:
21         - COMPILER=clang++-10
22         - COMP=clang
23
24     - os: osx
25       osx_image: xcode12
26       compiler: gcc
27       env:
28         - COMPILER=g++
29         - COMP=gcc
30
31     - os: osx
32       osx_image: xcode12
33       compiler: clang
34       env:
35         - COMPILER=clang++
36         - COMP=clang
37
38 branches:
39   only:
40    - master
41
42 before_script:
43   - cd src
44
45 script:
46   # Download net
47   - make net
48
49   # Obtain bench reference from git log
50   - git log HEAD | grep "\b[Bb]ench[ :]\+[0-9]\{7\}" | head -n 1 | sed "s/[^0-9]*\([0-9]*\).*/\1/g" > git_sig
51   - export benchref=$(cat git_sig)
52   - echo "Reference bench:" $benchref
53
54   #
55   # Compiler version string
56   - $COMPILER -v
57
58   #
59   # Verify bench number against various builds
60   - export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
61   - make clean && make -j2 ARCH=x86-64-modern optimize=no debug=yes build && ../tests/signature.sh $benchref
62   - export CXXFLAGS="-Werror"
63   - make clean && make -j2 ARCH=x86-64-modern build && ../tests/signature.sh $benchref
64   - make clean && make -j2 ARCH=x86-64-ssse3 build && ../tests/signature.sh $benchref
65   - make clean && make -j2 ARCH=x86-64-sse3-popcnt build && ../tests/signature.sh $benchref
66   - make clean && make -j2 ARCH=x86-64 build && ../tests/signature.sh $benchref
67   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-32 optimize=no debug=yes build && ../tests/signature.sh $benchref; fi
68   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-32 build && ../tests/signature.sh $benchref; fi
69   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-32-old build && ../tests/signature.sh $benchref; fi
70   - if [[ "$TRAVIS_OS_NAME" == "linux" && "$COMP" == "gcc" ]]; then make clean && make -j2 ARCH=x86-64-modern profile-build && ../tests/signature.sh $benchref; fi
71
72   # compile only for some more advanced architectures (might not run in travis)
73   - make clean && make -j2 ARCH=x86-64-avx2 build
74   - make clean && make -j2 ARCH=x86-64-bmi2 build
75   # needs gcc 10 to compile
76   - if [[ "$COMPILER" != "g++-8" ]]; then make clean && make -j2 ARCH=x86-64-avx512 build; fi
77
78   #
79   # Check perft and reproducible search
80   - make clean && make -j2 ARCH=x86-64-modern build
81   - ../tests/perft.sh
82   - ../tests/reprosearch.sh
83
84   #
85   # Valgrind
86   #
87   - export CXXFLAGS="-O1 -fno-inline"
88   - if [ -x "$(command -v valgrind )" ]; then make clean && make -j2 ARCH=x86-64-modern debug=yes optimize=no build > /dev/null && ../tests/instrumented.sh --valgrind; fi
89   - if [ -x "$(command -v valgrind )" ]; then ../tests/instrumented.sh --valgrind-thread; fi
90
91   #
92   # Sanitizer
93   #
94   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-64-modern sanitize=undefined optimize=no debug=yes build > /dev/null && ../tests/instrumented.sh --sanitizer-undefined; fi
95   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-64-modern sanitize=thread    optimize=no debug=yes build > /dev/null && ../tests/instrumented.sh --sanitizer-thread; fi