Made changes to the config data struct
ci/woodpecker/push/workflow Pipeline failed Details

pull/5/head
Ayrton Chilibeck 2024-01-15 00:40:48 -07:00
parent b4cab67e28
commit 2d7e711930
Signed by: ayrton
GPG Key ID: BAE24A03DCBF160D
1 changed files with 17 additions and 17 deletions

View File

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