GitRoot
Craft your forge, Build your project, Grow your community freely
1// SPDX-FileCopyrightText: 2026 Romain Maneschi <romain@gitroot.dev>
2//
3// SPDX-License-Identifier: MIT
4
5use serde::{Deserialize, Serialize};
6
7#[derive(Debug, Deserialize, Serialize, Clone)]
8#[serde(rename_all = "camelCase")]
9pub struct Exec {
10 pub build: String,
11 pub report_stats: bool,
12 pub cmds: Vec<Cmd>,
13 pub env: Vec<String>,
14 pub artifacts: Vec<String>,
15 pub cache: Vec<Cache>,
16}
17
18#[derive(Debug, Deserialize, Serialize, Clone)]
19#[serde(rename_all = "camelCase")]
20pub struct Cmd {
21 pub cmd: String,
22 pub args: Vec<String>,
23}
24
25#[derive(Debug, Deserialize, Serialize, Clone)]
26#[serde(rename_all = "camelCase")]
27pub struct Cache {
28 pub key: String,
29 pub path: String,
30 pub read_only: bool,
31}
32
33#[derive(Debug, Deserialize, Serialize, Clone)]
34#[serde(rename_all = "camelCase")]
35pub struct ExecStatus {
36 pub cmds_exec: Vec<String>,
37 pub cmds_status: Vec<i32>,
38 pub cmds_logs: Vec<String>,
39 pub cmds_stats: Vec<CmdStats>,
40 pub artifacts: Vec<String>,
41}
42
43#[derive(Debug, Deserialize, Serialize, Clone)]
44#[serde(rename_all = "camelCase")]
45pub struct CmdStats {
46 pub max_memory_bytes: u64,
47 pub max_threads: i32,
48 pub read_bytes_total: u64,
49 pub write_bytes_total: u64,
50 pub total_cpu_time_ms: u64,
51}
52