Skip to content

Commit b8942c0

Browse files
Sunrisepeakclaude
andcommitted
feat: add mcpplibs-xpkg package (libxpkg 0.0.1)
Add the xpkg package specification C++23 reference implementation to the mcpplibs index with package definition, smoke test, and CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f3ba707 commit b8942c0

File tree

5 files changed

+61
-1
lines changed

5 files changed

+61
-1
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
cmdline: ${{ steps.filter.outputs.cmdline }}
2626
llmapi: ${{ steps.filter.outputs.llmapi }}
2727
lua: ${{ steps.filter.outputs.lua }}
28+
xpkg: ${{ steps.filter.outputs.xpkg }}
2829
steps:
2930
- uses: actions/checkout@v4
3031
- uses: dorny/paths-filter@v3
@@ -47,14 +48,19 @@ jobs:
4748
- 'packages/m/mcpplibs-capi-lua/**'
4849
- 'tests/l/lua/**'
4950
- '.github/workflows/ci.yml'
51+
xpkg:
52+
- 'packages/m/mcpplibs-xpkg/**'
53+
- 'tests/m/mcpplibs-xpkg/**'
54+
- '.github/workflows/ci.yml'
5055
5156
build:
5257
needs: detect-changes
5358
if: >-
5459
needs.detect-changes.outputs.templates == 'true' ||
5560
needs.detect-changes.outputs.cmdline == 'true' ||
5661
needs.detect-changes.outputs.llmapi == 'true' ||
57-
needs.detect-changes.outputs.lua == 'true'
62+
needs.detect-changes.outputs.lua == 'true' ||
63+
needs.detect-changes.outputs.xpkg == 'true'
5864
strategy:
5965
fail-fast: false
6066
matrix:
@@ -150,3 +156,19 @@ jobs:
150156
$env:PATH = "$env:USERPROFILE\.xlings\subos\current\bin;$env:PATH"
151157
xmake build -P . -y lua_test
152158
xmake run -P . lua_test
159+
160+
# mcpplibs-xpkg
161+
- name: mcpplibs-xpkg (unix)
162+
if: runner.os != 'Windows' && needs.detect-changes.outputs.xpkg == 'true'
163+
working-directory: tests
164+
run: |
165+
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
166+
xmake build -P . -y mcpplibs-xpkg_test
167+
xmake run -P . mcpplibs-xpkg_test
168+
- name: mcpplibs-xpkg (windows)
169+
if: runner.os == 'Windows' && needs.detect-changes.outputs.xpkg == 'true'
170+
working-directory: tests
171+
run: |
172+
$env:PATH = "$env:USERPROFILE\.xlings\subos\current\bin;$env:PATH"
173+
xmake build -P . -y mcpplibs-xpkg_test
174+
xmake run -P . mcpplibs-xpkg_test

packages/m/mcpplibs-xpkg/xmake.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package("mcpplibs-xpkg")
2+
3+
set_homepage("https://github.com/Sunrisepeak/libxpkg")
4+
set_description("C++23 reference implementation of the xpkg package specification")
5+
set_license("MIT")
6+
7+
add_urls(
8+
"https://github.com/Sunrisepeak/libxpkg/archive/refs/tags/$(version).tar.gz",
9+
"https://github.com/Sunrisepeak/libxpkg.git"
10+
)
11+
12+
add_versions("0.0.1", "4bbf178c9225e6be09302408ebe70edfdae237adbf142ddf10d1535aec2ae0cd")
13+
14+
add_deps("mcpplibs-capi-lua")
15+
16+
on_install(function (package)
17+
local configs = {}
18+
import("package.tools.xmake").install(package, configs, {target = "xpkg"})
19+
end)

tests/m/mcpplibs-xpkg/main.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import std;
2+
import mcpplibs.xpkg;
3+
4+
int main() {
5+
mcpplibs::xpkg::Package pkg;
6+
pkg.name = "test";
7+
pkg.description = "mcpplibs-xpkg smoke test";
8+
std::println("package: {} - {}", pkg.name, pkg.description);
9+
return 0;
10+
}

tests/m/mcpplibs-xpkg/xmake.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
add_requires("mcpplibs-xpkg 0.0.1")
2+
3+
target("mcpplibs-xpkg_test")
4+
set_kind("binary")
5+
set_languages("c++23")
6+
add_files("main.cpp")
7+
add_packages("mcpplibs-xpkg")
8+
set_policy("build.c++.modules", true)

tests/xmake.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ includes("l/llmapi")
44
includes("l/lua")
55
includes("c/cmdline")
66
includes("t/templates")
7+
includes("m/mcpplibs-xpkg")

0 commit comments

Comments
 (0)