Skip to content

6.2 CI Workflows and Packaging Validation

Raul Cardenas Montoya edited this page Sep 19, 2026 · 1 revision

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.


1. The ci.yml Workflow and Execution Matrix

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;
Loading

Sources: .github/workflows/ci.yml:1-166


2. MSRV Consistency Enforcement

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:

  1. Cargo.toml (rust-version field) .github/workflows/ci.yml:41
  2. rust-toolchain.toml (channel field) .github/workflows/ci.yml:42
  3. Workflow files (.github/workflows/ci.yml, .github/workflows/coverage.yml) .github/workflows/ci.yml:48-59
  4. 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;
Loading

Sources: .github/workflows/ci.yml:35-80


3. Packaging Validation and Crates.io Dry-Run

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


4. Code Coverage Analysis (coverage.yml)

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;
Loading

Sources: .github/workflows/coverage.yml:1-67


5. Release Automation and Issue Sync (linear-release.yml)

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.

Sources: .github/workflows/linear-release.yml:1-95

Clone this wiki locally