Skip to content

Commit ab92c6d

Browse files
committed
Download net in travis CI and adjust tests
Adjust travis to cover more archs, speedup instrumented testing, and download net before building to be able to compute hybrid bench. in preparation for better NNUE integration in CI. No functional change.
1 parent 4436bc5 commit ab92c6d

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

.travis.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ before_script:
4343
- cd src
4444

4545
script:
46+
# Download net
47+
- make net
48+
4649
# Obtain bench reference from git log
4750
- git log HEAD | grep "\b[Bb]ench[ :]\+[0-9]\{7\}" | head -n 1 | sed "s/[^0-9]*\([0-9]*\).*/\1/g" > git_sig
4851
- export benchref=$(cat git_sig)
@@ -55,26 +58,38 @@ script:
5558
#
5659
# Verify bench number against various builds
5760
- export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
58-
- make clean && make -j2 ARCH=x86-64 optimize=no debug=yes build && ../tests/signature.sh $benchref
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
5967
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-32 optimize=no debug=yes build && ../tests/signature.sh $benchref; fi
6068
- 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
6177

6278
#
6379
# Check perft and reproducible search
64-
- export CXXFLAGS="-Werror"
65-
- make clean && make -j2 ARCH=x86-64 build
80+
- make clean && make -j2 ARCH=x86-64-modern build
6681
- ../tests/perft.sh
6782
- ../tests/reprosearch.sh
6883

6984
#
7085
# Valgrind
7186
#
7287
- export CXXFLAGS="-O1 -fno-inline"
73-
- if [ -x "$(command -v valgrind )" ]; then make clean && make -j2 ARCH=x86-64 debug=yes optimize=no build > /dev/null && ../tests/instrumented.sh --valgrind; fi
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
7489
- if [ -x "$(command -v valgrind )" ]; then ../tests/instrumented.sh --valgrind-thread; fi
7590

7691
#
7792
# Sanitizer
7893
#
79-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-64 sanitize=undefined optimize=no debug=yes build > /dev/null && ../tests/instrumented.sh --sanitizer-undefined; fi
80-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean && make -j2 ARCH=x86-64 sanitize=thread optimize=no debug=yes build > /dev/null && ../tests/instrumented.sh --sanitizer-thread; fi
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

tests/instrumented.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ for args in "eval" \
7070
"go depth 10" \
7171
"go movetime 1000" \
7272
"go wtime 8000 btime 8000 winc 500 binc 500" \
73-
"bench 128 $threads 10 default depth"
73+
"bench 128 $threads 8 default depth"
7474
do
7575

7676
echo "$prefix $exeprefix ./stockfish $args $postfix"
@@ -80,7 +80,7 @@ done
8080

8181
# more general testing, following an uci protocol exchange
8282
cat << EOF > game.exp
83-
set timeout 10
83+
set timeout 240
8484
spawn $exeprefix ./stockfish
8585
8686
send "uci\n"
@@ -98,7 +98,7 @@ cat << EOF > game.exp
9898
expect "bestmove"
9999
100100
send "position fen 5rk1/1K4p1/8/8/3B4/8/8/8 b - - 0 1\n"
101-
send "go depth 30\n"
101+
send "go depth 20\n"
102102
expect "bestmove"
103103
104104
send "quit\n"
@@ -121,7 +121,7 @@ cat << EOF > syzygy.exp
121121
send "uci\n"
122122
send "setoption name SyzygyPath value ../tests/syzygy/\n"
123123
expect "info string Found 35 tablebases" {} timeout {exit 1}
124-
send "bench 128 1 10 default depth\n"
124+
send "bench 128 1 8 default depth\n"
125125
send "quit\n"
126126
expect eof
127127

0 commit comments

Comments
 (0)