Made Config struct public
ci/woodpecker/push/workflow Pipeline was successful Details
ci/woodpecker/pr/workflow Pipeline was successful Details

pull/5/head
Ayrton Chilibeck 2024-01-15 00:42:31 -07:00
parent 2d7e711930
commit ea823a2ea2
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)]
pub struct Config {
tested_executables: Vec<Team>,
pub tested_executables: Vec<Team>,
input_path: PathBuf,
output_path: PathBuf,
in_stream_path: PathBuf,
pub input_path: PathBuf,
pub output_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)]
pub struct Team {
name: String,
executable: PathBuf,
pub name: String,
pub executable: PathBuf,
}
#[derive(Debug, Deserialize)]
pub struct Toolchain {
name: String,
steps: Vec<Step>,}
pub name: String,
pub steps: Vec<Step>,}
#[derive(Debug, Deserialize)]
pub struct Step {
name: String,
pub 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 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
pub output: String, // the output file name
uses_runtime: Option<bool>,
uses_in_stream: Option<bool>,
allow_error: Option<bool>
pub uses_runtime: Option<bool>,
pub uses_in_stream: Option<bool>,
pub allow_error: Option<bool>
}
pub fn parse_config(path: PathBuf) -> Config {