Skip to content

ci: add clippy and cargo test gates to ci.yml via self-hosted macOS runner #5

Description

@inureyes

Follow-up to #1 (OSS release rollout) and #3 (security automation + community health).

PR #3 added .github/workflows/ci.yml with a cargo deny check gate running on ubuntu-latest (github-hosted). clippy and cargo test were intentionally left out because the mlxcel build pulls in MLX C++ through cxx::bridge and the build script needs a working MLX compile environment — practically that means the existing self-hosted macOS Apple Silicon runner (self-hosted-macos-26-arm64).

Without this gate, external PRs (or our own) can break the clippy lint policy or fail tests and only get caught at release.yml time, which is too late.

Tasks

  • Add a clippy-and-test job to .github/workflows/ci.yml that runs on self-hosted-macos-26-arm64
  • Same path-filter and if: needs.changes.outputs.rust == 'true' gate as the existing deny job
  • Apply the security pattern already used in release.yml and pipeline-parallel-ci.yml:
    • if: github.repository == 'lablup/mlxcel' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) (block fork-PR access to the self-hosted runner pool)
    • permissions: contents: read at job level
    • persist-credentials: false on every actions/checkout@v6
  • Steps:
    • cargo build --release --features metal,accelerate (verify the MLX FFI build still works)
    • cargo clippy --all-targets --features metal,accelerate -- -D warnings
    • cargo test --release --features metal,accelerate (or the same scope as release.yml)
  • Decide whether to also gate on cuda feature via a Linux self-hosted runner (likely a separate job) or keep that exclusive to release.yml. Recommendation: skip on PR side, keep release.yml as the cuda gate. Document the decision in the PR body.
  • Once the gate is in place, update CONTRIBUTING.md so the local quality-gate list matches what CI enforces

Out of scope

  • cargo fmt --check gate — tracked separately (see the fmt-cleanup follow-up issue)
  • pipeline-parallel-ci.yml distributed runs — those stay label-gated, not PR-default

Refs

Activity

  1. added
    type:choreMaintenance tasks (build, CI, etc.)
    area:coremlxcel-core: MLX FFI, primitives, KV cache, layers
    on May 18, 2026
  2. added this to the 0.1 milestone on Jun 5, 2026
  3. self-assigned this
    on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:coremlxcel-core: MLX FFI, primitives, KV cache, layerspriority:mediumMedium prioritystatus:doneCompletedtype:choreMaintenance tasks (build, CI, etc.)

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions