Added structs for config data
ci/woodpecker/push/workflow Pipeline was successful
Details
ci/woodpecker/push/workflow Pipeline was successful
Details
parent
76b9f72d41
commit
9f509a929f
|
@ -1 +1,32 @@
|
||||||
|
use std::{path::PathBuf, collections::HashMap};
|
||||||
|
|
||||||
use serde_yaml;
|
use serde_yaml;
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
|
struct Config {
|
||||||
|
executable_paths: HashMap<String, PathBuf>,
|
||||||
|
|
||||||
|
input_path: PathBuf,
|
||||||
|
output_path: PathBuf,
|
||||||
|
|
||||||
|
toolchains: Vec<Toolchain>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
|
struct Toolchain {
|
||||||
|
name: String,
|
||||||
|
steps: Vec<Step>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
|
struct Step {
|
||||||
|
name: String,
|
||||||
|
|
||||||
|
executable_path: Option<PathBuf>, // if None then we use the current executable path
|
||||||
|
arguments: Vec<String>, // special string $INPUT corresponds to previous step output
|
||||||
|
output: String, // the output file name
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn parse_config(path: PathBuf) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue