Skip to content

Commit 76b2f00

Browse files
authored
Update games.yml
1 parent 3503dcf commit 76b2f00

File tree

1 file changed

+69
-34
lines changed

1 file changed

+69
-34
lines changed

.github/workflows/games.yml

Lines changed: 69 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,21 @@ name: Fastchess SPRT Test (Linux)
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: write
8+
69
jobs:
7-
fastchess:
10+
11+
build-new:
812
runs-on: ubuntu-latest
913

1014
steps:
11-
- name: Checkout main engine
12-
uses: actions/checkout@v4
15+
- uses: actions/checkout@v4
1316
with:
1417
path: test_chesslib
1518

16-
- name: Checkout HandcraftedEngine branch
17-
uses: actions/checkout@v4
18-
with:
19-
repository: ${{ github.repository }}
20-
ref: HandcraftedEngine
21-
path: cppchess_engine
22-
23-
- name: Install dependencies
24-
run: |
25-
sudo apt update
26-
sudo apt install -y build-essential cmake wget unzip
27-
28-
- name: Download fastchess
29-
run: |
30-
wget https://github.com/Disservin/fastchess/releases/download/v1.8.0-alpha/fastchess-linux-x86-64.tar
31-
tar -xf fastchess-linux-x86-64.tar
32-
cp fastchess-linux-x86-64/fastchess .
33-
chmod +x fastchess
34-
35-
- name: Download UHO openings
36-
run: |
37-
wget https://github.com/official-stockfish/books/raw/refs/heads/master/UHO_Lichess_4852_v1.epd.zip
38-
unzip UHO_Lichess_4852_v1.epd.zip
19+
- name: Install deps
20+
run: sudo apt update && sudo apt install -y build-essential cmake
3921

4022
- name: Build new engine
4123
run: |
@@ -45,28 +27,81 @@ jobs:
4527
cmake .. -DCMAKE_BUILD_TYPE=Release
4628
make -j$(nproc)
4729
48-
- name: Build base engine (HandcraftedEngine)
30+
- name: Upload new engine
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: new-engine
34+
path: test_chesslib/build/engine
35+
36+
37+
build-base:
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
with:
43+
ref: HandcraftedEngine
44+
path: handcrafted
45+
46+
- name: Install deps
47+
run: sudo apt update && sudo apt install -y build-essential cmake
48+
49+
- name: Build base engine
4950
run: |
50-
cd cppchess_engine
51+
cd handcrafted
5152
mkdir build
5253
cd build
5354
cmake .. -DCMAKE_BUILD_TYPE=Release
5455
make -j$(nproc)
5556
56-
- name: Run fastchess SPRT
57+
- name: Upload base engine
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: base-engine
61+
path: handcrafted/build/chess_engine
62+
63+
64+
test:
65+
runs-on: ubuntu-latest
66+
needs: [build-new, build-base]
67+
68+
steps:
69+
- name: Download engines
70+
uses: actions/download-artifact@v4
71+
72+
- name: Install tools
73+
run: |
74+
sudo apt update
75+
sudo apt install -y wget unzip
76+
wget https://github.com/Disservin/fastchess/releases/download/v1.8.0-alpha/fastchess-linux-x86-64.tar
77+
tar -xf fastchess-linux-x86-64.tar
78+
chmod +x fastchess-linux-x86-64
79+
mv fastchess-linux-x86-64 fastchess
80+
81+
wget https://github.com/official-stockfish/books/raw/refs/heads/master/UHO_Lichess_4852_v1.epd.zip
82+
unzip UHO_Lichess_4852_v1.epd.zip
83+
84+
wget https://github.com/michiguel/Ordo/releases/download/1.0/ordo-linux64
85+
chmod +x ordo-linux64
86+
87+
- name: Run fastchess
5788
run: |
5889
./fastchess -recover \
59-
-engine cmd=test_chesslib/build/engine name=new \
60-
-engine cmd=cppchess_engine/build/chess_engine name=base \
90+
-engine cmd=new-engine/engine name=new \
91+
-engine cmd=base-engine/chess_engine name=base \
6192
-openings file=UHO_Lichess_4852_v1.epd format=epd order=random \
6293
-each tc=10+0.5 \
6394
-rounds 6000 \
6495
-concurrency $(nproc) \
6596
-pgnout notation=san nodes=true file=games1.pgn \
6697
-sprt elo0=0 elo1=2 alpha=0.05 beta=0.05
6798
68-
- name: Upload PGN
99+
./ordo-linux64 -o ratings.txt -- games1.pgn
100+
101+
- name: Upload results
69102
uses: actions/upload-artifact@v4
70103
with:
71-
name: games
72-
path: games1.pgn
104+
name: results
105+
path: |
106+
games1.pgn
107+
ratings.txt

0 commit comments

Comments
 (0)