Publish standalone Linux fallbacks in automatic releases (bench 5551733)
Co-authored-by: GPT-6 Astra <codex@openai.com>
This commit is contained in:
5 files changed
+34
-27
No files matched your search
@@ -46,7 +46,7 @@ extract it, and select the executable in your chess GUI. All builds require a
|
||||
The Linux executable selects AMD64 or ARM64 and extracts its engine and shared
|
||||
network into a private runtime cache on first launch. See the
|
||||
[cache requirements and settings](docs/RELEASES.md#linux-universal-executable).
|
||||
Some releases also offer separate `linux-amd64-universal` and
|
||||
Automatic releases also include separate `linux-amd64-universal` and
|
||||
`linux-arm64-universal` downloads. These embed their weights and need no launcher
|
||||
or runtime cache; choose the one matching your CPU if you need that fallback.
|
||||
See [release selection](docs/RELEASES.md#linux-universal-executable) for availability.
|
||||
|
||||
+20
-16
@@ -22,9 +22,10 @@ The [README](../README.md#how-to-pick-the-right-executable) explains which
|
||||
universal executable to download; [SIMD documentation](SIMD.md) covers individual
|
||||
backend names for manual builds and older releases.
|
||||
The **Release binaries** GitHub workflow automatically publishes only universal
|
||||
downloads: combined Linux AMD64/ARM64, Windows amd64, and combined macOS. Targets
|
||||
can be selected independently. Individual SIMD artifacts
|
||||
are available through manual runs. The SIMD correctness workflow remains manual-only.
|
||||
downloads: combined Linux AMD64/ARM64, standalone Linux AMD64 and ARM64 fallbacks,
|
||||
Windows amd64, and combined macOS. Targets can be selected independently.
|
||||
Individual SIMD artifacts are available through manual runs. The SIMD correctness
|
||||
workflow remains manual-only.
|
||||
|
||||
## Linux universal executable
|
||||
|
||||
@@ -40,8 +41,8 @@ GUI. The executable can be moved or symlinked by itself. It requires `/bin/sh`,
|
||||
`gzip` and GNU coreutils (`uname`, `readlink`, `dd`, `sha256sum`, `stat`, `id`,
|
||||
`mkdir`, `mktemp`, `chmod`, `mv`, `rm`). The engines retain their normal Linux
|
||||
library requirements. A GUI must accept executable scripts; separate
|
||||
`linux-amd64-universal` and `linux-arm64-universal` ELF downloads remain manually
|
||||
selectable and are also used by older releases.
|
||||
`linux-amd64-universal` and `linux-arm64-universal` ELF downloads are included
|
||||
automatically as fallbacks and can also be selected individually.
|
||||
|
||||
On first launch, the executable extracts only the selected engine and shared
|
||||
`network.bin` into a private cache. The cache location is:
|
||||
@@ -79,16 +80,18 @@ sources, settings, weights, ELF architectures or checksums. It writes one shared
|
||||
weights payload, then both native runners check the resulting executable with
|
||||
the production bench and UCI/runtime-SIMD regressions. Publication waits for both
|
||||
checks. Internal slice archives remain available in Actions but are never
|
||||
published to Gitea. The `all` and `linux` selections additionally build the
|
||||
standalone ELF variants with embedded weights.
|
||||
published to Gitea. Standalone fallbacks are built separately with embedded
|
||||
weights and published by the native build jobs.
|
||||
|
||||
Automatic tag releases currently publish the combined Linux executable only.
|
||||
To add standalone fallbacks to the same release, run the workflow separately for
|
||||
`linux-amd64-universal` and `linux-arm64-universal`, with the same `release_tag`.
|
||||
Selecting `linux` or `all` also publishes them, together with the individual SIMD
|
||||
variants. These standalone executables embed their weights and need no launcher
|
||||
or runtime cache. The internal `*-universal-slice.tar.gz` Actions artifacts are
|
||||
assembly inputs, not standalone fallback downloads.
|
||||
Automatic tag releases and the default `universal` selection publish all three
|
||||
Linux executables: `linux-universal`, `linux-amd64-universal` and
|
||||
`linux-arm64-universal`. The two standalone fallbacks embed their weights and
|
||||
need no launcher or runtime cache. Selecting `linux` or `all` also publishes
|
||||
individual SIMD variants. An explicit `linux-universal` selection builds only
|
||||
the combined executable; either standalone fallback can be rebuilt separately
|
||||
with its complete target name and the same `release_tag`. The internal
|
||||
`*-universal-slice.tar.gz` Actions artifacts are assembly inputs, not standalone
|
||||
fallback downloads.
|
||||
|
||||
To assemble locally, build each internal slice on its matching Linux host from
|
||||
the same commit, network and Makefile settings:
|
||||
@@ -160,8 +163,9 @@ Only the selected target is compiled, bench-checked, packaged and uploaded
|
||||
The existing tag is not moved. A rerun replaces only files belonging to that
|
||||
target; other release assets and older aggregate archives remain intact.
|
||||
|
||||
Tag pushes always select `universal`. Manual runs and the local planning command
|
||||
also default to `universal`; choose `all` explicitly to build every individual
|
||||
Tag pushes always select `universal`, including both standalone Linux fallbacks.
|
||||
Manual runs and the local planning command also default to `universal`;
|
||||
choose `all` explicitly to build every individual
|
||||
SIMD variant as well. Manual `linux`, `windows`, and `macos` selections include
|
||||
all variants for that platform, including the combined package (`macos` selects
|
||||
all three Mac builds). A complete target name builds just that artifact. No push
|
||||
|
||||
+4
-4
@@ -263,10 +263,10 @@ The **Release binaries** workflow builds each CPU slice on its native runner.
|
||||
For the combined Linux package it assembles both slices, then checks the same
|
||||
executable through its launcher on native AMD64 and ARM64 runners before publishing.
|
||||
Tag pushes publish combined Linux, Windows amd64 and combined macOS universal
|
||||
downloads. The separate `linux-amd64-universal` and `linux-arm64-universal`
|
||||
executables retain embedded weights and are published only when selected manually,
|
||||
including through `linux` or `all`. They can serve as fallbacks for systems that
|
||||
cannot run the self-extracting launcher. Manual dispatch can also select individual
|
||||
downloads, plus standalone `linux-amd64-universal` and `linux-arm64-universal`
|
||||
executables with embedded weights. These fallbacks need no launcher or cache and
|
||||
are also included in manual `universal`, `linux` and `all` selections. They serve
|
||||
systems that cannot run the self-extracting launcher. Manual dispatch can also select individual
|
||||
SIMD targets and publish them to an existing tag. Intel and Apple Silicon Mac jobs
|
||||
run natively on `macos-15-intel` and `macos-15`. AVX-512/VNNI correctness runs
|
||||
require suitable hardware; release bench checks skip unsupported binaries.
|
||||
|
||||
+3
-4
@@ -63,13 +63,12 @@ def includes_linux_bundle(selection):
|
||||
def matrix(selection):
|
||||
targets = [value for key, value in TARGETS.items()
|
||||
if selection in ("all", value["os"], key) or
|
||||
(selection == "universal" and value["backend"] == "universal"
|
||||
and key not in LINUX_SLICES)]
|
||||
(selection == "universal" and value["backend"] == "universal")]
|
||||
if not targets:
|
||||
raise ValueError(f"Unknown release target {selection!r}; choose all, universal, linux, windows, macos, or "
|
||||
+ ", ".join(TARGETS))
|
||||
# The combined Linux artifact uses two native builds. Individual slices are
|
||||
# published only when explicitly selected (including all/platform selections).
|
||||
# Default universal releases also publish standalone Linux fallbacks. An
|
||||
# explicit linux-universal selection builds only the internal bundle slices.
|
||||
jobs = {target["target"]: dict(target, publish=True) for target in targets
|
||||
if target["target"] != "linux-universal"}
|
||||
if includes_linux_bundle(selection):
|
||||
|
||||
@@ -58,7 +58,8 @@ class ReleaseWorkflowTests(unittest.TestCase):
|
||||
self.assertEqual(mac["make_target"], "macos-universal")
|
||||
self.assertEqual(mac["arch"], "universal")
|
||||
self.assertEqual({job["target"] for job in jobs if job["publish"]},
|
||||
{"windows-amd64-universal", "macos-universal"})
|
||||
{"linux-amd64-universal", "linux-arm64-universal",
|
||||
"windows-amd64-universal", "macos-universal"})
|
||||
|
||||
def test_combined_linux_builds_both_slices_without_publishing_them(self):
|
||||
jobs = release.matrix("linux-universal")["include"]
|
||||
@@ -91,7 +92,7 @@ class ReleaseWorkflowTests(unittest.TestCase):
|
||||
self.assertEqual(outputs.call_args.args[0]["tag"], "")
|
||||
self.assertEqual(json.loads(outputs.call_args.args[0]["matrix"]), release.matrix("all"))
|
||||
|
||||
def test_tag_push_publishes_only_universal_binaries(self):
|
||||
def test_tag_push_includes_combined_linux_and_standalone_fallbacks(self):
|
||||
args = argparse.Namespace(target="all", ref="", tag="")
|
||||
with patch.dict(os.environ, {"GITHUB_EVENT_NAME": "push", "GITHUB_REF_TYPE": "tag",
|
||||
"GITHUB_REF_NAME": "1.5.1-dev", "GITHUB_REF": "refs/tags/1.5.1-dev"}), \
|
||||
@@ -101,6 +102,9 @@ class ReleaseWorkflowTests(unittest.TestCase):
|
||||
self.assertEqual(outputs.call_args.args[0]["tag"], "1.5.1-dev")
|
||||
self.assertEqual(outputs.call_args.args[0]["linux_universal"], "true")
|
||||
self.assertEqual(json.loads(outputs.call_args.args[0]["matrix"]), release.matrix("universal"))
|
||||
jobs = json.loads(outputs.call_args.args[0]["matrix"])["include"]
|
||||
self.assertEqual({job["target"] for job in jobs if job["os"] == "linux" and job["publish"]},
|
||||
{"linux-amd64-universal", "linux-arm64-universal"})
|
||||
|
||||
def test_default_cli_plan_selects_only_universal_binaries(self):
|
||||
with patch("sys.argv", ["release.py", "plan"]), \
|
||||
|
||||
Reference in new issue
Block a user