forked from niklasf/python-chess
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
96 lines (96 loc) · 4.44 KB
/
.travis.yml
File metadata and controls
96 lines (96 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
dist: xenial
language: python
sudo: false
python:
- "3.6"
- "3.7"
matrix:
include:
- python: "3.8"
env: LATEST=1
cache:
directories:
- data/gaviota
- data/syzygy/suicide
before_cache:
- rm -f data/gaviota/travis_wait_*.log || true
- rm -f data/syzygy/suicide/travis_wait_*.log || true
before_install:
- | # Stockfish
wget https://stockfish.s3.amazonaws.com/stockfish-10-linux.zip
unzip stockfish-10-linux.zip
mkdir -p bin
cp stockfish-10-linux/Linux/stockfish_10_x64_modern bin/stockfish
chmod +x bin/stockfish
export PATH="`pwd`/bin:${PATH}"
which stockfish || (echo $PATH && false)
- | # Crafty
git clone https://github.com/lazydroid/crafty-chess
cd crafty-chess
make unix-gcc
export PATH="`pwd`:${PATH}"
cd ..
- | # Gaviota libgtb
git clone https://github.com/michiguel/Gaviota-Tablebases.git --depth 1
cd Gaviota-Tablebases
make
export LD_LIBRARY_PATH="`pwd`:${LD_LIBRARY_PATH}"
cd ..
- | # Gaviota tablebases
cd data/gaviota
travis_wait wget --no-verbose --no-check-certificate --no-clobber --input-file TEST-SOURCE.txt
cd ../..
- | # Suicide syzygy bases
cd data/syzygy/suicide
travis_wait wget --no-verbose --no-check-certificate --no-clobber --input-file TEST-SOURCE.txt
cd ../../..
install:
- pip install --upgrade pip wheel
- pip install --upgrade setuptools
- pip install --upgrade coveralls
- if [[ $LATEST -eq 1 ]]; then pip install --upgrade mypy; fi
- pip install -e .
script:
- # Unit tests
- coverage erase
- coverage run --source chess test.py -vv SquareTestCase
- coverage run --source chess --append test.py -vv MoveTestCase
- coverage run --source chess --append test.py -vv PieceTestCase
- coverage run --source chess --append test.py -vv BoardTestCase
- coverage run --source chess --append test.py -vv LegalMoveGeneratorTestCase
- coverage run --source chess --append test.py -vv BaseBoardTestCase
- coverage run --source chess --append test.py -vv SquareSetTestCase
- coverage run --source chess --append test.py -vv PolyglotTestCase
- coverage run --source chess --append test.py -vv PgnTestCase
- coverage run --source chess --append test.py -vv SyzygyTestCase
- coverage run --source chess --append test.py -vv NativeGaviotaTestCase
- coverage run --source chess --append test.py -vv GaviotaTestCase
- coverage run --source chess --append test.py -vv SvgTestCase
- coverage run --source chess --append test.py -vv SuicideTestCase
- coverage run --source chess --append test.py -vv AtomicTestCase
- coverage run --source chess --append test.py -vv RacingKingsTestCase
- coverage run --source chess --append test.py -vv HordeTestCase
- coverage run --source chess --append test.py -vv ThreeCheckTestCase
- coverage run --source chess --append test.py -vv CrazyhouseTestCase
- coverage run --source chess --append test.py -vv GiveawayTestCase
- coverage run --source chess --append test.py -vv EngineTestCase
- coverage run --source chess --append -m doctest README.rst --verbose
- echo Unit tests complete
- coveralls || [[ $? -eq 139 ]]
- # Typing
- if [[ $LATEST -eq 1 ]]; then python -m mypy chess/__init__.py; fi
- if [[ $LATEST -eq 1 ]]; then python -m mypy chess/engine.py || true; fi
- if [[ $LATEST -eq 1 ]]; then python -m mypy chess/gaviota.py; fi
- if [[ $LATEST -eq 1 ]]; then python -m mypy chess/pgn.py; fi
- if [[ $LATEST -eq 1 ]]; then python -m mypy chess/polyglot.py; fi
- if [[ $LATEST -eq 1 ]]; then python -m mypy chess/svg.py; fi
- if [[ $LATEST -eq 1 ]]; then python -m mypy chess/syzygy.py || true; fi
- if [[ $LATEST -eq 1 ]]; then python -m mypy chess/variant.py; fi
- # Perft tests
- if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 examples/perft/random.perft --max-nodes 10000; fi
- if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 examples/perft/tricky.perft; fi
- if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant giveaway examples/perft/giveaway.perft; fi
- if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant atomic examples/perft/atomic.perft; fi
- if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant racingkings examples/perft/racingkings.perft; fi
- if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant horde examples/perft/horde.perft; fi
- if [[ $LATEST -eq 1 ]]; then python examples/perft/perft.py -t 1 --variant crazyhouse examples/perft/crazyhouse.perft; fi