Merge pull request #2341 from zeroclaw-labs/issue-2263-first-extraction
refactor(workspace): scaffold M4-5 PR-1 crate shells and CI lanes [RMN-248]
This commit is contained in:
commit
036d69daa2
56
.github/workflows/ci-run.yml
vendored
56
.github/workflows/ci-run.yml
vendored
@ -74,6 +74,52 @@ jobs:
|
||||
BASE_SHA: ${{ needs.changes.outputs.base_sha }}
|
||||
run: ./scripts/ci/rust_strict_delta_gate.sh
|
||||
|
||||
workspace-check:
|
||||
name: Workspace Check
|
||||
needs: [changes]
|
||||
if: needs.changes.outputs.rust_changed == 'true'
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- name: Self-heal Rust toolchain cache
|
||||
shell: bash
|
||||
run: ./scripts/ci/self_heal_rust_toolchain.sh 1.92.0
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v3
|
||||
with:
|
||||
prefix-key: ci-run-workspace-check
|
||||
cache-bin: false
|
||||
- name: Check workspace
|
||||
run: cargo check --workspace --locked
|
||||
|
||||
package-check:
|
||||
name: Package Check (${{ matrix.package }})
|
||||
needs: [changes]
|
||||
if: needs.changes.outputs.rust_changed == 'true'
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 25
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: [zeroclaw-types, zeroclaw-core]
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- name: Self-heal Rust toolchain cache
|
||||
shell: bash
|
||||
run: ./scripts/ci/self_heal_rust_toolchain.sh 1.92.0
|
||||
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
||||
with:
|
||||
toolchain: 1.92.0
|
||||
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v3
|
||||
with:
|
||||
prefix-key: ci-run-package-check
|
||||
cache-bin: false
|
||||
- name: Check package
|
||||
run: cargo check -p ${{ matrix.package }} --locked
|
||||
|
||||
test:
|
||||
name: Test
|
||||
needs: [changes]
|
||||
@ -297,7 +343,7 @@ jobs:
|
||||
ci-required:
|
||||
name: CI Required Gate
|
||||
if: always()
|
||||
needs: [changes, lint, test, build, docs-only, non-rust, docs-quality, lint-feedback, license-file-owner-guard]
|
||||
needs: [changes, lint, workspace-check, package-check, test, build, docs-only, non-rust, docs-quality, lint-feedback, license-file-owner-guard]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Enforce required status
|
||||
@ -345,10 +391,14 @@ jobs:
|
||||
|
||||
# --- Rust change path ---
|
||||
lint_result="${{ needs.lint.result }}"
|
||||
workspace_check_result="${{ needs.workspace-check.result }}"
|
||||
package_check_result="${{ needs.package-check.result }}"
|
||||
test_result="${{ needs.test.result }}"
|
||||
build_result="${{ needs.build.result }}"
|
||||
|
||||
echo "lint=${lint_result}"
|
||||
echo "workspace-check=${workspace_check_result}"
|
||||
echo "package-check=${package_check_result}"
|
||||
echo "test=${test_result}"
|
||||
echo "build=${build_result}"
|
||||
echo "docs=${docs_result}"
|
||||
@ -356,8 +406,8 @@ jobs:
|
||||
|
||||
check_pr_governance
|
||||
|
||||
if [ "$lint_result" != "success" ] || [ "$test_result" != "success" ] || [ "$build_result" != "success" ]; then
|
||||
echo "Required CI jobs did not pass: lint=${lint_result} test=${test_result} build=${build_result}"
|
||||
if [ "$lint_result" != "success" ] || [ "$workspace_check_result" != "success" ] || [ "$package_check_result" != "success" ] || [ "$test_result" != "success" ] || [ "$build_result" != "success" ]; then
|
||||
echo "Required CI jobs did not pass: lint=${lint_result} workspace-check=${workspace_check_result} package-check=${package_check_result} test=${test_result} build=${build_result}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
11
Cargo.lock
generated
11
Cargo.lock
generated
@ -9150,6 +9150,13 @@ dependencies = [
|
||||
"zip",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zeroclaw-core"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"zeroclaw-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zeroclaw-robot-kit"
|
||||
version = "0.1.0"
|
||||
@ -9171,6 +9178,10 @@ dependencies = [
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zeroclaw-types"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.8.40"
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
[workspace]
|
||||
members = [".", "crates/robot-kit"]
|
||||
members = [
|
||||
".",
|
||||
"crates/robot-kit",
|
||||
"crates/zeroclaw-types",
|
||||
"crates/zeroclaw-core",
|
||||
]
|
||||
resolver = "2"
|
||||
|
||||
[package]
|
||||
|
||||
12
crates/zeroclaw-core/Cargo.toml
Normal file
12
crates/zeroclaw-core/Cargo.toml
Normal file
@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "zeroclaw-core"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Core contracts and boundaries for staged multi-crate extraction."
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
zeroclaw-types = { path = "../zeroclaw-types" }
|
||||
8
crates/zeroclaw-core/src/lib.rs
Normal file
8
crates/zeroclaw-core/src/lib.rs
Normal file
@ -0,0 +1,8 @@
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
//! Core contracts for the staged workspace split.
|
||||
//!
|
||||
//! This crate is intentionally minimal in PR-1 (scaffolding only).
|
||||
|
||||
/// Marker constant proving dependency linkage to `zeroclaw-types`.
|
||||
pub const CORE_CRATE_ID: &str = zeroclaw_types::CRATE_ID;
|
||||
9
crates/zeroclaw-types/Cargo.toml
Normal file
9
crates/zeroclaw-types/Cargo.toml
Normal file
@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "zeroclaw-types"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Foundational shared types for staged multi-crate extraction."
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
8
crates/zeroclaw-types/src/lib.rs
Normal file
8
crates/zeroclaw-types/src/lib.rs
Normal file
@ -0,0 +1,8 @@
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
//! Shared foundational types for the staged workspace split.
|
||||
//!
|
||||
//! This crate is intentionally minimal in PR-1 (scaffolding only).
|
||||
|
||||
/// Marker constant proving the crate is linked in workspace checks.
|
||||
pub const CRATE_ID: &str = "zeroclaw-types";
|
||||
Loading…
Reference in New Issue
Block a user