Skip to content

Revise README for clarity and updated project details #220

Revise README for clarity and updated project details

Revise README for clarity and updated project details #220

Workflow file for this run

name: CI
on:
push:
branches:
- main
- "feat/**"
pull_request:
jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- name: cargo fmt
run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
- uses: dtolnay/[email protected]
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- name: cargo clippy
run: cargo clippy --all-targets -- -D warnings -D missing_docs
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- name: cargo test (workspace)
run: cargo test --workspace
- name: PRNG golden regression (rmg-core)
run: cargo test -p rmg-core --features golden_prng -- tests::next_int_golden_regression
test-musl:
name: Tests (musl)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
- uses: dtolnay/[email protected]
with:
targets: x86_64-unknown-linux-musl
- name: Install musl tools
run: sudo apt-get update && sudo apt-get install -y musl-tools
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
# Intentionally test only rmg-core under MUSL; rmg-wasm targets wasm32
# (wasm-bindgen/js-sys) and rmg-ffi has separate cross-compilation concerns.
- name: cargo test (rmg-core, musl)
run: cargo test -p rmg-core --target x86_64-unknown-linux-musl
docs:
name: Docs Guard
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ensure execution plan and decision log were updated
run: |
set -euo pipefail
base_ref="${{ github.event.pull_request.base.ref }}"
git fetch origin "$base_ref" --depth=1
changed=$(git diff --name-only "origin/${base_ref}"..."${{ github.sha }}")
if [ -z "$changed" ]; then
exit 0
fi
non_doc=$(echo "$changed" | grep -vE '(^docs/)|(\.md$)' || true)
if [ -z "$non_doc" ]; then
exit 0
fi
echo "Non-doc files changed:"
echo "$non_doc"
echo "$changed" | grep -Fx 'docs/execution-plan.md' >/dev/null || {
echo 'docs/execution-plan.md must be updated when non-doc files change.';
exit 1;
}
echo "$changed" | grep -Fx 'docs/decision-log.md' >/dev/null || {
echo 'docs/decision-log.md must be updated when non-doc files change.';
exit 1;
}
# MSRV job removed per policy: use @stable everywhere
rustdoc:
name: Rustdoc (warnings gate)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
- name: rustdoc warnings gate (rmg-core)
run: RUSTDOCFLAGS="-D warnings" cargo doc -p rmg-core --no-deps
- name: rustdoc warnings gate (rmg-geom)
run: RUSTDOCFLAGS="-D warnings" cargo doc -p rmg-geom --no-deps
- name: rustdoc warnings gate (rmg-ffi)
run: |
if [ -f crates/rmg-ffi/Cargo.toml ]; then RUSTDOCFLAGS="-D warnings" cargo doc -p rmg-ffi --no-deps; fi
- name: rustdoc warnings gate (rmg-wasm)
run: |
if [ -f crates/rmg-wasm/Cargo.toml ]; then RUSTDOCFLAGS="-D warnings" cargo doc -p rmg-wasm --no-deps; fi
audit:
name: Security Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- name: Install cargo-audit (latest)
run: cargo install cargo-audit --locked
- name: Run cargo audit
env:
CARGO_TERM_COLOR: always
run: cargo audit --deny warnings
deny:
name: Dependency Policy (cargo-deny)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run cargo-deny
uses: EmbarkStudios/cargo-deny-action@v1