Skip to content

fix(deps): bump atomr workspace pin to 0.8.0 #39

fix(deps): bump atomr workspace pin to 0.8.0

fix(deps): bump atomr workspace pin to 0.8.0 #39

Workflow file for this run

# PR + push gate. Fmt → clippy → test → doc → Python bindings build.
#
# atomr-accel has a path dependency on a sibling atomr workspace; CI
# checks out both repos side-by-side before building.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
jobs:
# ─── Rust gate ────────────────────────────────────────────────────────
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { path: atomr-accel }
- uses: dtolnay/rust-toolchain@stable
with: { components: rustfmt }
# Invoke rustfmt directly on tracked .rs files instead of `cargo fmt
# --all`. The latter walks path-dep workspaces (sibling atomr) and
# would format their sources too — coupling our CI to a repo we
# don't own. All workspace members inherit edition 2021.
- run: git ls-files -z '*.rs' | xargs -0 rustfmt --check --edition 2021
working-directory: atomr-accel
clippy:
runs-on: ubuntu-latest
needs: fmt
steps:
- name: Checkout sibling atomr
uses: actions/checkout@v4
with:
repository: rustakka/atomr
path: atomr
- name: Checkout atomr-accel
uses: actions/checkout@v4
with:
path: atomr-accel
- uses: dtolnay/rust-toolchain@stable
with: { components: clippy }
- uses: Swatinem/rust-cache@v2
with: { workspaces: atomr-accel }
- run: cargo clippy --workspace --all-targets --no-default-features -- -D warnings
working-directory: atomr-accel
- run: cargo clippy --workspace --all-targets --features atomr-accel-cuda/core-libs -- -D warnings
working-directory: atomr-accel
test:
runs-on: ubuntu-latest
needs: fmt
strategy:
fail-fast: false
matrix:
features:
- "--no-default-features"
- "--features atomr-accel-cuda/core-libs"
- "--features atomr-accel-cuda/training-libs"
- "--features atomr-accel-cuda/full-cuda"
- "--features atomr-accel-cuda/replay"
- "--features atomr-accel-cuda/cluster"
- "--features atomr-accel-cuda/streams"
- "--features atomr-accel-cuda/telemetry"
steps:
- name: Checkout sibling atomr
uses: actions/checkout@v4
with:
repository: rustakka/atomr
path: atomr
- name: Checkout atomr-accel
uses: actions/checkout@v4
with:
path: atomr-accel
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with: { workspaces: atomr-accel }
- name: cargo check ${{ matrix.features }}
run: cargo check --workspace ${{ matrix.features }}
working-directory: atomr-accel
- name: cargo test ${{ matrix.features }}
run: cargo test --workspace ${{ matrix.features }}
working-directory: atomr-accel
docs:
runs-on: ubuntu-latest
needs: fmt
# rustdoc warnings are uploaded as build logs but do not gate
# the merge — the workspace has pre-existing broken-intra-doc-
# link sites that are tracked separately. Promote to `-D
# warnings` once those sites are cleaned up.
steps:
- name: Checkout sibling atomr
uses: actions/checkout@v4
with:
repository: rustakka/atomr
path: atomr
- name: Checkout atomr-accel
uses: actions/checkout@v4
with:
path: atomr-accel
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with: { workspaces: atomr-accel }
- name: cargo doc --workspace --no-deps --all-features
run: cargo doc --workspace --no-deps --features atomr-accel-cuda/full-cuda,atomr-accel-cuda/replay,atomr-accel-cuda/cluster,atomr-accel-cuda/streams,atomr-accel-cuda/telemetry
working-directory: atomr-accel
- uses: actions/upload-artifact@v4
with:
name: rustdoc
path: atomr-accel/target/doc
# ─── SemVer gate (PR only) ──────────────────────────────────────────
semver-checks:
name: semver-checks
runs-on: ubuntu-latest
needs: fmt
if: github.event_name == 'pull_request'
# Warn-only on 0.x pre-1.0 commits (per Cargo SemVer for 0.x);
# promote to a hard fail by removing `continue-on-error` once any
# crate hits 1.0.
continue-on-error: true
steps:
- name: Checkout sibling atomr
uses: actions/checkout@v4
with:
repository: rustakka/atomr
path: atomr
- name: Checkout atomr-accel
uses: actions/checkout@v4
with:
path: atomr-accel
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with: { workspaces: atomr-accel }
- name: Install cargo-semver-checks
run: cargo install cargo-semver-checks --locked
- name: Check public-API SemVer for every published crate
working-directory: atomr-accel
run: |
set -e
fails=0
for crate in atomr-accel atomr-accel-patterns atomr-accel-train \
atomr-accel-agents atomr-accel-cuda-realtime; do
echo "==> $crate"
cargo semver-checks check-release --package "$crate" || fails=$((fails+1))
done
if [ "$fails" -gt 0 ]; then
echo "$fails crate(s) failed semver-checks"
exit 1
fi
# ─── Aggregate verify gate (mirrors xtask verify) ───────────────────
verify:
name: verify (release-pipeline gate)
runs-on: ubuntu-latest
needs: [fmt, clippy, test]
steps:
- name: Checkout sibling atomr
uses: actions/checkout@v4
with:
repository: rustakka/atomr
path: atomr
- name: Checkout atomr-accel
uses: actions/checkout@v4
with:
path: atomr-accel
- uses: dtolnay/rust-toolchain@stable
with: { components: clippy, rustfmt }
- uses: Swatinem/rust-cache@v2
with: { workspaces: atomr-accel }
- name: cargo xtask verify
run: cargo xtask verify
working-directory: atomr-accel
# ─── Python bridge gate ──────────────────────────────────────────────
python:
runs-on: ubuntu-latest
needs: fmt
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout sibling atomr
uses: actions/checkout@v4
with:
repository: rustakka/atomr
path: atomr
- name: Checkout atomr-accel
uses: actions/checkout@v4
with:
path: atomr-accel
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: Swatinem/rust-cache@v2
with: { workspaces: atomr-accel }
- name: Install build tools
run: pip install maturin pytest numpy
- name: Create venv (maturin develop requires VIRTUAL_ENV)
run: |
python -m venv .venv
.venv/bin/pip install --upgrade pip maturin pytest numpy
working-directory: atomr-accel/crates/atomr-accel-py
- name: maturin develop
run: |
source .venv/bin/activate
maturin develop --release --no-default-features --features extension-module
working-directory: atomr-accel/crates/atomr-accel-py
- name: pytest
run: |
source .venv/bin/activate
pytest tests/ -v
working-directory: atomr-accel/crates/atomr-accel-py
# ─── Aggregate gate (required for branch protection) ─────────────────
ci-pass:
runs-on: ubuntu-latest
needs: [fmt, clippy, test, docs, verify, python]
if: always()
steps:
- name: All required jobs passed
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
run: echo "ok"
- name: A required job failed
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1