Pub-ed the Config fields
parent
3693ff1668
commit
eaca213f26
|
@ -5,39 +5,39 @@ use serde_yaml::{self};
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
tested_executables: Vec<Team>,
|
pub tested_executables: Vec<Team>,
|
||||||
|
|
||||||
input_path: PathBuf,
|
pub input_path: PathBuf,
|
||||||
output_path: PathBuf,
|
pub output_path: PathBuf,
|
||||||
in_stream_path: PathBuf,
|
pub in_stream_path: PathBuf,
|
||||||
|
|
||||||
runtimes: Option<Vec<Team>>,
|
pub runtimes: Option<Vec<Team>>,
|
||||||
|
|
||||||
toolchains: Vec<Toolchain>,
|
pub toolchains: Vec<Toolchain>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct Team {
|
pub struct Team {
|
||||||
name: String,
|
pub name: String,
|
||||||
executable: PathBuf,
|
pub executable: PathBuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct Toolchain {
|
pub struct Toolchain {
|
||||||
name: String,
|
pub name: String,
|
||||||
steps: Vec<Step>,}
|
pub steps: Vec<Step>,}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct Step {
|
pub struct Step {
|
||||||
name: String,
|
pub name: String,
|
||||||
|
|
||||||
executable_path: Option<PathBuf>, // if None then we use the current executable path
|
pub executable_path: Option<PathBuf>, // if None then we use the current executable path
|
||||||
arguments: Vec<String>, // special string $INPUT corresponds to previous step output
|
pub arguments: Vec<String>, // special string $INPUT corresponds to previous step output
|
||||||
output: String, // the output file name
|
pub output: String, // the output file name
|
||||||
|
|
||||||
uses_runtime: Option<bool>,
|
pub uses_runtime: Option<bool>,
|
||||||
uses_in_stream: Option<bool>,
|
pub uses_in_stream: Option<bool>,
|
||||||
allow_error: Option<bool>
|
pub allow_error: Option<bool>
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_config(path: PathBuf) -> Config {
|
pub fn parse_config(path: PathBuf) -> Config {
|
||||||
|
|
Loading…
Reference in New Issue