From 4749eed5d0c007c2147a79a0ee8a2ab3c32cc3ba Mon Sep 17 00:00:00 2001 From: JohnDoe6345789 Date: Fri, 26 Dec 2025 06:25:47 +0000 Subject: [PATCH] docs: cli,yml,workflows (2 files) --- .github/workflows/ci/cli.yml | 57 ++++++++++++++++++++++++++++++++++++ frontends/cli/README.md | 4 +++ 2 files changed, 61 insertions(+) create mode 100644 .github/workflows/ci/cli.yml diff --git a/.github/workflows/ci/cli.yml b/.github/workflows/ci/cli.yml new file mode 100644 index 000000000..0dab5a1c1 --- /dev/null +++ b/.github/workflows/ci/cli.yml @@ -0,0 +1,57 @@ +name: CLI Build + +on: + push: + branches: [ main, develop ] + paths: + - 'frontends/cli/**' + - '.github/workflows/ci/cli.yml' + pull_request: + branches: [ main, develop ] + paths: + - 'frontends/cli/**' + - '.github/workflows/ci/cli.yml' + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + name: Build MetaBuilder CLI + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install build dependencies + run: | + sudo apt-get update + sudo apt-get install -y cmake ninja-build python3-pip libssl-dev + + - name: Install Conan + run: | + python3 -m pip install --upgrade pip + python3 -m pip install conan + + - name: Detect Conan profile + run: conan profile detect --force + + - name: Install Conan dependencies + run: | + mkdir -p frontends/cli/build + conan install frontends/cli \ + --output-folder frontends/cli/build \ + --build missing + + - name: Configure CLI with CMake + run: | + cmake -S frontends/cli -B frontends/cli/build -G Ninja \ + -DCMAKE_TOOLCHAIN_FILE=frontends/cli/build/conan_toolchain.cmake + + - name: Build CLI executable + run: cmake --build frontends/cli/build + + - name: Run help command to verify binary + run: frontends/cli/build/bin/metabuilder-cli --help diff --git a/frontends/cli/README.md b/frontends/cli/README.md index 645b2c885..cf2889a48 100644 --- a/frontends/cli/README.md +++ b/frontends/cli/README.md @@ -30,3 +30,7 @@ METABUILDER_BASE_URL=http://localhost:3000 ./build/bin/metabuilder-cli user list ``` Available commands are listed when running without arguments or with an unrecognized command. + +## Continuous Integration + +Changes under `frontends/cli/` now trigger `.github/workflows/ci/cli.yml`, which runs Conan, configures/ninja-build the project, and validates that `metabuilder-cli --help` exits cleanly.