mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
docs: cli,yml,workflows (2 files)
This commit is contained in:
57
.github/workflows/ci/cli.yml
vendored
Normal file
57
.github/workflows/ci/cli.yml
vendored
Normal file
@@ -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
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user