Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ianfab committed Mar 13, 2022
0 parents commit 7565c92
Show file tree
Hide file tree
Showing 9 changed files with 742 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
patreon: ianfab
custom: ['https://paypal.me/FairyStockfish']
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release

on:
push:
tags:
- '*'

jobs:
release:
strategy:
matrix:
os: [ubuntu-20.04, windows-2022]
arch: ["x86-64-bmi2", "x86-64-modern", "x86-64"]
include:
- os: ubuntu-20.04
comp: gcc
extension:
- os: windows-2022
comp: mingw
extension: .exe

runs-on: ${{ matrix.os }}
env:
COMP: ${{ matrix.comp }}
ARCH: ${{ matrix.arch }}
EXE: fairy-stockfish_${{ matrix.arch }}${{ matrix.extension }}
largeboards: ${{ startsWith(github.ref_name, 'makruk') && 'no' || 'yes' }}
TAG: ${{ github.ref_name }}

steps:
- uses: actions/checkout@v2
with:
submodules: 'true'

- name: Determine NNUE network
run: |
echo "VARIANT=$(echo "${TAG%%-*}")" >> $GITHUB_ENV
echo "NNUE_NET=$(ls | grep "^${TAG%%-*}-.*\.nnue")" >> $GITHUB_ENV
shell: bash

- name: Copy NNUE
run: cp $NNUE_NET Fairy-Stockfish/src/
shell: bash

- name: Update code
run: sed -i "s/nn-[a-z0-9]\{12\}.nnue/$NNUE_NET/" Fairy-Stockfish/src/evaluate.h
shell: bash

- name: make
run: cd Fairy-Stockfish/src && make clean EXE=$EXE && make -j build EXE=$EXE largeboards=$largeboards nnue=yes load_net= && strip $EXE
shell: bash

- name: Upload release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: Fairy-Stockfish/src/${{ env.EXE }}
tag: ${{ github.ref }}
body: "Release for variant ${{ env.VARIANT }} with built-in NNUE network ${{ env.NNUE_NET }}"
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Fairy-Stockfish"]
path = Fairy-Stockfish
url = https://github.com/ianfab/Fairy-Stockfish.git
674 changes: 674 additions & 0 deletions Copying.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Fairy-Stockfish
Submodule Fairy-Stockfish added at 8376d2
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Specialized NNUE releases of Fairy-Stockfish

[Fairy-Stockfish](https://github.com/ianfab/Fairy-Stockfish) can also load NNUE networks at runtime, but for some users who only focus on a single variant a dedicated release with a single built-in NNUE network is more convenient. Therefore this repository provides such specialized releases for the regional variants such as Xiangqi, Janggi, and Makruk. Besides this convenience feature and the difference in binary size, there is no functional difference to the [general purpose releases](https://github.com/ianfab/Fairy-Stockfish/releases).
Binary file added janggi-ffbf1d95cea2.nnue
Binary file not shown.
Binary file added makruk-e14ecd7ae145.nnue
Binary file not shown.
Binary file added xiangqi-83f16c17fe26.nnue
Binary file not shown.

0 comments on commit 7565c92

Please sign in to comment.