enhance xce-build skill

This commit is contained in:
Rongsong Shen 2026-05-30 08:13:59 +08:00
parent 9bbff7b016
commit c8e0f65a39
7 changed files with 107 additions and 22 deletions

View file

@ -1,6 +1,6 @@
---
name: xce-build
description: Build the xce source code
description: "Build XCE components with tests. Usage: /xce-build [component] [build_dir]. Components: all (default), lib, controller, scheduler, worker, apiserver, xcecli"
context: fork
disable-model-invocation: true
allowed-tools: Bash(*)
@ -9,12 +9,9 @@ allowed-tools: Bash(*)
## build xce source code
```bash
BUILD_DIR="$0"
if [ -z "$BUILD_DIR" ]; then
BUILD_DIR=xce.build
fi
COMPONENT="$0"
BUILD_DIR="$1"
cd src && \
nix develop --command "rm -Rf $BUILD_DIR && meson setup $BUILD_DIR --buildtype=debug -Db_sanitize=address && meson compile -C $BUILD_DIR"
nix develop --command bash tools/xce-build.sh ${COMPONENT:+$COMPONENT} ${BUILD_DIR:+$BUILD_DIR}
```