flowey_hvlite/pipelines_shared/
gh_pools.rs1use flowey::pipeline::prelude::*;
7
8pub const AMD_POOL_1ES: &str = "openvmm-gh-amd-westus3";
9pub const INTEL_POOL_1ES: &str = "openvmm-gh-intel-westus3";
10pub const ARM_POOL_1ES: &str = "openvmm-gh-arm-westus2";
11
12pub const WINDOWS_IMAGE_AMD64: &str = "win-amd64";
13pub const WINDOWS_IMAGE_ARM64: &str = "win-arm64";
14pub const LINUX_IMAGE_AMD64: &str = "ubuntu2404-amd64";
15pub const LINUX_IMAGE_ARM64: &str = "ubuntu2404-arm64";
16pub const MSHV_IMAGE_AMD64: &str = "azurelinux3-amd64-dom0";
17
18fn gh_pool_with_image_1es(pool: &str, image: &str) -> GhRunner {
19 GhRunner::SelfHosted(vec![
20 "self-hosted".to_string(),
21 format!("1ES.Pool={pool}"),
22 format!("1ES.ImageOverride={image}"),
23 ])
24}
25
26pub fn windows_amd_1es() -> GhRunner {
27 gh_pool_with_image_1es(AMD_POOL_1ES, WINDOWS_IMAGE_AMD64)
28}
29
30pub fn windows_intel_1es() -> GhRunner {
31 gh_pool_with_image_1es(INTEL_POOL_1ES, WINDOWS_IMAGE_AMD64)
32}
33
34pub fn windows_arm_1es() -> GhRunner {
35 gh_pool_with_image_1es(ARM_POOL_1ES, WINDOWS_IMAGE_ARM64)
36}
37
38pub fn linux_arm_1es() -> GhRunner {
39 gh_pool_with_image_1es(ARM_POOL_1ES, LINUX_IMAGE_ARM64)
40}
41
42pub fn linux_amd_1es() -> GhRunner {
43 gh_pool_with_image_1es(AMD_POOL_1ES, LINUX_IMAGE_AMD64)
44}
45
46pub fn linux_mshv_1es() -> GhRunner {
47 gh_pool_with_image_1es(INTEL_POOL_1ES, MSHV_IMAGE_AMD64)
48}
49
50pub fn windows_x64_gh() -> GhRunner {
51 GhRunner::GhHosted(GhRunnerOsLabel::WindowsLatest)
52}
53
54pub fn linux_x64_gh() -> GhRunner {
55 GhRunner::GhHosted(GhRunnerOsLabel::UbuntuLatest)
56}
57
58pub fn windows_arm_gh() -> GhRunner {
59 GhRunner::GhHosted(GhRunnerOsLabel::Windows11Arm)
60}
61
62pub fn linux_arm_gh() -> GhRunner {
63 GhRunner::GhHosted(GhRunnerOsLabel::Ubuntu2404Arm)
64}
65
66pub fn windows_arm_self_hosted_baremetal() -> GhRunner {
67 GhRunner::SelfHosted(vec![
68 "self-hosted".to_string(),
69 "Windows".to_string(),
70 "ARM64".to_string(),
71 "Baremetal".to_string(),
72 ])
73}
74
75pub fn windows_tdx_self_hosted_baremetal() -> GhRunner {
76 GhRunner::SelfHosted(vec![
77 "self-hosted".to_string(),
78 "Windows".to_string(),
79 "X64".to_string(),
80 "TDX".to_string(),
81 "Baremetal".to_string(),
82 ])
83}
84
85pub fn windows_snp_self_hosted_baremetal() -> GhRunner {
86 GhRunner::SelfHosted(vec![
87 "self-hosted".to_string(),
88 "Windows".to_string(),
89 "X64".to_string(),
90 "SNP".to_string(),
91 "Baremetal".to_string(),
92 ])
93}
94
95pub fn default_windows() -> GhRunner {
96 windows_amd_1es()
97}
98
99pub fn default_linux() -> GhRunner {
100 linux_amd_1es()
101}