mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 03:57:45 +00:00
Add binaries to releases with github actions
when a release is made with a tag matching sf_* the binaries will also be uploaded to the release as assets. closes https://github.com/official-stockfish/Stockfish/pull/4596 No functional change.
This commit is contained in:
committed by
Joost VandeVondele
parent
b60738e01b
commit
295f57829e
@@ -1,6 +1,8 @@
|
|||||||
name: Stockfish
|
name: Stockfish
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- tools
|
- tools
|
||||||
@@ -17,8 +19,8 @@ jobs:
|
|||||||
Compiles:
|
Compiles:
|
||||||
uses: ./.github/workflows/stockfish_compile_test.yml
|
uses: ./.github/workflows/stockfish_compile_test.yml
|
||||||
Binaries:
|
Binaries:
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag')
|
||||||
uses: ./.github/workflows/stockfish_binaries.yml
|
uses: ./.github/workflows/stockfish_binaries.yml
|
||||||
ARM_Binaries:
|
ARM_Binaries:
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag')
|
||||||
uses: ./.github/workflows/stockfish_arm_binaries.yml
|
uses: ./.github/workflows/stockfish_arm_binaries.yml
|
||||||
|
|||||||
@@ -115,6 +115,8 @@ jobs:
|
|||||||
cp "Top CPU Contributors.txt" stockfish/
|
cp "Top CPU Contributors.txt" stockfish/
|
||||||
cp Copying.txt stockfish/
|
cp Copying.txt stockfish/
|
||||||
cp AUTHORS stockfish/
|
cp AUTHORS stockfish/
|
||||||
|
cp CITATION.cff stockfish/
|
||||||
|
cp README.md stockfish/
|
||||||
tar -cvf stockfish-android-$BINARY.tar stockfish
|
tar -cvf stockfish-android-$BINARY.tar stockfish
|
||||||
|
|
||||||
- name: Upload binaries
|
- name: Upload binaries
|
||||||
@@ -122,3 +124,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: stockfish-android-${{ matrix.binaries }}
|
name: stockfish-android-${{ matrix.binaries }}
|
||||||
path: stockfish-android-${{ matrix.binaries }}.tar
|
path: stockfish-android-${{ matrix.binaries }}.tar
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
if: startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag'
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: stockfish-android-${{ matrix.binaries }}.tar
|
||||||
@@ -9,23 +9,26 @@ jobs:
|
|||||||
COMPILER: ${{ matrix.config.compiler }}
|
COMPILER: ${{ matrix.config.compiler }}
|
||||||
COMP: ${{ matrix.config.comp }}
|
COMP: ${{ matrix.config.comp }}
|
||||||
EXT: ${{ matrix.config.ext }}
|
EXT: ${{ matrix.config.ext }}
|
||||||
OS: ${{ matrix.config.os }}
|
NAME: ${{ matrix.config.simple_name }}
|
||||||
BINARY: ${{ matrix.binaries }}
|
BINARY: ${{ matrix.binaries }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- name: Ubuntu 20.04 GCC
|
- name: Ubuntu 20.04 GCC
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
simple_name: ubuntu
|
||||||
compiler: g++
|
compiler: g++
|
||||||
comp: gcc
|
comp: gcc
|
||||||
shell: bash {0}
|
shell: bash {0}
|
||||||
- name: MacOS 12 Apple Clang
|
- name: MacOS 12 Apple Clang
|
||||||
os: macos-12
|
os: macos-12
|
||||||
|
simple_name: macos
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
comp: clang
|
comp: clang
|
||||||
shell: bash {0}
|
shell: bash {0}
|
||||||
- name: Windows 2022 Mingw-w64 GCC x86_64
|
- name: Windows 2022 Mingw-w64 GCC x86_64
|
||||||
os: windows-2022
|
os: windows-2022
|
||||||
|
simple_name: windows
|
||||||
compiler: g++
|
compiler: g++
|
||||||
comp: mingw
|
comp: mingw
|
||||||
msys_sys: mingw64
|
msys_sys: mingw64
|
||||||
@@ -75,19 +78,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Compile ${{ matrix.binaries }} build
|
- name: Compile ${{ matrix.binaries }} build
|
||||||
run: |
|
run: |
|
||||||
make clean
|
|
||||||
make -j2 profile-build ARCH=$BINARY COMP=$COMP
|
make -j2 profile-build ARCH=$BINARY COMP=$COMP
|
||||||
make strip ARCH=$BINARY COMP=$COMP
|
make strip ARCH=$BINARY COMP=$COMP
|
||||||
mv ./stockfish$EXT ../stockfish-$OS-$BINARY$EXT
|
mv ./stockfish$EXT ../stockfish-$NAME-$BINARY$EXT
|
||||||
|
|
||||||
- name: Remove non src files
|
- name: Remove non src files
|
||||||
run: rm -f *.o .depend *.nnue
|
run: git clean -fx
|
||||||
|
|
||||||
- name: Download wiki
|
- name: Download wiki
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/official-stockfish/Stockfish.wiki.git ../wiki
|
git clone https://github.com/official-stockfish/Stockfish.wiki.git ../wiki
|
||||||
cd ../wiki
|
rm -rf ../wiki/.git
|
||||||
rm -rf .git
|
|
||||||
|
|
||||||
- name: Create tar archive.
|
- name: Create tar archive.
|
||||||
run: |
|
run: |
|
||||||
@@ -95,14 +96,22 @@ jobs:
|
|||||||
mkdir stockfish
|
mkdir stockfish
|
||||||
cp -r wiki stockfish/
|
cp -r wiki stockfish/
|
||||||
cp -r src stockfish/
|
cp -r src stockfish/
|
||||||
cp stockfish-$OS-$BINARY$EXT stockfish/
|
cp stockfish-$NAME-$BINARY$EXT stockfish/
|
||||||
cp "Top CPU Contributors.txt" stockfish/
|
cp "Top CPU Contributors.txt" stockfish/
|
||||||
cp Copying.txt stockfish/
|
cp Copying.txt stockfish/
|
||||||
cp AUTHORS stockfish/
|
cp AUTHORS stockfish/
|
||||||
tar -cvf stockfish-$OS-$BINARY.tar stockfish
|
cp CITATION.cff stockfish/
|
||||||
|
cp README.md stockfish/
|
||||||
|
tar -cvf stockfish-$NAME-$BINARY.tar stockfish
|
||||||
|
|
||||||
- name: Upload binaries
|
- name: Upload binaries
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: stockfish-${{ matrix.config.os }}-${{ matrix.binaries }}
|
name: stockfish-${{ matrix.config.os }}-${{ matrix.binaries }}
|
||||||
path: stockfish-${{ matrix.config.os }}-${{ matrix.binaries }}.tar
|
path: stockfish-${{ matrix.config.simple_name }}-${{ matrix.binaries }}.tar
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
if: startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag'
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: stockfish-${{ matrix.config.simple_name }}-${{ matrix.binaries }}.tar
|
||||||
|
|||||||
Reference in New Issue
Block a user