Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/repository-and-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ locally with `mcpp xpkg parse pkgs/<x>/<name>.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
Expand Down
4 changes: 3 additions & 1 deletion docs/zh/repository-and-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 上回答 ——
哪些成员要跑、每个平台分几片、哪些成员落在哪一片。
Expand Down
7 changes: 7 additions & 0 deletions pkgs/o/openkal-linux.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions pkgs/o/openkal-macos.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions pkgs/o/openkal-musl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions pkgs/o/openkal-windows.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions pkgs/o/openkal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
25 changes: 23 additions & 2 deletions tests/install_every_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -123,13 +127,21 @@ def fetch(mcpp, namespace, name, version, workdir, choices):
return run.returncode, run.stdout + run.stderr


def not_installing():
"""The `<package>@<version>` 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)
parser.add_argument("--base", help="the commit the change is compared with")
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)
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions tests/versions-not-installing.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Listed versions that do not install, one line each: <platform>\t<package>@<version>\t<why>.
# 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
Loading