]> git.sesse.net Git - stockfish/blob - .travis.yml
Change handling the special case of a single legal move.
[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   # Compiler version string
55   - $COMPILER -v
56
57   # test help target
58   - make help
59
60   # Verify bench number against various builds
61   - export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
62   - make clean && make -j2 ARCH=x86-64-modern optimize=no debug=yes build && ../tests/signature.sh $benchref
63   - export CXXFLAGS="-Werror"
64   - make clean && make -j2 ARCH=x86-64-modern build && ../tests/signature.sh $benchref
65   - make clean && make -j2 ARCH=x86-64-ssse3 build && ../tests/signature.sh $benchref
66   - make clean && make -j2 ARCH=x86-64-sse3-popcnt build && ../tests/signature.sh $benchref
67   - make clean && make -j2 ARCH=x86-64 build && ../tests/signature.sh $benchref
68   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=general-64 build && ../tests/signature.sh $benchref; fi
69   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-32 optimize=no debug=yes build && ../tests/signature.sh $benchref; fi
70   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-32-sse41-popcnt build && ../tests/signature.sh $benchref; fi
71   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-32-sse2 build && ../tests/signature.sh $benchref; fi
72   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-32 build && ../tests/signature.sh $benchref; fi
73   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=general-32 build && ../tests/signature.sh $benchref; fi
74   # workaround: exclude a custom version of llvm+clang, which doesn't find llvm-profdata on ubuntu
75   - if [[ "$TRAVIS_OS_NAME" != "linux" || "$COMP" == "gcc" ]]; then make clean && make -j2 ARCH=x86-64-modern profile-build && ../tests/signature.sh $benchref; fi
76
77   # compile only for some more advanced architectures (might not run in travis)
78   - make clean && make -j2 ARCH=x86-64-avx2 build
79   - make clean && make -j2 ARCH=x86-64-bmi2 build
80   - make clean && make -j2 ARCH=x86-64-avx512 build
81   - make clean && make -j2 ARCH=x86-64-vnni512 build
82   - make clean && make -j2 ARCH=x86-64-vnni256 build
83
84   #
85   # Check perft and reproducible search
86   - make clean && make -j2 ARCH=x86-64-modern build
87   - ../tests/perft.sh
88   - ../tests/reprosearch.sh
89
90   #
91   # Valgrind
92   #
93   - export CXXFLAGS="-O1 -fno-inline"
94   - 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
95   - if [ -x "$(command -v valgrind )" ]; then ../tests/instrumented.sh --valgrind-thread; fi
96
97   #
98   # Sanitizer
99   #
100   - 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
101   - 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