Skip to content

Chore/ci add caching#8

Merged
Lythaeon merged 3 commits intomainfrom
chore/ci-add-caching
Feb 26, 2026
Merged

Chore/ci add caching#8
Lythaeon merged 3 commits intomainfrom
chore/ci-add-caching

Conversation

@Lythaeon
Copy link
Owner

chore(ci): optimize caching, enable incremental builds, and fix release workflow

Description

This PR introduces a suite of CI/CD optimizations designed to reduce path latency, improve build reliability, and fix the multi-crate release process. It enables cross-job cache sharing, incremental compilation support, and refactors the release workflow to handle independent crate versioning.

Changes

1. CI Caching & Performance

  • .github/actions/rust-ci-setup/action.yml: Added shared-key: "sof-shared-cache" to rust-cache. This allows PRs and branches to benefit from the main branch cache, significantly reducing initial compilation times.
  • Makefile.toml: Removed the clean dependency from tasks.build and tasks.build-prod. This prevents cargo from wiping the target directory on every run, enabling incremental compilation across the workspace.

2. Release Workflow Fixes (release-crates.yml)

  • Independent Publication: Refactored the release loop to check each crate's version against the git tag independently. This allows for releasing only one crate (e.g., just sof or just sof-tx) if their versions haven't both been bumped.
  • SDK Release Fix: Explicitly added sof-tx to the release pipeline. Previously, only the core sof crate was being published.
  • Dependency Awareness: Implemented a synchronization delay when publishing sof to ensure it is indexed by crates.io before the sof-tx (SDK) attempt begins.
  • Safety Gates: Restored critical safety checks that ensure the tagged commit exists on the main branch and passes the full cargo make ci quality gate before any publication occurs.

Motivation

The current CI infrastructure suffers from high latency due to "clean room" builds on every run. Additionally, the release process was incomplete, failing to publish the SDK and requiring manual intervention for mismatched crate versions. These changes automate the release scaling and optimize the developer feedback loop.

Scope and impact

  • Affected slices: CI/CD Infrastructure and Release Management.
  • Compatibility: No functional code changes.
  • Operational impact: Faster PR turnarounds and automated workspace-wide releases.

Testing

  • Verified Makefile.toml incremental behavior locally.
  • Validated release workflow logic for multi-crate scenarios.
  • Verified GitHub Actions YAML syntax.

Related docs/issues

  • Fixes: Multi-crate release synchronization and CI build latency.

@Lythaeon Lythaeon merged commit 805ebcf into main Feb 26, 2026
2 checks passed
@Lythaeon Lythaeon deleted the chore/ci-add-caching branch February 26, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant