-
Notifications
You must be signed in to change notification settings - Fork 2
6.2 CI Workflows and Packaging Validation
Relevant source files
The following files were used as context for generating this wiki page:
This page details the Continuous Integration (CI) and release automation infrastructure for synaptic-wiring. The repository relies on GitHub Actions workflows to enforce strict quality gates, cross-platform build matrix verification, Single Source of Truth (SSOT) Minimum Supported Rust Version (MSRV) consistency, crates.io packaging dry-runs, coverage analysis, and Linear issue release synchronization .github/workflows/ci.yml:1-166, .github/workflows/coverage.yml:1-67, .github/workflows/linear-release.yml:1-95.
The primary validation engine is defined in .github/workflows/ci.yml, which triggers on pushes and pull requests to the main branch .github/workflows/ci.yml:1-8. It divides verification into two primary jobs: validate and package .github/workflows/ci.yml:12-130.
The validate job runs across a matrix of three operating systems (ubuntu-latest, macos-latest, windows-latest) to ensure platform-agnostic compilation and test correctness .github/workflows/ci.yml:14-19.
graph TD
Trigger["Push / PR to main"] --> ValidateJob["Job: validate (Matrix: ubuntu, macos, windows)"]
Trigger --> PackageJob["Job: package (ubuntu-latest)"]
subgraph ValidateJob ["Validate Job Steps (.github/workflows/ci.yml)"]
V1["actions/checkout@v4"] --> V2["Install Rust 1.98.1 (dtolnay/rust-toolchain)"]
V2 --> V3["Verify MSRV Pins Agree (Bash Script)"]
V3 --> V4["Cache Cargo Registry & Target"]
V4 --> V5["Check Formatting (Linux only: cargo fmt)"]
V5 --> V6["Clippy Lints (--all-targets --all-features)"]
V6 --> V7["Build Dev Profile"]
V7 --> V8["Generate Documentation (cargo doc)"]
V8 --> V9["Build Release Profile"]
V9 --> V10["Test Test Profile"]
V10 --> V11["Test Release Profile (cargo test --release)"]
V11 --> V12["Bench Compile Check (cargo bench --no-run)"]
end
subgraph PackageJob ["Package Job Steps (.github/workflows/ci.yml)"]
P1["actions/checkout@v4"] --> P2["Install Rust 1.98.1"]
P2 --> P3["Cache Cargo Registry"]
P3 --> P4["Review Packaged File List (cargo package --list)"]
end
ValidateJob -.-> PackageJob
classDef default stroke:#000,fill:#fff,stroke-width:1px;
classDef workflow stroke:#000,fill:#eee,stroke-width:1px;
class Trigger,ValidateJob,PackageJob workflow;
Sources: .github/workflows/ci.yml:1-166
To prevent version drift between compiler pins, Cargo manifests, readmes, and workflow files, the validate job executes a strict MSRV consistency check via a Bash script .github/workflows/ci.yml:35-80. The repository pins its MSRV to Rust 1.98.1 .github/workflows/ci.yml:29-32.
The verification script extracts and compares version declarations across four distinct artifacts:
-
Cargo.toml(rust-versionfield) .github/workflows/ci.yml:41 -
rust-toolchain.toml(channelfield) .github/workflows/ci.yml:42 - Workflow files (
.github/workflows/ci.yml,.github/workflows/coverage.yml) .github/workflows/ci.yml:48-59 -
README.md(MSRV documentation string) .github/workflows/ci.yml:60-66
graph TD
Start["Begin MSRV Verification"] --> ReadCargo["Parse rust-version from Cargo.toml"]
Start --> ReadToolchain["Parse channel from rust-toolchain.toml"]
Start --> ReadReadme["Parse MSRV version string from README.md"]
Start --> ReadWorkflows["Extract toolchain/rust-version pins from ci.yml & coverage.yml"]
ReadCargo --> Compare["Compare All Extracted Strings to $cargo_rv"]
ReadToolchain --> Compare
ReadReadme --> Compare
ReadWorkflows --> Compare
Compare --> Match{All match 1.98.1?}
Match -- Yes --> Success["Exit 0: MSRV Consistent"]
Match -- No --> Fail["Exit 1: ERROR - MSRV pins disagree"]
classDef default stroke:#000,fill:#fff,stroke-width:1px;
class Start,Success,Fail workflow;
Sources: .github/workflows/ci.yml:35-80
The package job validates that the crate builds cleanly for publication on crates.io without including unintended build artifacts, local configurations, or sensitive files .github/workflows/ci.yml:128-166.
It invokes cargo package --locked --list to print the exact manifest inclusion set .. Any untracked file or missing exclude pattern in Cargo.toml fails the check to guarantee deterministic tarball generation.
Sources: .github/workflows/ci.yml:128-166
The observability split moves code coverage tracking to a dedicated workflow in .github/workflows/coverage.yml .github/workflows/coverage.yml:1-67. It operates independently of the main CI run to isolate telemetry uploads.
graph TD
CovTrigger["Push / PR to main"] --> CovJob["Job: codecov (ubuntu-latest)"]
subgraph CoverageExecution ["Coverage Execution Pipeline"]
C1["actions/checkout@v7"] --> C2["Install Rust 1.98.1 with llvm-tools-preview"]
C2 --> C3["Swatinem/rust-cache"]
C3 --> C4["Install cargo-llvm-cov & nextest@0.9.70"]
C4 --> C5["cargo llvm-cov nextest --locked --all-features --profile ci --lcov"]
C5 --> C6["Upload JUnit Test Results to Codecov"]
C6 --> C7["Upload lcov.info to Codecov Action"]
end
classDef default stroke:#000,fill:#fff,stroke-width:1px;
class CovTrigger,CovJob CoverageExecution;
Sources: .github/workflows/coverage.yml:1-67
The .github/workflows/linear-release.yml file automates synchronization between Git commit history and Linear Releases ,.github/workflows/linear-release.yml:1-15. It leverages the linear/linear-release-action action to link commits carrying Linear issue identifiers (e.g., LIM-xxxx) .github/workflows/linear-release.yny:10.
-
Triggers: Executes on pushes to
main, version tags (v*), or via manualworkflow_dispatch.github/workflows/linear-release.yml:18-33. -
Version Resolution: Parses tag references (
vMAJOR.MINOR.PATCH), workflow dispatch inputs, or defaults to the in-progress version (0.3.0) .github/workflows/linear-release.yml:52-75. -
Execution Commands: Runs
syncto aggregate issues andcompletewhen tagged releases are finalized .github/workflows/linear-release.yml:79-95.
- 1. Overview
- 1.1. Getting Started & Public API
- 1.2. Release History and Versioning
- 2. Core Runtime: SynapticMesh
- 2.1. Propagation APIs and Tick Semantics
- 2.2. Spike Delay Buffer (Ring Buffer)
- 2.3. Core Types and Error Model
- 2.4. Checkpointing and Serde State Restoration
- 3. Topology Subsystem
- 3.1. SynapticGraph and CSR Representation
- 3.2. Topology Generators
- 3.3. Wiring Rules, Dale's Law and Delay Assignment
- 3.4. Topology Digest
- 4. Sparse Maps and Channel Routing
- 4.1. ChannelRouter and RouterConfig
- 4.2. Neuromodulation and Plasticity
- 4.3. SparseSynapticMap (CSR)
- 5. Testing, Benchmarks and Quality Gates
- 5.1. Propagation Contract Tests
- 5.2. Checkpoint Resume Property Suite
- 5.3. Benchmarks and Unit Test Module
- 6. Build, CI and Project Tooling
- 6.1. Cargo Manifest, Profiles and Dependencies
- 6.2. CI Workflows and Packaging Validation
- 6.3. Code Quality, Licensing and Review Gates
- 7. Glossary