diff --git a/docs/repository-and-schema.md b/docs/repository-and-schema.md index 1e063653..dfbab468 100644 --- a/docs/repository-and-schema.md +++ b/docs/repository-and-schema.md @@ -201,7 +201,9 @@ locally with `mcpp xpkg parse pkgs//.lua`. reads the manifest. Members test one version of a package; this runs the branches an `install()` takes for the others (`tests/install_every_version.py`). A descriptor that reads as at the change's base — the same text outside `xpm`, and the same versions and deps on every platform once references are resolved (`tests/xpm.lua`) - — installs nothing. + — installs nothing. A published version is not removed, so a listed version that does not install is a line of + `tests/versions-not-installing.tsv` with its reason: the job expects it to fail, and fails when it installs so + that the line is removed. - `mirror-cn-reachable` (always runs): `curl`s each CN url; all must return 200. - `select`: decides the entire plan once and emits it to the runners as data. Three questions are answered here rather than on each runner — which members run, how many shards each platform gets, and which members land on diff --git a/docs/zh/repository-and-schema.md b/docs/zh/repository-and-schema.md index effcc1d1..95d9ae2f 100644 --- a/docs/zh/repository-and-schema.md +++ b/docs/zh/repository-and-schema.md @@ -159,7 +159,9 @@ mcpp 跑 `xpkg parse`(strict:未知键即失败),所以需要更新文法/键的 - `every-listed-version`:被改动的描述符为 linux 所列的每个版本各取得一次(在各自的工程里运行 `mcpp fetch`, 以检出的树为内置索引):归档下载、`install()` 运行、mcpp 读到清单。成员只测试一个包的一个版本;这一步执行 `install()` 为其余版本所走的分支(`tests/install_every_version.py`)。读法与改动基线相同的描述符 —— `xpm` - 之外的文本相同,且解析引用之后每个平台的版本与 deps 相同(`tests/xpm.lua`)—— 不安装任何东西。 + 之外的文本相同,且解析引用之后每个平台的版本与 deps 相同(`tests/xpm.lua`)—— 不安装任何东西。已发布的 + 版本不被移除,因此无法安装的所列版本以一行记入 `tests/versions-not-installing.tsv` 并注明原因:作业预期其 + 失败,其能安装时作业失败,以便删去该行。 - `mirror-cn-reachable`(始终运行):逐个 `curl` CN url,均须返回 200。 - `select`:一次性决定整个计划,并以数据形式下发给各 runner。三个问题在此处而非各 runner 上回答 —— 哪些成员要跑、每个平台分几片、哪些成员落在哪一片。 diff --git a/pkgs/o/openkal-linux.lua b/pkgs/o/openkal-linux.lua index 1c9cf1e6..1f3fd01c 100644 --- a/pkgs/o/openkal-linux.lua +++ b/pkgs/o/openkal-linux.lua @@ -19,6 +19,13 @@ package = { xpm = { linux = { + ["0.27.3"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.27.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.27.3/openkal-linux-0.27.3.tar.gz", + }, + sha256 = "ffec2bde307fe405715a7d35e215a2c9fb1e24960e395a347bdad796273e1d9a", + }, ["0.27.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.27.2.tar.gz", diff --git a/pkgs/o/openkal-macos.lua b/pkgs/o/openkal-macos.lua index c176fd7c..7f63fdc9 100644 --- a/pkgs/o/openkal-macos.lua +++ b/pkgs/o/openkal-macos.lua @@ -19,6 +19,13 @@ package = { xpm = { linux = { + ["0.24.2"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.24.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-macos/releases/download/0.24.2/openkal-macos-0.24.2.tar.gz", + }, + sha256 = "2c1606f2e8e6122dec64b35fc781fb47766375822965915c6f999f6b8b265d64", + }, ["0.24.1"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.24.1.tar.gz", diff --git a/pkgs/o/openkal-musl.lua b/pkgs/o/openkal-musl.lua index b07dba78..2e81eeb0 100644 --- a/pkgs/o/openkal-musl.lua +++ b/pkgs/o/openkal-musl.lua @@ -81,6 +81,13 @@ package = { xpm = { linux = { + ["0.30.4"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.30.4.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.30.4/openkal-musl-0.30.4.tar.gz", + }, + sha256 = "2e4d1e0516feed7fceebcd00fe239573974ffc0bfdb3c6224392510d7db4a32f", + }, ["0.30.3"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.30.3.tar.gz", diff --git a/pkgs/o/openkal-windows.lua b/pkgs/o/openkal-windows.lua index 28cbace6..6ab0874c 100644 --- a/pkgs/o/openkal-windows.lua +++ b/pkgs/o/openkal-windows.lua @@ -21,6 +21,13 @@ package = { xpm = { linux = { + ["0.23.2"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.23.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-windows/releases/download/0.23.2/openkal-windows-0.23.2.tar.gz", + }, + sha256 = "dfd3027d773045a2cfd976423cf6ae3e06d099f29ad5c7588fc86c707d18b23c", + }, ["0.23.1"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.23.1.tar.gz", diff --git a/pkgs/o/openkal.lua b/pkgs/o/openkal.lua index 1e4c125b..100e102a 100644 --- a/pkgs/o/openkal.lua +++ b/pkgs/o/openkal.lua @@ -22,6 +22,13 @@ package = { xpm = { linux = { + ["0.26.1"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.26.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.26.1/openkal-0.26.1.tar.gz", + }, + sha256 = "19a30f19dc690ec5ff4edddde7dd8b3283bd906e32328d9085b830e748972446", + }, ["0.26.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.26.0.tar.gz", diff --git a/tests/install_every_version.py b/tests/install_every_version.py index 64e588b4..a8ecc662 100644 --- a/tests/install_every_version.py +++ b/tests/install_every_version.py @@ -25,6 +25,10 @@ for a member). An alias (`latest = { ref = ... }`) names a version already listed and is not fetched twice. +A version that does not install and stays listed (a published version is not +removed) is a line of tests/versions-not-installing.tsv with the reason; it is +expected to fail, and installing it fails the run so that the line is removed. + A descriptor that reads at the change's base as it reads now is not changed: the text outside its xpm table is the same, and every platform's versions and deps, resolved through platform references (tests/xpm.lua), are the same. A @@ -123,6 +127,13 @@ def fetch(mcpp, namespace, name, version, workdir, choices): return run.returncode, run.stdout + run.stderr +def not_installing(): + """The `@` this platform lists and does not install.""" + lines = (ROOT / "tests" / "versions-not-installing.tsv").read_text(encoding="utf-8").splitlines() + rows = [line.split("\t") for line in lines if line.strip() and not line.startswith("#")] + return {row[1] for row in rows if row[0] == AXIS} + + def main(): parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) parser.add_argument("--mcpp", required=True) @@ -130,6 +141,7 @@ def main(): parser.add_argument("descriptors", nargs="+", type=Path) args = parser.parse_args() failed = [] + stated = not_installing() choices = graph_choices() with tempfile.TemporaryDirectory(prefix="every-version-") as directory: workdir = Path(directory) @@ -145,15 +157,24 @@ def main(): continue for version in versions: code, log = fetch(args.mcpp, namespace, name, version, workdir, choices) + key = f"{dependency_key(namespace, name)}@{version}" + if key in stated: + print(f"{key}: {'installs' if code == 0 else 'does not install'}" + " (tests/versions-not-installing.tsv)", flush=True) + if code == 0: + failed.append((descriptor, version)) + print(f"::error file={descriptor}::version {version} installs on {AXIS}; remove " + "its line from tests/versions-not-installing.tsv", file=sys.stderr) + continue status = "ok" if code == 0 else f"FAILED ({code})" - print(f"{dependency_key(namespace, name)}@{version}: {status}", flush=True) + print(f"{key}: {status}", flush=True) if code != 0: failed.append((descriptor, version)) print(log, file=sys.stderr) print(f"::error file={descriptor}::version {version} does not install on {AXIS}", file=sys.stderr) if failed: - print(f"{len(failed)} listed version(s) do not install", file=sys.stderr) + print(f"{len(failed)} listed version(s) do not install as stated", file=sys.stderr) return 1 return 0 diff --git a/tests/versions-not-installing.tsv b/tests/versions-not-installing.tsv new file mode 100644 index 00000000..9c084d6c --- /dev/null +++ b/tests/versions-not-installing.tsv @@ -0,0 +1,5 @@ +# Listed versions that do not install, one line each: \t@\t. +# A published version stays listed (xpkgindex-update.yml audits that none is removed), so a +# version that cannot install is stated here rather than dropped. tests/install_every_version.py +# expects each line's version to fail and fails when it installs; the line is then removed. +linux mcpplibs.openkal-musl@0.3.0 its manifest names sibling checkouts (openkal-linux = { path = "../openkal-linux" }), which the tag archive does not carry; 0.3.1 names versions