Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
yjf2002ghty authored Dec 30, 2024
2 parents 881ff61 + c2b61bb commit 42d763d
Show file tree
Hide file tree
Showing 23 changed files with 890 additions and 145 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Keep GitHub Actions up to date with GitHub's Dependabot...
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
version: 2
updates:
- package-ecosystem: github-actions
directory: /
groups:
github-actions:
patterns:
- "*" # Group all Actions updates into a single larger pull request
schedule:
interval: weekly
2 changes: 1 addition & 1 deletion .github/workflows/fairy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run:
working-directory: src
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
53 changes: 49 additions & 4 deletions .github/workflows/ffishjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ jobs:
node-version: [12.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup cache
id: cache-system-libraries
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{env.EM_CACHE_FOLDER}}
key: emsdk-${{env.EM_VERSION}}-${{ runner.os }}
- uses: mymindstorm/setup-emsdk@v7
- uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Build ffishjs
Expand All @@ -43,3 +43,48 @@ jobs:
- name: Run unit tests
working-directory: tests/js
run: npm test

build:
runs-on: ubuntu-20.04
needs: [test] #Building process must start after successful testing process

strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v4
- name: Setup cache
id: cache-system-libraries
uses: actions/cache@v4
with:
path: ${{env.EM_CACHE_FOLDER}}
key: emsdk-${{env.EM_VERSION}}-${{ runner.os }}
- uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Build ffish.js ES6/ES2015 module
working-directory: src
run: rm -f ../tests/js/ffish.js & rm -f ../tests/js/ffish.wasm & make -f Makefile_js build es6=yes
- name: Upload ffish.js ES6/ES2015 module ZIP archive
uses: actions/upload-artifact@v4
with:
name: ffishjs-es6
path: tests/js/*
if-no-files-found: error
compression-level: 9
- name: Build ffish.js standard module
working-directory: src
run: rm -f ../tests/js/ffish.js & rm -f ../tests/js/ffish.wasm & make -f Makefile_js build
- name: Upload ffish.js standard module ZIP archive
uses: actions/upload-artifact@v4
with:
name: ffishjs-standard
path: tests/js/*
if-no-files-found: error
compression-level: 9
18 changes: 11 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
runs-on: windows-2022

steps:
- uses: al-cheb/configure-pagefile-action@v1.2
- uses: al-cheb/configure-pagefile-action@v1.4
with:
minimum-size: 16GB
maximum-size: 16GB
disk-root: "C:"

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: make
run: cd src && make clean && make -j build COMP=mingw ARCH=${{ matrix.arch }} EXE=fairy-stockfish_${{ matrix.arch }}.exe && strip fairy-stockfish_${{ matrix.arch }}.exe
Expand All @@ -32,10 +32,12 @@ jobs:
if: ${{ matrix.arch == 'x86-64' }}
run: cd src && make clean && make -j build COMP=mingw ARCH=${{ matrix.arch }} EXE=fairy-stockfish-all_${{ matrix.arch }}.exe largeboards=yes all=yes && strip fairy-stockfish-all_${{ matrix.arch }}.exe

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: fairy-stockfish
name: fairy-stockfish-windows-${{ matrix.arch }}
path: src/fairy-stockfish*.exe
if-no-files-found: error
compression-level: 9

linux:
strategy:
Expand All @@ -44,7 +46,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: make
run: cd src && make clean && make -j build COMP=gcc ARCH=${{ matrix.arch }} EXE=fairy-stockfish_${{ matrix.arch }} && strip fairy-stockfish_${{ matrix.arch }}
Expand All @@ -56,7 +58,9 @@ jobs:
if: ${{ matrix.arch == 'x86-64' }}
run: cd src && make clean && make -j build COMP=gcc ARCH=${{ matrix.arch }} EXE=fairy-stockfish-all_${{ matrix.arch }} largeboards=yes all=yes && strip fairy-stockfish-all_${{ matrix.arch }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: fairy-stockfish
name: fairy-stockfish-linux-${{ matrix.arch }}
path: src/fairy-stockfish*
if-no-files-found: error
compression-level: 9
16 changes: 14 additions & 2 deletions .github/workflows/stockfish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ jobs:
run:
working-directory: src
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download required packages
run: |
sudo apt update
sudo apt install expect valgrind g++-multilib
sudo apt install expect valgrind g++-multilib llvm
- name: Download the used network from the fishtest framework
run: |
Expand Down Expand Up @@ -74,6 +74,12 @@ jobs:
make -j2 ARCH=x86-32 optimize=no debug=yes build
../tests/signature.sh $benchref
- name: Test debug x86-32 profile build (Optimization on, All features)
run: |
export CXXFLAGS=""
make clean
make -j2 ARCH=x86-32 optimize=yes all=yes largeboards=yes debug=yes profile-build
- name: Test x86-32 build
run: |
make clean
Expand Down Expand Up @@ -107,6 +113,12 @@ jobs:
make -j2 ARCH=x86-64-modern optimize=no debug=yes build
../tests/signature.sh $benchref
- name: Test debug x86-64-modern profile build (Optimization on, All features)
run: |
export CXXFLAGS=""
make clean
make -j2 ARCH=x86-64-modern optimize=yes all=yes largeboards=yes debug=yes profile-build
- name: Test x86-64-modern build
run: |
make clean
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
os: [ubuntu-20.04, windows-2019, macos-13]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Used to host cibuildwheel
- uses: actions/setup-python@v3
Expand All @@ -34,24 +34,24 @@ jobs:
CIBW_SKIP: "pp* *-win32 *-manylinux_i686 *-musllinux_* cp36-* cp37-*"
CIBW_TEST_COMMAND: python {project}/test.py

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
name: dist-wheel-${{ matrix.os }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: '3.8'

- name: Build sdist
run: python setup.py sdist

- uses: actions/upload-artifact@v3.0.0
- uses: actions/upload-artifact@v4
with:
name: dist
name: dist-source
path: dist/*.tar.gz
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

CLASSIFIERS = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"License :: OSI Approved :: GNU General Public License v3 or later (GPL-3.0-or-later)",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
Expand All @@ -39,7 +39,7 @@
sources=sources,
extra_compile_args=args)

setup(name="pyffish", version="0.0.82",
setup(name="pyffish", version="0.0.85",
description="Fairy-Stockfish Python wrapper",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ endif
### 3.3 Optimization
ifeq ($(optimize),yes)

CXXFLAGS += -O3
CXXFLAGS += -O3 -fno-strict-aliasing

ifeq ($(comp),gcc)
ifeq ($(OS), Android)
Expand Down
Loading

0 comments on commit 42d763d

Please sign in to comment.