working-directory: src
shell: ${{ matrix.config.shell }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
fetch-depth: 0
echo "ANDROID_NDK_BIN=$ANDROID_NDK_BIN" >> $GITHUB_ENV
fi
+ - name: Extract the bench number from the commit history
+ run: |
+ for hash in $(git rev-list -100 HEAD); do
+ benchref=$(git show -s $hash | tac | grep -m 1 -o -x '[[:space:]]*\b[Bb]ench[ :]\+[1-9][0-9]\{5,7\}\b[[:space:]]*' | sed 's/[^0-9]//g') && break || true
+ done
+ [[ -n "$benchref" ]] && echo "benchref=$benchref" >> $GITHUB_ENV && echo "From commit: $hash" && echo "Reference bench: $benchref" || echo "No bench found"
+
- name: Download the used network from the fishtest framework
run: make net
make clean
make -j2 profile-build ARCH=$BINARY COMP=$COMP WINE_PATH=$EMU
make strip ARCH=$BINARY COMP=$COMP
+ WINE_PATH=$EMU ../tests/signature.sh $benchref
mv ./stockfish$EXT ../stockfish-android-$BINARY$EXT
- name: Remove non src files
cp AUTHORS stockfish/
cp CITATION.cff stockfish/
cp README.md stockfish/
+ cp CONTRIBUTING.md stockfish/
tar -cvf stockfish-android-$BINARY.tar stockfish
- name: Upload binaries
- name: Release
if: startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag'
- uses: softprops/action-gh-release@v1
+ uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # @v1
with:
files: stockfish-android-${{ matrix.binaries }}.tar
- name: Prerelease
if: github.ref_name == 'master' && env.CHANGES == '0'
continue-on-error: true
- uses: softprops/action-gh-release@v1
+ uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # @v1
with:
name: Stockfish dev-${{ env.COMMIT_DATE }}-${{ env.COMMIT_SHA }}
tag_name: stockfish-dev-${{ env.COMMIT_DATE }}-${{ env.COMMIT_SHA }}