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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,19 @@
都读到已填写的表;此前其中一个可能读到空表,把已设置的变量(`PATH`)报为不存在。管道的有界读以
性能计数器计量时限,此前把每次 1 ms 的睡眠计为 1 ms,而默认计时器下一次睡眠持续约 15.6 ms,
100 ms 的时限约等待 1.5 s。测试成员 `openkal` 随之移动。
- **openkal-run、openkal-tools、openkal-ld 0.1.1,openkal-musl 0.22.3,openkal-llvm-runtime 0.16.3。**
openkal-image 的三个包移到 openkal 0.17.1 这一轮:okrun 把 ok image 导入的名字绑定到 openkal-linux 0.18.2、
openkal-macos 0.15.1 与 openkal-windows 0.13.3,以 `KAL_SPAWN_ONE_STRING` 启动命令解释器的 image 在 okrun
下得到该标志的语义;三个包仍为同一版本、同一归档。openkal-musl 随 openkal-windows 0.13.3 与 openkal-ld 0.1.1
移动,openkal-llvm-runtime 随 openkal-musl 移动。测试成员 `openkal`、`openkal-musl`、`openkal-tools` 随之移动。

### Changed

- **同一归档的包由点名其中一个的成员一并构建。** 候选矩阵要求每个新增版本有直接点名它的测试成员;
openkal-image 的 openkal-ld、openkal-run 与 openkal-tools 同一标签、同一归档,彼此以 `path` 依赖到达,
成员 `openkal-tools` 构建 openkal-tools 时即从同一字节构建另两个。`tests/autoupdate/ci.py` 的 matrix
对没有直接成员的包,查找本次计划中归档 URL 完全相同且有直接成员的同胞包,由该同胞的任务覆盖;
不同归档的包仍报 `no candidate consumer`。
- **CI 按包身份选择受影响的成员。** `validate.yml` 的 select 曾在成员清单中查找描述符短名的
子串:`pkgs/o/os.lua` 选中 205 个成员中的 113 个(`boost-*`、`macos`、`cfg(os = ...)`、
注释里的 `exists`),而经 asio、curl 依赖 `compat.openssl` 的成员一个也未选中。
Expand Down
21 changes: 21 additions & 0 deletions pkgs/o/openkal-ld.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ package = {

xpm = {
linux = {
["0.1.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.1/openkal-image-0.1.1.tar.gz",
},
sha256 = "7b0056d62e1f297b937d63e9f59b5d82ec19f034a1286ec6ec44d6c834d5f0cc",
},
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -27,6 +34,13 @@ package = {
},
},
macosx = {
["0.1.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.1/openkal-image-0.1.1.tar.gz",
},
sha256 = "7b0056d62e1f297b937d63e9f59b5d82ec19f034a1286ec6ec44d6c834d5f0cc",
},
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -36,6 +50,13 @@ package = {
},
},
windows = {
["0.1.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.1/openkal-image-0.1.1.tar.gz",
},
sha256 = "7b0056d62e1f297b937d63e9f59b5d82ec19f034a1286ec6ec44d6c834d5f0cc",
},
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/o/openkal-llvm-runtime.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ package = {

xpm = {
linux = {
["0.16.3"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.3.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.3/openkal-llvm-runtime-0.16.3.tar.gz",
},
sha256 = "7b86c7303632946c513f8efb688dd0fda1d20e70e859e927b3c5beee60d06eeb",
},
["0.16.2"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.2.tar.gz",
Expand Down Expand Up @@ -322,6 +329,13 @@ package = {
},
},
macosx = {
["0.16.3"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.3.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.3/openkal-llvm-runtime-0.16.3.tar.gz",
},
sha256 = "7b86c7303632946c513f8efb688dd0fda1d20e70e859e927b3c5beee60d06eeb",
},
["0.16.2"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.2.tar.gz",
Expand Down Expand Up @@ -569,6 +583,13 @@ package = {
},
},
windows = {
["0.16.3"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.3.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.3/openkal-llvm-runtime-0.16.3.tar.gz",
},
sha256 = "7b86c7303632946c513f8efb688dd0fda1d20e70e859e927b3c5beee60d06eeb",
},
["0.16.2"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.2.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/o/openkal-musl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ package = {

xpm = {
linux = {
["0.22.3"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.3.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.22.3/openkal-musl-0.22.3.tar.gz",
},
sha256 = "390f1b300ba210f9b7aa45b6306de18be3796041ade7256d67db16159e043f8f",
},
["0.22.2"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.2.tar.gz",
Expand Down Expand Up @@ -325,6 +332,13 @@ package = {
},
},
macosx = {
["0.22.3"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.3.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.22.3/openkal-musl-0.22.3.tar.gz",
},
sha256 = "390f1b300ba210f9b7aa45b6306de18be3796041ade7256d67db16159e043f8f",
},
["0.22.2"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.2.tar.gz",
Expand Down Expand Up @@ -586,6 +600,13 @@ package = {
},
},
windows = {
["0.22.3"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.3.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.22.3/openkal-musl-0.22.3.tar.gz",
},
sha256 = "390f1b300ba210f9b7aa45b6306de18be3796041ade7256d67db16159e043f8f",
},
["0.22.2"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.2.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/o/openkal-run.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ package = {

xpm = {
linux = {
["0.1.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.1/openkal-image-0.1.1.tar.gz",
},
sha256 = "7b0056d62e1f297b937d63e9f59b5d82ec19f034a1286ec6ec44d6c834d5f0cc",
},
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -27,6 +34,13 @@ package = {
},
},
macosx = {
["0.1.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.1/openkal-image-0.1.1.tar.gz",
},
sha256 = "7b0056d62e1f297b937d63e9f59b5d82ec19f034a1286ec6ec44d6c834d5f0cc",
},
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -36,6 +50,13 @@ package = {
},
},
windows = {
["0.1.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.1/openkal-image-0.1.1.tar.gz",
},
sha256 = "7b0056d62e1f297b937d63e9f59b5d82ec19f034a1286ec6ec44d6c834d5f0cc",
},
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/o/openkal-tools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ package = {

xpm = {
linux = {
["0.1.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.1/openkal-image-0.1.1.tar.gz",
},
sha256 = "7b0056d62e1f297b937d63e9f59b5d82ec19f034a1286ec6ec44d6c834d5f0cc",
},
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -29,6 +36,13 @@ package = {
},
},
macosx = {
["0.1.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.1/openkal-image-0.1.1.tar.gz",
},
sha256 = "7b0056d62e1f297b937d63e9f59b5d82ec19f034a1286ec6ec44d6c834d5f0cc",
},
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -38,6 +52,13 @@ package = {
},
},
windows = {
["0.1.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.1/openkal-image-0.1.1.tar.gz",
},
sha256 = "7b0056d62e1f297b937d63e9f59b5d82ec19f034a1286ec6ec44d6c834d5f0cc",
},
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz",
Expand Down
19 changes: 15 additions & 4 deletions tests/autoupdate/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,24 @@ def matrix(plan: Path, output: Path, base: str):
build_plan["packages"] = [r for r in build_plan["packages"] if r["id"] != info["id"]]
build_plan["packages"].append({"id": info["id"], "path": info["path"],
"candidate": candidate, "status": "existing-candidate", "assets": assets})
# Packages released as one archive (one tag, several manifests reaching
# each other by path) are built together: a member of one builds the
# others from the same bytes, so the job of a sibling that has a member
# proves a package that none names directly.
def archive_of(record):
return frozenset(r["url"] for asset in record.get("assets", []) for r in asset["resources"].values())
candidates = [r for r in build_plan["packages"] if r["status"] in ("update-ready", "existing-candidate")]
jobs = []
for record in build_plan["packages"]:
if record["status"] not in ("update-ready", "existing-candidate"):
continue
for record in candidates:
member = direct_member(record["id"])
if member is None and record["id"] not in ("compat:hiredis", "compat:libuv"):
raise RuntimeError(f"no candidate consumer: {record['id']}")
sibling = next((r["id"] for r in candidates
if r is not record and archive_of(r) and archive_of(r) == archive_of(record)
and direct_member(r["id"])), None)
if sibling is None:
raise RuntimeError(f"no candidate consumer: {record['id']}")
print(f"{record['id']}: built from the same archive by the job of {sibling}")
continue
applicable = member_platforms(member, record["id"]) if member else None
if applicable is not None and not applicable:
print(f"{record['id']}: {member} names it only for a target no runner builds; "
Expand Down
26 changes: 26 additions & 0 deletions tests/autoupdate/test_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,32 @@ def test_mwrap_host_tools_keep_all_native_candidate_jobs(self):
self.assertEqual(sorted(job["platform"] for job in jobs if job["id"] == identity),
["linux", "linux", "macosx", "windows"])

def test_one_archive_is_built_by_the_job_of_the_package_a_member_names(self):
archive = "https://github.com/acme/image/archive/refs/tags/0.1.1.tar.gz"
other = "https://github.com/acme/other/archive/refs/tags/1.0.0.tar.gz"
def record(identity, url):
return {"id": identity, "candidate": "0.1.1", "status": "existing-candidate",
"assets": [{"platform": "macosx", "resources": {"GLOBAL": {"url": url, "sha256": "a" * 64}}}]}
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
member = root / "tests/examples/image-tools"
member.mkdir(parents=True)
(member / "mcpp.toml").write_text(
'[package]\nname="image-tools"\nversion="0.1.0"\n'
'[build-dependencies.acme]\ntools={version="0.1.1",tools=["okld"]}\n')
plan = root / "plan.json"
plan.write_text(json.dumps({"packages": [
record("acme:ld", archive), record("acme:run", archive), record("acme:tools", archive)]}))
output = root / "matrix.json"
with patch.object(ci, "ROOT", root):
ci.matrix(plan, output, None)
jobs = json.loads(output.read_text())["include"]
self.assertEqual([(job["id"], job["member"]) for job in jobs], [("acme:tools", "image-tools")])
# A package of another archive that no member names has no job to share.
plan.write_text(json.dumps({"packages": [record("acme:ld", other), record("acme:tools", archive)]}))
with self.assertRaisesRegex(RuntimeError, "no candidate consumer: acme:ld"):
ci.matrix(plan, output, None)

def test_conditions_select_runners(self):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/openkal-musl/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name = "openkal-musl-tests"
version = "0.1.0"

[target.'cfg(os = "linux")'.dependencies.mcpplibs]
openkal-musl = "0.22.2"
openkal-musl = "0.22.3"

[target.'cfg(os = "linux")'.build]
cxxflags = ["-DHAVE_OPENKAL_MUSL=1"]
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/openkal-tools/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "openkal-tools-tests"
version = "0.1.0"

[build-dependencies.mcpplibs]
openkal-tools = { version = "0.1.0", tools = ["okld", "okrun"] }
openkal-tools = { version = "0.1.1", tools = ["okld", "okrun"] }

[indices]
mcpplibs = { path = "../../.." }
2 changes: 1 addition & 1 deletion tests/examples/openkal/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ openkal-macos = "0.15.1"
openkal-windows = "0.13.3"

[target.'cfg(all(os = "linux", env = "musl"))'.dependencies.mcpplibs]
openkal-llvm-runtime = "0.16.2"
openkal-llvm-runtime = "0.16.3"

[target.'cfg(arch = "wasm32")'.dependencies.mcpplibs]
openkal-emscripten = "0.5.0"
Expand Down
Loading