Define a shared target model for CI and release commands
Current status — historical Python implementation superseded
This issue remains completed. PR #1071 subsequently replaced the project-owned Python execution/verification code with the native Rust wave-tools crate while retaining Cargo and Meson.
The shared target/case model now lives in tools/src/cases.rs and tools/src/config.rs. Toolchain pins and the existing case manifest remain data inputs.
The scope below records the earlier implementation and is retained for traceability. It is not current guidance to recreate tools.ci modules, x.py, or the removed Python test packages. Shared Python runtime support for Meson and the offline high-precision reference generator are deliberately retained.
Historical implementation scope and evidence
Motivation
Target identity, host prerequisites, backend features and toolchain pins are repeated across .github/workflows/rust.yml, .github/workflows/cases.yml, .github/workflows/release.yml and x.py. A single model is the foundation for locally executable CI procedures.
Scope
Introduce tools/ci/__init__.py, targets.py and common.py. A Target describes prerequisites, build, frontend_tests, backend_tests, runtime_tests, validation and artifacts. Keep host compiler triples, emitted Wave targets, executor requirements and distribution availability distinct.
The requested support set is Linux amd64/arm64/riscv64/loongarch64, macOS amd64/arm64, Windows MSVC amd64/arm64, FreeBSD amd64 and wasm64. Preserve existing wasm32 validation during migration; a code-generation target is not automatically a native compiler package. Reuse existing case-manifest selection without redesigning #459 or taking over #691. FreeBSD native distribution remains tracked by #791.
Normalize public target IDs and documented aliases, including linux-amd64 and the requested riscv64-linux spelling. Centralize process invocation, repository paths, bounded Cargo parallelism and shared failures without creating a second process-tree implementation. Difficulty: hard.
Completion criteria
- [ ] Every existing CI/release job maps to an explicit target and execution mode; unsupported combinations fail before build or network work.
- [ ] Toolchain versions/checksums and required features have a single authoritative representation consumed by later modules.
- [ ] Tests cover target aliases, host/target separation, capability validation and paths containing spaces; imports do not start builds or downloads.
- [ ] Case eligibility, existing architecture/ABI coverage and public compiler semantics remain unchanged.