Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 11 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# PR / push CI for lightweight quality gates. Builds and tests are covered by
# release.yml (signed artifacts) and pipeline-parallel-ci.yml (distributed
# runs); this workflow runs cargo-deny (license / advisory), cargo-fmt, and
# cargo-clippy + cargo-test checks on every touched-Rust change so formatting
# drift, license issues, and lint/test regressions are caught at PR time.
# PR / push CI for lightweight quality gates. Runs cargo-deny (license /
# advisory) and cargo-fmt on every touched-Rust change so formatting drift and
# license issues are caught at PR time.
#
# Clippy and cargo-test used to run here as `clippy + test (macOS ARM64)` on
# the self-hosted Apple Silicon runner, but each run consumed ~15 minutes of
# that single shared runner per PR push. Those gates were moved to the release
# workflow (`release.yml::build-macos`), which now runs fmt/clippy/test before
# producing signed artifacts. Local developers should run `make verify` (or
# `make verify-clean` for a cache-clear pass) before pushing to catch
# regressions that release-time CI will otherwise surface.
#
# Note on CUDA gating: CUDA verification stays exclusive to release.yml because
# it requires a Linux self-hosted runner (currently only the GB10 node used for
Expand Down Expand Up @@ -76,29 +82,3 @@ jobs:
components: rustfmt
- run: cargo fmt --all -- --check

clippy-and-test:
name: clippy + test (macOS ARM64)
needs: changes
# Only run when Rust files changed; block fork-PR access to the self-hosted
# runner pool (mirrors the guard in release.yml and pipeline-parallel-ci.yml).
if: >-
needs.changes.outputs.rust == 'true' &&
github.repository == 'lablup/mlxcel' &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)
runs-on: self-hosted-macos-26-arm64
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Build (verify MLX FFI compiles)
run: cargo build --release --features metal,accelerate
- name: Clippy
run: cargo clippy --all-targets --features metal,accelerate -- -D warnings
- name: Test
run: cargo test --release --features metal,accelerate
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,21 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
components: clippy, rustfmt

# Quality gate — fmt / clippy / test. Used to live in ci.yml's
# `clippy + test (macOS ARM64)` job, but consumed ~15 min of the shared
# self-hosted runner on every PR push for limited PR-time signal. Moved
# here so the cost is paid once per release. Local devs should run
# `make verify` before pushing to catch regressions earlier.
- name: Format check
run: cargo fmt --all -- --check

- name: Clippy
run: cargo clippy --all-targets --features metal,accelerate -- -D warnings

- name: Test
run: cargo test --release --features metal,accelerate

- name: Build release binaries
run: cargo build --release --target aarch64-apple-darwin --locked
Expand Down