Skip to content

assign hash move max score #217

assign hash move max score

assign hash move max score #217

Workflow file for this run

name: Tests
on:
push:
paths:
- 'Rudim/**'
- 'Rudim.Test/**'
- 'Rudim.sln'
- '.github/workflows/pipeline.yml'
branches: [ main ]
pull_request:
paths:
- 'Rudim/**'
- 'Rudim.Test/**'
- 'Rudim.sln'
- '.github/workflows/pipeline.yml'
branches: [ main ]
jobs:
build:
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Perft
run: dotnet run -c Release --perft --project='Rudim'
- name: Test
run: dotnet test --no-build --verbosity normal -c Release --collect:"XPlat Code Coverage"
- name: Benchmark
working-directory: Rudim
run: |
dotnet run -c Release --benchmark
echo "$(cat BenchmarkDotNet.Artifacts/results/Rudim.Benchmark-report-github.md)" >> $GITHUB_STEP_SUMMARY
- name: Generate Coverage Report
run: |
dotnet tool install --global dotnet-reportgenerator-globaltool
reportgenerator "-reports:**/coverage.cobertura.xml" "-targetdir:coverage-report"
- name: Upload coverage artifact
uses: actions/upload-pages-artifact@v3
with:
path: coverage-report
name: 'coverage-report'
- name: Deploy Coverage Report to GitHub Pages
uses: actions/deploy-pages@v4
with:
artifact_name: coverage-report
tournament:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Build Latest Rudim
working-directory: Rudim
run: dotnet publish -c Release -p:PublishProfile=FolderProfile
- name: Download Stable Rudim
run: |
mkdir -p stable-rudim
wget https://github.com/znxftw/rudim/releases/latest/download/linux-x64.zip
unzip -o linux-x64.zip -d stable-rudim
chmod +x stable-rudim/Rudim
- name: Download Fastchess and Openings
run: |
# Download and setup fastchess
wget https://github.com/Disservin/fastchess/releases/download/v1.1.0-alpha/fastchess-ubuntu-22.04.zip
unzip -o fastchess-ubuntu-22.04.zip
chmod +x fastchess-ubuntu-22.04
# Download and extract openings book
wget https://github.com/official-stockfish/books/raw/master/8moves_v3.pgn.zip
unzip 8moves_v3.pgn.zip
- name: Run Tournaments
run: |
# 5+0.1 Tournament
./fastchess-ubuntu-22.04 -engine cmd=./Rudim/bin/Release/net9.0/publish/Rudim name="Current Rudim" -engine cmd=./stable-rudim/Rudim name="Stable Rudim" \
-games 200 -each tc=5+0.1 -concurrency 4 -openings file=8moves_v3.pgn format=pgn