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
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
cmdline: ${{ steps.filter.outputs.cmdline }}
llmapi: ${{ steps.filter.outputs.llmapi }}
lua: ${{ steps.filter.outputs.lua }}
xpkg: ${{ steps.filter.outputs.xpkg }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
Expand All @@ -47,14 +48,19 @@ jobs:
- 'packages/m/mcpplibs-capi-lua/**'
- 'tests/l/lua/**'
- '.github/workflows/ci.yml'
xpkg:
- 'packages/m/mcpplibs-xpkg/**'
- 'tests/m/mcpplibs-xpkg/**'
- '.github/workflows/ci.yml'

build:
needs: detect-changes
if: >-
needs.detect-changes.outputs.templates == 'true' ||
needs.detect-changes.outputs.cmdline == 'true' ||
needs.detect-changes.outputs.llmapi == 'true' ||
needs.detect-changes.outputs.lua == 'true'
needs.detect-changes.outputs.lua == 'true' ||
needs.detect-changes.outputs.xpkg == 'true'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -150,3 +156,19 @@ jobs:
$env:PATH = "$env:USERPROFILE\.xlings\subos\current\bin;$env:PATH"
xmake build -P . -y lua_test
xmake run -P . lua_test

# mcpplibs-xpkg
- name: mcpplibs-xpkg (unix)
if: runner.os != 'Windows' && needs.detect-changes.outputs.xpkg == 'true'
working-directory: tests
run: |
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
xmake build -P . -y mcpplibs-xpkg_test
xmake run -P . mcpplibs-xpkg_test
- name: mcpplibs-xpkg (windows)
if: runner.os == 'Windows' && needs.detect-changes.outputs.xpkg == 'true'
working-directory: tests
run: |
$env:PATH = "$env:USERPROFILE\.xlings\subos\current\bin;$env:PATH"
xmake build -P . -y mcpplibs-xpkg_test
xmake run -P . mcpplibs-xpkg_test
25 changes: 25 additions & 0 deletions packages/m/mcpplibs-xpkg/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package("mcpplibs-xpkg")

set_homepage("https://github.com/Sunrisepeak/libxpkg")
set_description("C++23 reference implementation of the xpkg package specification")
set_license("MIT")

add_urls(
"https://github.com/Sunrisepeak/libxpkg/archive/refs/tags/v$(version).tar.gz",
"https://github.com/Sunrisepeak/libxpkg.git v$(version)"
)

add_versions("0.0.1", "4bbf178c9225e6be09302408ebe70edfdae237adbf142ddf10d1535aec2ae0cd")

add_deps("mcpplibs-capi-lua")

on_install(function (package)
local configs = {}
local install = import("package.tools.xmake").install
-- Install each library target individually to avoid building examples/tests
install(package, configs, {target = "mcpplibs-xpkg"})
install(package, configs, {target = "mcpplibs-xpkg-loader"})
install(package, configs, {target = "mcpplibs-xpkg-index"})
install(package, configs, {target = "mcpplibs-xpkg-lua-stdlib"})
install(package, configs, {target = "mcpplibs-xpkg-executor"})
end)
10 changes: 10 additions & 0 deletions tests/m/mcpplibs-xpkg/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import std;
import mcpplibs.xpkg;

int main() {
mcpplibs::xpkg::Package pkg;
pkg.name = "test";
pkg.description = "mcpplibs-xpkg smoke test";
std::println("package: {} - {}", pkg.name, pkg.description);
return 0;
}
9 changes: 9 additions & 0 deletions tests/m/mcpplibs-xpkg/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
add_requires("mcpplibs-xpkg 0.0.1")
add_requires("mcpplibs-capi-lua 0.0.1")

target("mcpplibs-xpkg_test")
set_kind("binary")
set_languages("c++23")
add_files("main.cpp")
add_packages("mcpplibs-xpkg", "mcpplibs-capi-lua")
set_policy("build.c++.modules", true)
1 change: 1 addition & 0 deletions tests/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ includes("l/llmapi")
includes("l/lua")
includes("c/cmdline")
includes("t/templates")
includes("m/mcpplibs-xpkg")
Loading