Skip to content

feat: Phase 18 - Agent Tagging Infrastructure #15

feat: Phase 18 - Agent Tagging Infrastructure

feat: Phase 18 - Agent Tagging Infrastructure #15

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
fmt:
name: Format Check
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libclang-dev
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache cargo registry
uses: Swatinem/rust-cache@v2
with:
shared-key: "clippy"
- name: Run clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libclang-dev
- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install protobuf llvm
echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> $GITHUB_ENV
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: Swatinem/rust-cache@v2
with:
shared-key: "test-${{ matrix.os }}"
- name: Run tests
run: cargo test --workspace --all-features
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libclang-dev
- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install protobuf llvm
echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> $GITHUB_ENV
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: Swatinem/rust-cache@v2
with:
shared-key: "build-${{ matrix.os }}"
- name: Build release
run: cargo build --release --workspace
doc:
name: Documentation
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libclang-dev
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: Swatinem/rust-cache@v2
with:
shared-key: "doc"
- name: Build documentation
env:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --no-deps --workspace --all-features
# Summary job that depends on all other jobs
ci-success:
name: CI Success
needs: [fmt, clippy, test, build, doc]
runs-on: ubuntu-24.04
if: always()
steps:
- name: Check all jobs passed
run: |
if [[ "${{ needs.fmt.result }}" != "success" ]] || \
[[ "${{ needs.clippy.result }}" != "success" ]] || \
[[ "${{ needs.test.result }}" != "success" ]] || \
[[ "${{ needs.build.result }}" != "success" ]] || \
[[ "${{ needs.doc.result }}" != "success" ]]; then
echo "One or more jobs failed"
exit 1
fi
echo "All CI jobs passed!"