@@ -4,11 +4,10 @@ sudo: false
44python :
55 - " 3.6"
66 - " 3.7"
7- - " 3.8"
87matrix :
98 include :
109 - python : " 3.8"
11- env : PERFT =1
10+ env : LATEST =1
1211cache :
1312 directories :
1413 - data/gaviota
@@ -18,80 +17,80 @@ before_cache:
1817 - rm -f data/syzygy/suicide/travis_wait_*.log || true
1918before_install :
2019 - | # Stockfish
21- if [[ $PERFT -ne 1 ]]; then
22- wget https://stockfish.s3.amazonaws.com/stockfish-10-linux.zip
23- unzip stockfish-10-linux.zip
24- mkdir -p bin
25- cp stockfish-10-linux/Linux/stockfish_10_x64_modern bin/stockfish
26- chmod +x bin/stockfish
27- export PATH="`pwd`/bin:${PATH}"
28- which stockfish || (echo $PATH && false)
29- fi
20+ wget https://stockfish.s3.amazonaws.com/stockfish-10-linux.zip
21+ unzip stockfish-10-linux.zip
22+ mkdir -p bin
23+ cp stockfish-10-linux/Linux/stockfish_10_x64_modern bin/stockfish
24+ chmod +x bin/stockfish
25+ export PATH="`pwd`/bin:${PATH}"
26+ which stockfish || (echo $PATH && false)
3027 - | # Crafty
31- if [[ $PERFT -ne 1 ]]; then
32- git clone https://github.com/lazydroid/crafty-chess
33- cd crafty-chess
34- make unix-gcc
35- export PATH="`pwd`:${PATH}"
36- cd ..
37- fi
28+ git clone https://github.com/lazydroid/crafty-chess
29+ cd crafty-chess
30+ make unix-gcc
31+ export PATH="`pwd`:${PATH}"
32+ cd ..
3833 - | # Gaviota libgtb
39- if [[ $PERFT -ne 1 ]]; then
40- git clone https://github.com/michiguel/Gaviota-Tablebases.git --depth 1
41- cd Gaviota-Tablebases
42- make
43- export LD_LIBRARY_PATH="`pwd`:${LD_LIBRARY_PATH}"
44- cd ..
45- fi
34+ git clone https://github.com/michiguel/Gaviota-Tablebases.git --depth 1
35+ cd Gaviota-Tablebases
36+ make
37+ export LD_LIBRARY_PATH="`pwd`:${LD_LIBRARY_PATH}"
38+ cd ..
4639 - | # Gaviota tablebases
47- if [[ $PERFT -ne 1 ]]; then
48- cd data/gaviota
49- travis_wait wget --no-verbose --no-check-certificate --no-clobber --input-file TEST-SOURCE.txt
50- cd ../..
51- fi
40+ cd data/gaviota
41+ travis_wait wget --no-verbose --no-check-certificate --no-clobber --input-file TEST-SOURCE.txt
42+ cd ../..
5243 - | # Suicide syzygy bases
53- if [[ $PERFT -ne 1 ]]; then
54- cd data/syzygy/suicide
55- travis_wait wget --no-verbose --no-check-certificate --no-clobber --input-file TEST-SOURCE.txt
56- cd ../../..
57- fi
44+ cd data/syzygy/suicide
45+ travis_wait wget --no-verbose --no-check-certificate --no-clobber --input-file TEST-SOURCE.txt
46+ cd ../../..
5847install :
5948 - pip install --upgrade pip wheel
6049 - pip install --upgrade setuptools
6150 - pip install --upgrade coveralls
51+ - if [[ $LATEST -eq 1 ]]; then pip install --upgrade mypy; fi
6252 - pip install -e .
6353script :
6454 - # Unit tests
65- - if [[ $PERFT -ne 1 ]]; then coverage erase; fi
66- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess test.py -vv SquareTestCase; fi
67- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv MoveTestCase; fi
68- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv PieceTestCase; fi
69- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv BoardTestCase; fi
70- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv LegalMoveGeneratorTestCase; fi
71- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv BaseBoardTestCase; fi
72- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv SquareSetTestCase; fi
73- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv PolyglotTestCase; fi
74- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv PgnTestCase; fi
75- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv SyzygyTestCase; fi
76- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv NativeGaviotaTestCase; fi
77- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv GaviotaTestCase; fi
78- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv SvgTestCase; fi
79- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv SuicideTestCase; fi
80- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv AtomicTestCase; fi
81- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv RacingKingsTestCase; fi
82- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv HordeTestCase; fi
83- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv ThreeCheckTestCase; fi
84- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv CrazyhouseTestCase; fi
85- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv GiveawayTestCase; fi
86- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append test.py -vv EngineTestCase; fi
87- - if [[ $PERFT -ne 1 ]]; then coverage run --source chess --append -m doctest README.rst --verbose; fi
88- - if [[ $PERFT -ne 1 ]]; then echo Unit tests complete; fi
89- - if [[ $PERFT -ne 1 ]]; then coveralls || [[ $? -eq 139 ]]; fi
55+ - coverage erase
56+ - coverage run --source chess test.py -vv SquareTestCase
57+ - coverage run --source chess --append test.py -vv MoveTestCase
58+ - coverage run --source chess --append test.py -vv PieceTestCase
59+ - coverage run --source chess --append test.py -vv BoardTestCase
60+ - coverage run --source chess --append test.py -vv LegalMoveGeneratorTestCase
61+ - coverage run --source chess --append test.py -vv BaseBoardTestCase
62+ - coverage run --source chess --append test.py -vv SquareSetTestCase
63+ - coverage run --source chess --append test.py -vv PolyglotTestCase
64+ - coverage run --source chess --append test.py -vv PgnTestCase
65+ - coverage run --source chess --append test.py -vv SyzygyTestCase
66+ - coverage run --source chess --append test.py -vv NativeGaviotaTestCase
67+ - coverage run --source chess --append test.py -vv GaviotaTestCase
68+ - coverage run --source chess --append test.py -vv SvgTestCase
69+ - coverage run --source chess --append test.py -vv SuicideTestCase
70+ - coverage run --source chess --append test.py -vv AtomicTestCase
71+ - coverage run --source chess --append test.py -vv RacingKingsTestCase
72+ - coverage run --source chess --append test.py -vv HordeTestCase
73+ - coverage run --source chess --append test.py -vv ThreeCheckTestCase
74+ - coverage run --source chess --append test.py -vv CrazyhouseTestCase
75+ - coverage run --source chess --append test.py -vv GiveawayTestCase
76+ - coverage run --source chess --append test.py -vv EngineTestCase
77+ - coverage run --source chess --append -m doctest README.rst --verbose
78+ - echo Unit tests complete
79+ - coveralls || [[ $? -eq 139 ]]
80+ - # Typing
81+ - if [[ $LATEST -eq 1 ]]; then python -m mypy chess/__init__.py; fi
82+ - if [[ $LATEST -eq 1 ]]; then python -m mypy chess/engine.py || true; fi
83+ - if [[ $LATEST -eq 1 ]]; then python -m mypy chess/gaviota.py || true; fi
84+ - if [[ $LATEST -eq 1 ]]; then python -m mypy chess/pgn.py; fi
85+ - if [[ $LATEST -eq 1 ]]; then python -m mypy chess/polyglot.py; fi
86+ - if [[ $LATEST -eq 1 ]]; then python -m mypy chess/svg.py; fi
87+ - if [[ $LATEST -eq 1 ]]; then python -m mypy chess/syzygy.py || true; fi
88+ - if [[ $LATEST -eq 1 ]]; then python -m mypy chess/variant.py; fi
9089 - # Perft tests
91- - if [[ $PERFT -eq 1 ]]; then python examples/perft/perft.py -t 1 examples/perft/random.perft --max-nodes 10000; fi
92- - if [[ $PERFT -eq 1 ]]; then python examples/perft/perft.py -t 1 examples/perft/tricky.perft; fi
93- - if [[ $PERFT -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant giveaway examples/perft/giveaway.perft; fi
94- - if [[ $PERFT -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant atomic examples/perft/atomic.perft; fi
95- - if [[ $PERFT -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant racingkings examples/perft/racingkings.perft; fi
96- - if [[ $PERFT -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant horde examples/perft/horde.perft; fi
97- - if [[ $PERFT -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant crazyhouse examples/perft/crazyhouse.perft; fi
90+ - if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 examples/perft/random.perft --max-nodes 10000; fi
91+ - if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 examples/perft/tricky.perft; fi
92+ - if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant giveaway examples/perft/giveaway.perft; fi
93+ - if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant atomic examples/perft/atomic.perft; fi
94+ - if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant racingkings examples/perft/racingkings.perft; fi
95+ - if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant horde examples/perft/horde.perft; fi
96+ - if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant crazyhouse examples/perft/crazyhouse.perft; fi
0 commit comments