diff --git a/CHANGELOG.md b/CHANGELOG.md index 268afb7b..9ff54ac4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -116,6 +116,10 @@ 该检查同时按新的位置核对 SDK 的许可文件,并为本次运行请求项目根的编译数据库(`MCPP_COMPILE_COMMANDS`;mcpp 2026.10.26.1 起只在 请求时写出),模板生成的清单保持原样;`mcpp pack` 改用 `--pkg-format`。 +- **mcpp.platforms 0.1.0 的条目列出每种宿主。** 条目此前只列 Linux,macOS 与 Windows 宿主无法安装该包 + (`has no build for windows`),它服务的行在这两种宿主上无法经索引构建(mcpp e2e 1116 测得)。包是一份陈述, + 各宿主使用同一个归档。 测试成员 `tests/examples/mcpp-platforms` 为这些行指名此版本;行由包自己的 CI 在三种宿主上构建。 + - **CI 的 mcpp 由 2026.11.17.1 改为 2026.11.17.2**(validate、xpkgindex-update 与 openkal-compat):该版的默认平台为 openkal-platform 0.29.1,安装 ninja `1.12.1-mcpp.1`,随带 xlings 2026.11.17.2。 diff --git a/mcpp.toml b/mcpp.toml index 479aa65b..a9b4a51f 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -94,6 +94,7 @@ members = [ "tests/examples/cuda-driver", "tests/examples/curl", "tests/examples/djgpp-platform", + "tests/examples/mcpp-platforms", "tests/examples/doctest", "tests/examples/dr_libs", "tests/examples/eigen", diff --git a/pkgs/m/mcpp.platforms.lua b/pkgs/m/mcpp.platforms.lua index 900bd706..b5efce84 100644 --- a/pkgs/m/mcpp.platforms.lua +++ b/pkgs/m/mcpp.platforms.lua @@ -10,8 +10,12 @@ -- 0.1.0 (package floor mcpp 2026.11.17.1): FreeBSD 14.5, NetBSD 10.2 and -- OpenBSD 8.0, x86_64 and aarch64. NetBSD's C++ layer is libc++ from source -- (llvm.libcxx), so `import std` holds over the release's GCC 10 libstdc++ --- base. Runners: FreeBSD (both), NetBSD and OpenBSD (x86_64). The rows build on --- Linux hosts (mcpp-community/mcpp-platforms#1). +-- base. Runners: FreeBSD (both), NetBSD and OpenBSD (x86_64). The package is the +-- same on every host, and the entry lists each: it listed Linux alone, and a +-- macOS or Windows host could not install it ("has no build for windows"), so +-- the rows it serves could not be built there from the index (measured in +-- mcpp's e2e 1116, mcpp-community/mcpp#951). The rows build on Linux, macOS and +-- Windows hosts with mcpp 2026.11.18.1 (mcpp-community/mcpp-platforms#4). package = { spec = "1", namespace = "mcpp", @@ -33,6 +37,7 @@ package = { -- The descriptor points at the source archive of the tag; the CN asset is the -- same bytes, so one sha256 names both. + -- One archive for every host: the package is a statement, not a program. xpm = { linux = { ["0.1.0"] = { @@ -44,6 +49,26 @@ package = { }, ["latest"] = { ref = "0.1.0" }, }, + macosx = { + ["0.1.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mcpp-platforms/archive/refs/tags/0.1.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mcpp-platforms/releases/download/0.1.0/mcpp-platforms-0.1.0.tar.gz", + }, + sha256 = "bd09836f9952af28ede3f9c4568aafd999ace803f2cad21fed0aa4ca495893f3", + }, + ["latest"] = { ref = "0.1.0" }, + }, + windows = { + ["0.1.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mcpp-platforms/archive/refs/tags/0.1.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mcpp-platforms/releases/download/0.1.0/mcpp-platforms-0.1.0.tar.gz", + }, + sha256 = "bd09836f9952af28ede3f9c4568aafd999ace803f2cad21fed0aa4ca495893f3", + }, + ["latest"] = { ref = "0.1.0" }, + }, }, -- The package's own manifest, at the archive root. diff --git a/tests/examples/mcpp-platforms/mcpp.toml b/tests/examples/mcpp-platforms/mcpp.toml new file mode 100644 index 00000000..02d2ec45 --- /dev/null +++ b/tests/examples/mcpp-platforms/mcpp.toml @@ -0,0 +1,16 @@ +# mcpp:platforms test project. The package serves the rows of FreeBSD, NetBSD +# and OpenBSD, which no member of this repository builds: the member names the +# release for those rows, and the rows are built on Linux, macOS and Windows +# hosts (and run where an image exists) by the package's own CI +# (mcpp-community/mcpp-platforms) and by mcpp's e2e 1116. On a runner the +# member's host build checks that a project naming the platform for another row +# resolves, builds and tests unaffected. +[package] +name = "mcpp-platforms-tests" +version = "0.1.0" + +[target.'cfg(any(os = "freebsd", os = "netbsd", os = "openbsd"))'] +platform = "mcpp.platforms@0.1.0" + +[indices] +mcpplibs = { path = "../../.." } diff --git a/tests/examples/mcpp-platforms/tests/host.cpp b/tests/examples/mcpp-platforms/tests/host.cpp new file mode 100644 index 00000000..ad50c7f3 --- /dev/null +++ b/tests/examples/mcpp-platforms/tests/host.cpp @@ -0,0 +1,7 @@ +// The member's host build: a row other than the platform's is untouched by it. +import std; + +int main() { + std::println("host row unaffected by mcpp:platforms"); + return 0; +}