Prune unused OpsClaw surfaces #25
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: [master] | |
| pull_request: | |
| branches: [master] | |
| concurrency: | |
| group: ci-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_NEXTEST_VERSION: 0.9.104 | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Ensure web/dist placeholder exists | |
| run: mkdir -p web/dist && touch web/dist/.gitkeep | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo clippy --workspace --exclude zeroclaw-desktop --all-targets -- -W clippy::all -D clippy::correctness | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| needs: [lint] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Ensure web/dist placeholder exists | |
| run: mkdir -p web/dist && touch web/dist/.gitkeep | |
| - name: Install mold linker | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y mold | |
| - name: Install cargo-nextest | |
| run: curl -LsSf "https://get.nexte.st/${CARGO_NEXTEST_VERSION}/linux" | tar zxf - -C "${CARGO_HOME:-$HOME/.cargo}/bin" | |
| - name: Run tests | |
| run: cargo nextest run --workspace --exclude zeroclaw-desktop --locked | |
| env: | |
| CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang | |
| CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-C link-arg=-fuse-ld=mold" | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| needs: [lint] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install mold linker | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y mold | |
| - name: Ensure web/dist placeholder exists | |
| run: mkdir -p web/dist && touch web/dist/.gitkeep | |
| - name: Build release | |
| run: cargo build --workspace --exclude zeroclaw-desktop --release --locked | |
| env: | |
| CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang | |
| CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-C link-arg=-fuse-ld=mold" | |
| gate: | |
| name: CI Gate | |
| if: always() | |
| needs: [lint, test, build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check results | |
| run: | | |
| if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then | |
| echo "::error::One or more jobs failed or were cancelled" | |
| exit 1 | |
| fi |