feat(cli): add advanced CLI completion support and chdb-rust checkout script #51
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # sccache requires incremental compilation to be disabled. | |
| CARGO_INCREMENTAL: 0 | |
| RUSTFLAGS: "-D warnings" | |
| # Compilation caching via sccache, backed by a node-local hostPath mounted at | |
| # /opt/sccache. The dir persists across the ephemeral ARC runner pods, so each | |
| # job only recompiles crates whose inputs changed. run-in-rust-container.sh | |
| # bind-mounts SCCACHE_DIR into the rust container and forwards these vars. | |
| RUSTC_WRAPPER: sccache | |
| SCCACHE_DIR: /opt/sccache | |
| # Cap on-disk cache size to protect host storage. | |
| SCCACHE_CACHE_SIZE: 20G | |
| CHDB_RUST_REPO: https://github.com/hyperbyte-cloud/chdb-rust.git | |
| CHDB_RUST_REF: feat_arrow_insert | |
| jobs: | |
| doc_links: | |
| name: Doc links (relative .md) | |
| runs-on: hyperbytedb-operator-controller | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Check relative markdown links | |
| run: python3 scripts/check_doc_links.py | |
| fmt: | |
| name: Format | |
| runs-on: hyperbytedb-operator-controller | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout chdb-rust | |
| run: bash .github/scripts/checkout-chdb-rust.sh | |
| - name: Install CI dependencies | |
| uses: ./.github/actions/install-ci-deps | |
| with: | |
| profile: k8s-runner | |
| - name: Check formatting | |
| run: | | |
| bash .github/scripts/run-in-rust-container.sh \ | |
| 'rustup component add rustfmt && RUSTC_WRAPPER= cargo fmt --check' | |
| clippy: | |
| name: Clippy | |
| runs-on: hyperbytedb-operator-controller | |
| needs: [fmt, doc_links] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout chdb-rust | |
| run: bash .github/scripts/checkout-chdb-rust.sh | |
| - name: Install CI dependencies | |
| uses: ./.github/actions/install-ci-deps | |
| with: | |
| profile: k8s-runner | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Clippy | |
| run: | | |
| bash .github/scripts/run-in-rust-container.sh \ | |
| 'bash .github/scripts/rust-container-setup.sh && rustup component add clippy && sccache --zero-stats && cargo build --all-targets && cargo clippy --all-targets --no-deps -- -D warnings && sccache --show-stats' | |
| test: | |
| name: Test | |
| runs-on: hyperbytedb-operator-controller | |
| # Run after Clippy so node-local sccache and rust-cache are warm. When Test | |
| # started in parallel with Clippy it always saw 0% sccache hits because | |
| # Clippy had not finished writing the cache yet (and rust-cache had not saved). | |
| needs: [clippy] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout chdb-rust | |
| run: bash .github/scripts/checkout-chdb-rust.sh | |
| - name: Install CI dependencies | |
| uses: ./.github/actions/install-ci-deps | |
| with: | |
| profile: k8s-runner | |
| - uses: Swatinem/rust-cache@v2 | |
| # Single container session: one rust-container-setup, shared target/ and | |
| # sccache across all test suites (avoids three cold docker runs). | |
| - name: Run tests | |
| run: | | |
| bash .github/scripts/run-in-rust-container.sh \ | |
| 'bash .github/scripts/rust-container-setup.sh && \ | |
| sccache --zero-stats && \ | |
| cargo test --lib && \ | |
| cargo test --test '"'"'*'"'"' && \ | |
| cargo test -p hyperbytedb-cli && \ | |
| sccache --show-stats' | |