ci: add IDL freshness check and consolidate artifacts

Move IDL files to artifacts/ and add a convention-based CI check that
discovers all programs via */methods/guest/src/bin/*.rs and fails if
any program is missing its IDL or has one that is out of date.
This commit is contained in:
r4bbit
2026-04-14 11:13:42 +02:00
parent 9824cd8f90
commit 19dfb494f6
10 changed files with 163 additions and 17 deletions
+14
View File
@@ -0,0 +1,14 @@
[package]
name = "idl-gen"
version = "0.1.0"
edition = "2021"
[[bin]]
name = "idl-gen"
path = "src/main.rs"
[dependencies]
spel-framework-core = { git = "https://github.com/logos-co/spel.git", rev = "57201f64b4542bb3f592bc9a0aa654c47aa908a6", features = [
"idl-gen",
] }
serde_json = "1.0"
+19
View File
@@ -0,0 +1,19 @@
use std::{path::PathBuf, process};
fn main() {
let path: PathBuf = match std::env::args().nth(1) {
Some(p) => PathBuf::from(p),
None => {
eprintln!("Usage: idl-gen <source-file>");
process::exit(1);
}
};
match spel_framework_core::idl_gen::generate_idl_from_file(&path) {
Ok(idl) => println!("{}", serde_json::to_string_pretty(&idl).unwrap()),
Err(e) => {
eprintln!("Error: {e}");
process::exit(1);
}
}
}