Commit Graph
104 Commits
Author SHA1 Message Date
DisservinandJoost VandeVondele 0366d092a8 Shorten Prerelease Binary Window
Only delete the prerelease once all assets have been built and only need upload.

Also fix a link in prerelease notes to the official releases.

closes https://github.com/official-stockfish/Stockfish/pull/6812

No functional change
2026-05-17 20:41:36 +02:00
Robert Nurnberg @ elitebookandJoost VandeVondele bcd5b6ccb3 [CI] Add a mutiPV run for matetrack
Thanks to recent commits, we can now also trust mate(d) scores from multiPV analysis for the best move, with complete PV etc. Locally I have also tested master extensively with the help of the matetrack script in multiPV analysis, with no issues reported. So I believe we can add this to our CI.

closes https://github.com/official-stockfish/Stockfish/pull/6809

No functional change
2026-05-10 11:47:09 +02:00
disservinandJoost VandeVondele c2500b1165 Add Prerelease Notes
closes https://github.com/official-stockfish/Stockfish/pull/6803

No functional change
2026-05-10 11:45:15 +02:00
Joost VandeVondele 6127bf711e [CI] Upgrade SDE action
fix Node.js version dependency, update SDE.

This upgrades to 9.58, upgrade to 10.8 failed with:
Invalid file name and base dir combination: Pin root DLL: pincrt4.dll

Also adjusts Makefile to show PGO bench output on failure

closes https://github.com/official-stockfish/Stockfish/pull/6781

No functional change
2026-05-10 11:43:17 +02:00
fe1d2b456c Update CI Binaries
- split into multiple jobs
- remove binaries which are already covered by the universal binary

superseeds https://github.com/official-stockfish/Stockfish/pull/6779

closes https://github.com/official-stockfish/Stockfish/pull/6794

No functional change

Co-authored-by: Disservin <disservin.social@gmail.com>
2026-05-04 08:32:03 +02:00
ppigazziniandJoost VandeVondele b35a064eae ci: cancel stale workflow runs per PR or ref
Add workflow-level concurrency to the direct GitHub Actions entrypoints so a
newer run for the same pull request or repository ref cancels the older
in-progress run.

Keep the reusable workflow graph, release guards, triggers, and permissions
unchanged while documenting the concurrency policy and the official GitHub
references used for the change.

closes https://github.com/official-stockfish/Stockfish/pull/6773

No functional change.
2026-04-26 09:39:38 +02:00
Dieter DobbelaereandJoost VandeVondele e68ca3c187 Rename Linux universal release package/binary
Rename Linux universal release package from
`stockfish-ubuntu-x86-64-universal.tar.gz`  to
`stockfish-linux-x86-64-universal.tar.gz` (and similar for the binary), as the
bundled binary should run on any Linux distro with glibc >= 2.35 (which is the
glibc version of the Ubuntu 22.04 build server).

Note that the Linux universal binary is built with static libstdc++ linkage, so
this adds no extra dependency.

This change will hopefully make it less confusing for users, and in line with
how we show it on stockfishchess.org (as Linux).

closes https://github.com/official-stockfish/Stockfish/pull/6760

No functional change
2026-04-26 09:27:08 +02:00
Dieter DobbelaereandJoost VandeVondele 9dd58542c9 Compress Linux universal release package
`stockfish-ubuntu-x86-64-universal.tar` goes from 94.8MiB to 67.4MiB (tar.gz)

Note that the CI code is written such that it easy to select other compression
schemes in the future (e.g. tar.xz) by simply changing the `archive_ext`
parameter.

closes https://github.com/official-stockfish/Stockfish/pull/6746

No functional change
2026-04-20 17:41:06 +02:00
ppigazziniandJoost VandeVondele 463f5a6ee1 ci: pin root workflow actions to immutable SHAs
Pin every external action used by the root GitHub workflow set to a full-length
commit SHA and keep the selected release tag as a same-line comment.

Update the root workflows to the latest stable tagged action versions found
during the audit while preserving existing release guards, permissions, and
reusable workflow wiring.

closes https://github.com/official-stockfish/Stockfish/pull/6754

No functional change.
2026-04-20 17:37:39 +02:00
Joost VandeVondele 4a6c7e77a5 [CI] Cleanup artifact content (part 2)
removes temp_builds directory before packaging, even more.

closes https://github.com/official-stockfish/Stockfish/pull/6750

No functional change
2026-04-19 13:51:09 +02:00
Joost VandeVondele edfd021257 [CI] Cleanup artifact content
removes temp_builds directory before packaging

closes https://github.com/official-stockfish/Stockfish/pull/6745

No functional change
2026-04-19 12:26:47 +02:00
anematodeandJoost VandeVondele 1e333b341c Add universal binaries to prerelease page
closes https://github.com/official-stockfish/Stockfish/pull/6744

No functional change
2026-04-19 11:09:24 +02:00
anematodeandJoost VandeVondele c3bcf74925 Universal binary for x86-64 Linux and Windows
We maintain support for quite a few x86 ISA extensions but relied on the end
user to select the binary that is best for their system.  We can detect at
runtime which architecture to use, and ship a single binary (per OS/ISA
combination). This PR does so, maintaining performance.

This is what I've landed on after quite a few iterations. Basically, we build
each arch separately, use `cpuid` to select one, and jump to that arch's main
function. Some details:

- The preprocessor macro `UNIVERSAL_BINARY` is defined when building for the universal binary.

- The Makefile target `universal-object-[no]pgo` is added, which produces a `stockfish.o` in each arch's build directory.

- To prevent symbol collisions between the multiple builds, we `#define Stockfish Stockfish_[arch]`. Furthermore we wrap the `main` function in `namespace Stockfish { }`.

- We can still get PGO data by linking to a per-arch binary, with `Stockfish_x86_64_avx2::main` as `main`, and running `bench`.
    - For arches not supported by the host we can use Intel SDE – this is what we do in CI.

- When embedding the NNUE, we use C++26/C23 `#embed` instead of `INCBIN`. The issue with `INCBIN` is that it injects assembly directives that we have no control over.
    - To ensure there's only one copy of the networks in the final binary, we define the network data as weak symbols in each per-arch build. Then, in the final link, we add a special nnue_embed.cpp which provides strong symbols.
    - This does require GCC 15. Statically linking libstdc++ allows the binary to still run on older OSes though. And latest msys2 already does static linking + is based off GCC 15.2.0

building can be as simple as

make -j profile-build ARCH=x86-64-universal

or using the sde if the host doesn't support all architectures supported in the
universal binary, and the default host compiler is not recent enough.

make -j profile-build ARCH=x86-64-universal RUN_PREFIX="/path/to/sde -future --" CXX=g++-15

This change is also integrated in CI, so universal binaries are available as
downloadable artifacts.

Next we could also do ARM64, especially Android (all Apple silicon users use
the same binary). It also might be worth getting this to work with clang.

closes https://github.com/official-stockfish/Stockfish/pull/6740

No functional change
2026-04-19 07:07:11 +02:00
Linmiao XuandDisservin 93ba8fb35e CI: test for macOS g++ pretending to be clang++
Avoids compilation errors on macOS by ensuring flags specific to g++ are
applied to actual g++

closes https://github.com/official-stockfish/Stockfish/pull/6709

No functional change
2026-04-09 21:53:08 +02:00
Robert Nurnberg @ elitebookandDisservin 67a2c247d4 Improve multi-threaded go-mate searches
Ever since #5094 master only lets the main thread terminate `go mate`
searches, reverting the earlier improvement #1215.

This PR restores the old logic. So any thread that found a "mate in x"
can now stop the search.

To make this work robustly, we need to guard against inexact mate scores
in the best thread selection. In addition, in contrast to time limits,
the main thread may now not complete a d1 search for a mated-in
position.
In master an aborted d1 search may have a PV beginning with
`Move::none()`, in which case no thread selection is performed. See
#623. We fix this bug here by checking if `lastBestPV` is empty or not.
For interrupted d1 searches we now label mated-in scores as inexact.

While at it, we also simplify the logic for detecting if we can
terminate a go mate x search, using the fact that threads.stop can only
be false if we have a completed iteration with a valid score.

The PR has no effect on game play, but should slightly improve general
mate finding and speed up multi-threaded `go mate` searches.

We also add a corresponding matecheck run to the CI. This only involves
61 mates up to mate-in-2. Test runs with the first 50 or 100 mates from
`mates2000.epd` did at times not finish within 30 minutes on my fork or
in local tests, possibly due to search explosions for some mate-in-3
positions.

closes https://github.com/official-stockfish/Stockfish/pull/6668

No functional change
2026-03-18 20:49:06 +01:00
Robert Nurnberg @ elitebookandJoost VandeVondele 82320c0e38 [CI] add multithreaded matetrack runs that simulate gameplay
closes https://github.com/official-stockfish/Stockfish/pull/6641

No functional change
2026-03-07 22:10:14 +01:00
ppigazziniandDisservin e3a5c40f05 feat(build): use lld for clang if available
Also simplify the CI.

closes https://github.com/official-stockfish/Stockfish/pull/6592

No functional change
2026-02-08 15:22:06 +01:00
disservinandJoost VandeVondele 9cc2985f51 Don't push prerelease for release commits
Looks for the text "Official release version of Stockfish" in the commit
message to determine if something is a release.

closes https://github.com/official-stockfish/Stockfish/pull/6580

No functional change
2026-02-04 18:00:54 +01:00
DisservinandJoost VandeVondele 1928ef9571 Compiler Check
Compiles and Runs Stockfish on all supported gcc & clang compilers.
Only linux and avx2 currently.

closes https://github.com/official-stockfish/Stockfish/pull/6533

No functional change
2026-01-10 15:36:52 +01:00
ppigazziniandJoost VandeVondele 0317c6ccec build: rename WINE_PATH to RUN_PREFIX for wrapper execution
WINE_PATH started as a Wine-specific knob, but it’s now used more generally
as a command prefix to run the built engine under wrappers
like Intel SDE, qemu-user, etc.

- Add RUN_PREFIX as the supported “run wrapper/prefix” variable in Makefile
- Set WINE_PATH as a deprecated alias
- Update CI and scripts to use RUN_PREFIX

closes https://github.com/official-stockfish/Stockfish/pull/6500

No functional change
2026-01-01 16:06:25 +01:00
ppigazziniandDisservin d92e6b458a chore(ci): bump runner to macos-15
closes https://github.com/official-stockfish/Stockfish/pull/6475

No functional change
2025-12-21 15:43:32 +01:00
Robert Nurnberg @ elitebookandJoost VandeVondele 315f8ba4bf let CI check for mate scores outside the valid range
closes https://github.com/official-stockfish/Stockfish/pull/6358

No functional change
2025-10-14 17:34:17 +02:00
Sebastian BuchwaldandJoost VandeVondele a82e2a4cb6 Replace deprecated macOS 13 runner image
The macOS 13 runner image will be retired by December 4th, 2025.

closes https://github.com/official-stockfish/Stockfish/pull/6330

No functional change
2025-09-28 20:46:42 +02:00
Robert Nurnberg @ elitebookandJoost VandeVondele f922fb5d55 add multithreaded matetrack runs to CI
Add runs with --threads 4 to our matetrack CI. These won't be deterministic, of
course. But they may catch early some multithreading bugs in our mate
reporting.

Motivated by #6293 and #6296.

https://github.com/official-stockfish/Stockfish/pull/6297

No functional change.
2025-09-28 20:45:30 +02:00
DisservinandJoost VandeVondele 1a3a9c9005 simplify upload_binaries ci
Previously the upload step used the os of the artifact to create the upload and
used an extra msys2 step. This is in fact not needed and we can do all required
changes on ubuntu instead.

closes https://github.com/official-stockfish/Stockfish/pull/6294

No functional change
2025-09-28 20:43:54 +02:00
DisservinandJoost VandeVondele 47d60a50b6 CI: fix typo in flag
closes https://github.com/official-stockfish/Stockfish/pull/6247

No functional change
2025-08-24 19:40:40 +02:00
Joost VandeVondele 4b6b13ce5a Update sde action to 2.4, switch to 9.33.0
older version no longer downloadable.

closes https://github.com/official-stockfish/Stockfish/pull/6240

No functional change
2025-08-17 22:32:03 +02:00
disservinandGitHub 15555e8f4a Disable linux gcc riscv64 (#6145)
Temporarily disable it, until we figure out the toolchain issues which are causing the crashes.

closes https://github.com/official-stockfish/Stockfish/pull/6145

No functional change
2025-06-29 12:33:20 +02:00
ppigazziniandJoost VandeVondele e3adfaf8fc build & ci: update to NDK r27c API level 29
Update to the latest LTS version NDK r27c (27.2.12479018),
the previous NDK are unsupported by Google, see:
https://developer.android.com/ndk/downloads

A build with NDK r27c and API level < 29 returns this error:
"executable's TLS segment is underaligned: alignment is 8 (skew 0), needs to be at least 64 for ARM64 Bionic"

Update the API level to 29 to use the native ELF LTS and avoid the error:
https://android.googlesource.com/platform/bionic/+/HEAD/docs/elf-tls.md
https://android.googlesource.com/platform/bionic/+/HEAD/android-changes-for-ndk-developers.md#elf-tls-available-for-api-level-29

A dynamic link build of Stockfish uses these libraries:

ldd stockfish-android-armv8-dynamic-api35
        libm.so => /system/lib64/libm.so
        libdl.so => /system/lib64/libdl.so
        libc.so => /system/lib64/libc.so
        ld-android.so => /system/lib64/ld-android.so

ld-android.so : the dynamic linker used by Android (on Linux is named ld-linux.so),
                responsible for loading and linking shared libraries into an executable at runtime.
libdl.so      : interface/library layer that provides function for dynamic loading,
                relies on the underlying functionality provided by the dynamic linker
libm.so       : math library for Android
libc.so       : standard C library for Android

References:
Doc for native (C/C++) API
https://developer.android.com/ndk/guides/stable_apis

C libraries (libc, libm, libdl):
https://developer.android.com/ndk/guides/stable_apis#c_library

Bionic changes with API levels:
https://android.googlesource.com/platform/bionic/+/HEAD/docs/status.md

NDK r27c build system:
https://android.googlesource.com/platform/ndk/+/ndk-r27-release/docs/BuildSystemMaintainers.md

CI: Update to NDK r27c (27.2.12479018), the default version in GitHub runner,
to switch to a recent clang 18.

A PGO build requires static linking, because the NDK doesn't ship
the Android loaders (linker/linker64), see:
https://groups.google.com/g/android-ndk/c/3Ep6zD3xxSY

The API level should not be an issue when distributing a static build,
use the API 29, the oldest one not affected by the LTS alignement issue.

closes https://github.com/official-stockfish/Stockfish/pull/6081

No functional change
2025-05-25 21:28:53 +02:00
Shawn XuandJoost VandeVondele e6ec4705a8 Remove deprecated arch from codeql
closes https://github.com/official-stockfish/Stockfish/pull/6090

no functional change
2025-05-25 21:00:38 +02:00
DisservinandJoost VandeVondele 2662d6bf35 Update clang-format to v20
closes https://github.com/official-stockfish/Stockfish/pull/6085

No functional change
2025-05-23 08:54:06 +02:00
ppigazziniandJoost VandeVondele e03898b57c ci: add tests and artifacts for windows-11-arm
integrate armv8 and armv8-dotprod builds on windows-11-arm in ci, creating the corresponding artifacts.
Correct Makefile to drop warnings when providing a CXX, add MINGW ARM64 to get_native_properties.sh

fixes https://github.com/official-stockfish/Stockfish/issues/5640
closes https://github.com/official-stockfish/Stockfish/pull/6078

No functional change
2025-05-21 07:29:57 +02:00
Robert Nurnberg @ elitebookandDisservin d46c0b6f49 Add cursed win checks to CI matetrack tests
This PR adds a run for the `matecheck.py` script from the matetrack repo
with the option `--syzygy50MoveRule false`.

The new tests guard against a re-introduction of the bugs recently fixed
by https://github.com/official-stockfish/Stockfish/pull/5814.

closes https://github.com/official-stockfish/Stockfish/pull/5829

No functional change
2025-02-02 13:54:04 +01:00
Robert Nurnberg @ elitebookandDisservin c180163540 Update fastchess CI Version
This PR updates the fastchess version used as part of the CI to the one
used on fishtest, see
https://github.com/official-stockfish/fishtest/pull/2180.

Also change the name/repo from fast-chess to fastchess.

closes https://github.com/official-stockfish/Stockfish/pull/5826

No functional change
2025-01-26 22:45:33 +01:00
DisservinandJoost VandeVondele 132b90df04 Update CI to Ubuntu 22.04 from 20.04
fixes #5756
closes https://github.com/official-stockfish/Stockfish/pull/5786

No functional change
2025-01-18 20:52:07 +01:00
Shawn XuandDisservin 6075e787d0 Add CI test with glibcxx assertions enabled
Re: https://github.com/official-stockfish/Stockfish/pull/5721#pullrequestreview-2504542601

closes https://github.com/official-stockfish/Stockfish/pull/5723

No functional change
2024-12-22 15:20:25 +01:00
Disservin 49138b8c33 Fix CI Docker Buildx
closes https://github.com/official-stockfish/Stockfish/pull/5678

No functional change
2024-11-13 20:35:02 +01:00
Disservin a06e7004c1 Port instrumented testing to python
Since an unknown amount of time the instrumented CI has been a bit
flawed, explained here
https://github.com/official-stockfish/Stockfish/issues/5185. It also
experiences random timeout issues where restarting the workflow fixes it
or very long run times (more than other workflows) and is not very
portable.

The intention of this commit is to port the instrumented.sh to python
which also works on other operating systems. It should also be
relatively easy for beginners to add new tests to assert stockfish's
output and to run it.
From the source directory the following command can be run.

`python3 ../tests/instrumented.py --none ./stockfish`

A test runner will go over the test suites and run the test cases.

All instrumented tests should have been ported over.
The required python version for this is should be 3.7 (untested) + the
requests package, testing.py includes some infrastructure code which
setups the testing.

fixes https://github.com/official-stockfish/Stockfish/issues/5185
closes https://github.com/official-stockfish/Stockfish/pull/5583

No functional change
2024-09-17 20:24:17 +02:00
MinetaSandDisservin 1b310cc87e Export and clean up net downloading script
Fixes https://github.com/official-stockfish/Stockfish/issues/5564

This patch extracts the net downloading script in Makefile into an
external script file. Also the script is moderately rewritten for
improved readability and speed.

* Use wget preferentially over curl, as curl is known to have slight
  overhead.
* Use command instead of hash to check if command exists. Reportedly,
  hash always returns zero in some POSIX shells even when the command
  fails.
* Command existence checks (wget/curl, sha256sum) are performed only
  once at the beginning.
* Each of common patterns is encapsulated in a function
  (get_nnue_filename, validate_network).
* Print out error/warning messages to stderr.

closes https://github.com/official-stockfish/Stockfish/pull/5563

No functional change

Co-authored-by: Disservin <disservin.social@gmail.com>
2024-09-09 18:02:27 +02:00
xu-shawnandDisservin 66a7965b0f Copy scripts directory in distributed packages
closes https://github.com/official-stockfish/Stockfish/pull/5571

No functional change
2024-09-09 17:54:27 +02:00
DisservinandJoost VandeVondele d626af5c3a Fix failing CI for MacOS 13 GCC 11
closes https://github.com/official-stockfish/Stockfish/pull/5540

No functional change
2024-08-20 20:44:55 +02:00
Joost VandeVondele 1fb4dc2e0f Enable syzygy in the matetrack action
now checks correctness of PV lines with TB score.

uses 3-4-5 man table bases, downloaded from lichess,
which are cached with the appropriate action.

closes https://github.com/official-stockfish/Stockfish/pull/5500

No functional change
2024-07-23 17:49:07 +02:00
DisservinandJoost VandeVondele 98a7bb4436 CI give correct permissions for the clang-format action
closes https://github.com/official-stockfish/Stockfish/pull/5470

No functional change
2024-07-11 07:21:04 +02:00
Joost VandeVondele c40dd26cbc CI give creditials for the clang-format action
following up from earlier changes

closes https://github.com/official-stockfish/Stockfish/pull/5450

No functional change
2024-07-06 17:42:23 +02:00
DisservinandJoost VandeVondele 74a8fc0604 Use explicit action permissions in CI
Necessary modifications according to changes in the GitHub Action settings.

closes https://github.com/official-stockfish/Stockfish/pull/5437

Follow up from the report by Yaron Avital (yaronav) earlier.

No functional change
2024-07-05 15:35:13 +02:00
Joost VandeVondele ee6fc7e38b CI: limit artifact uploads
do not upload some unneeded intermediate directories,
disable running authenticated git commands with the checkout action.

Thanks to Yaron A for the report.

closes https://github.com/official-stockfish/Stockfish/pull/5435

No functional change
2024-07-03 13:45:14 +02:00
Joost VandeVondele 5514690f8e CI/CD: play games
this action plays games under fast-chess with a `debug=yes` compiled binary.

It checks for triggered asserts in the code, or generally for engine disconnects.

closes https://github.com/official-stockfish/Stockfish/pull/5403

No functional change
2024-06-23 11:35:50 +02:00
Joost VandeVondele 44cddbd962 Add matetrack to CI
verifies that all mate PVs printed for finished iterations (i.e. no lower or upper bounds),
are complete, i.e. of the expected length and ending in mate, and do not contain drawing
or illegal moves.

based on a set of 2000 positions and the code in https://github.com/vondele/matetrack

closes https://github.com/official-stockfish/Stockfish/pull/5390

No functional change
2024-06-15 12:06:45 +02:00
DisservinandJoost VandeVondele fb18caae7a Update clang-format to version 18
clang-format-18 is available in ubuntu noble(24.04), if you are on
a version lower than that you can use the update script from llvm.
https://apt.llvm.org/

Windows users should be able to download and use clang-format from
their release builds https://github.com/llvm/llvm-project/releases
or get the latest from msys2
https://packages.msys2.org/package/mingw-w64-x86_64-clang.

macOS users can resort to "brew install clang-format".

closes https://github.com/official-stockfish/Stockfish/pull/5365

No functional change
2024-06-05 21:41:43 +02:00
DisservinandJoost VandeVondele 56a9cc512e Move ALSR change to CI Workflow file
It makes more sense to not (potentially) change the developers alsr entropy setting to make the test run through. This should be an active choice even if the test then might fail locally for them.

closes https://github.com/official-stockfish/Stockfish/pull/5182

No functional change
2024-04-21 14:49:11 +02:00