## Summary - **Remove xmake build system**: delete `xmake.lua`, `test-xmake.yml` workflow, and all xmake-related pixi tasks - **Migrate packaging to CMake**: `publish-clice.yml` now uses `cmake -DCLICE_RELEASE=ON` instead of xmake pack - **Clean up**: remove unused `tests/uv.lock`, `.xmake/` from `.gitignore`, xmake references from docs - **Benchmark CI**: change trigger from `pull_request` to `workflow_dispatch` (manual only) - **Simplify CLI parsing**: use `DecoKV(style = KVStyle::JoinedOrSeparate)` in `clice.cc` and `unit_tests.cc`, replacing verbose `DecoKVStyled` with manual `static_cast` bitmask; use comma separators; explicit `names` only for underscore fields ## Test plan - [x] `pixi run cmake-build RelWithDebInfo` compiles successfully - [x] Verify `pixi run test` passes - [x] Verify `pixi run package` produces correct archives via CMake release build - [x] Verify benchmark workflow can be triggered manually via `gh workflow run benchmark` 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Consolidated CI workflows; some automated triggers converted to manual invocation * Standardized shell for workflow steps and removed legacy build workflow * Switched packaging/build tasks to a CMake/Ninja flow and updated artifact paths * Adjusted ignore rules to include previously-ignored build metadata * **Documentation** * Removed XMake-specific build and test instructions; docs now reflect the CMake-based workflow * **Style** * Updated CLI option declaration style (no user-facing flag name changes) <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
62 lines
1.9 KiB
C++
62 lines
1.9 KiB
C++
#include <string>
|
|
#include <string_view>
|
|
|
|
#include "eventide/deco/deco.h"
|
|
#include "eventide/zest/zest.h"
|
|
#include "support/logging.h"
|
|
|
|
namespace {
|
|
|
|
using deco::decl::KVStyle;
|
|
|
|
struct TestOptions {
|
|
DecoKV(style = KVStyle::JoinedOrSeparate,
|
|
names = {"--test-filter", "--test-filter="},
|
|
help = "Filter tests by name",
|
|
required = false)
|
|
<std::string> test_filter;
|
|
|
|
DecoKV(style = KVStyle::JoinedOrSeparate,
|
|
names = {"--log-level", "--log-level="},
|
|
help = "Log level: trace/debug/info/warn/err",
|
|
required = false)
|
|
<std::string> log_level;
|
|
|
|
DecoKV(style = KVStyle::JoinedOrSeparate,
|
|
names = {"--test-dir", "--test-dir="},
|
|
help = "Test data directory",
|
|
required = false)
|
|
<std::string> test_dir;
|
|
};
|
|
|
|
} // namespace
|
|
|
|
int main(int argc, const char** argv) {
|
|
auto args = deco::util::argvify(argc, argv);
|
|
auto parsed = deco::cli::parse<TestOptions>(args);
|
|
|
|
std::string_view filter = {};
|
|
if(parsed.has_value() && parsed->options.test_filter.has_value()) {
|
|
filter = *parsed->options.test_filter;
|
|
}
|
|
|
|
if(parsed.has_value() && parsed->options.log_level.has_value()) {
|
|
auto level = *parsed->options.log_level;
|
|
if(level == "trace") {
|
|
clice::logging::options.level = clice::logging::Level::trace;
|
|
} else if(level == "debug") {
|
|
clice::logging::options.level = clice::logging::Level::debug;
|
|
} else if(level == "info") {
|
|
clice::logging::options.level = clice::logging::Level::info;
|
|
} else if(level == "warn") {
|
|
clice::logging::options.level = clice::logging::Level::warn;
|
|
} else if(level == "err") {
|
|
clice::logging::options.level = clice::logging::Level::err;
|
|
}
|
|
}
|
|
|
|
clice::logging::stderr_logger("test", clice::logging::options);
|
|
|
|
return eventide::zest::Runner::instance().run_tests(filter);
|
|
}
|