-
-
Notifications
You must be signed in to change notification settings - Fork 13
59 lines (50 loc) · 1.65 KB
/
release.yml
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
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 }}"