flowey_hvlite/pipelines_shared/
gh_pools.rs1use flowey::pipeline::prelude::*;
7use flowey_lib_hvlite::run_cargo_nextest_run::NextestProfile;
8
9pub const WINDOWS_IMAGE_AMD64_V2: &str = "win-amd64-v2";
14pub const WINDOWS_IMAGE_ARM64_V2: &str = "win-arm64-v2";
15pub const LINUX_IMAGE_AMD64_PREPPED: &str = "ubuntu2404-amd64-prepped";
16pub const LINUX_IMAGE_ARM64: &str = "ubuntu2404-arm64";
17pub const MSHV_IMAGE_AMD64: &str = "azurelinux3-amd64-dom0";
18
19pub const AMD_V6_POOL_1ES: &str = "openvmm-gh-amd-westus3-v6";
20pub const AMD_V7_POOL_1ES: &str = "openvmm-gh-amd-westus3-v7";
21pub const INTEL_V5_POOL_1ES: &str = "openvmm-gh-intel-westus3";
22pub const INTEL_V6_POOL_1ES: &str = "openvmm-gh-intel-westus3-v6";
23pub const ARM_V5_POOL_1ES: &str = "openvmm-gh-arm-westus2";
24pub const ARM_V6_POOL_1ES: &str = "openvmm-gh-arm-westus3";
25
26fn gh_pool_with_image_1es(pool: &str, image: &str) -> (GhRunner, NextestProfile) {
27 (
28 GhRunner::SelfHosted(vec![
29 "self-hosted".to_string(),
30 format!("1ES.Pool={pool}"),
31 format!("1ES.ImageOverride={image}"),
32 ]),
33 NextestProfile::Ci,
34 )
35}
36
37pub fn windows_arm_v6_1es() -> (GhRunner, NextestProfile) {
38 gh_pool_with_image_1es(ARM_V6_POOL_1ES, WINDOWS_IMAGE_ARM64_V2)
39}
40
41pub fn windows_amd_v6_1es() -> (GhRunner, NextestProfile) {
42 gh_pool_with_image_1es(AMD_V6_POOL_1ES, WINDOWS_IMAGE_AMD64_V2)
43}
44
45pub fn windows_intel_v6_1es() -> (GhRunner, NextestProfile) {
46 gh_pool_with_image_1es(INTEL_V6_POOL_1ES, WINDOWS_IMAGE_AMD64_V2)
47}
48
49pub fn linux_arm_v5_1es() -> (GhRunner, NextestProfile) {
50 gh_pool_with_image_1es(ARM_V5_POOL_1ES, LINUX_IMAGE_ARM64)
51}
52
53pub fn linux_amd_v6_1es() -> (GhRunner, NextestProfile) {
54 gh_pool_with_image_1es(AMD_V6_POOL_1ES, LINUX_IMAGE_AMD64_PREPPED)
55}
56
57pub fn linux_amd_v7_1es() -> (GhRunner, NextestProfile) {
58 gh_pool_with_image_1es(AMD_V7_POOL_1ES, LINUX_IMAGE_AMD64_PREPPED)
59}
60
61pub fn linux_mshv_intel_v5_1es() -> (GhRunner, NextestProfile) {
62 gh_pool_with_image_1es(INTEL_V5_POOL_1ES, MSHV_IMAGE_AMD64)
63}
64
65pub fn windows_x64_gh() -> (GhRunner, NextestProfile) {
66 (
67 GhRunner::GhHosted(GhRunnerOsLabel::WindowsLatest),
68 NextestProfile::Ci,
69 )
70}
71
72pub fn linux_x64_gh() -> (GhRunner, NextestProfile) {
73 (
74 GhRunner::GhHosted(GhRunnerOsLabel::UbuntuLatest),
75 NextestProfile::Ci,
76 )
77}
78
79pub fn windows_arm_gh() -> (GhRunner, NextestProfile) {
80 (
81 GhRunner::GhHosted(GhRunnerOsLabel::Windows11Arm),
82 NextestProfile::Ci,
83 )
84}
85
86pub fn linux_arm_gh() -> (GhRunner, NextestProfile) {
87 (
88 GhRunner::GhHosted(GhRunnerOsLabel::Ubuntu2404Arm),
89 NextestProfile::Ci,
90 )
91}
92
93pub fn windows_arm_self_hosted_baremetal() -> (GhRunner, NextestProfile) {
94 (
95 GhRunner::SelfHosted(vec![
96 "self-hosted".to_string(),
97 "Windows".to_string(),
98 "ARM64".to_string(),
99 "Baremetal".to_string(),
100 ]),
101 NextestProfile::CiLarge,
102 )
103}
104
105pub fn windows_tdx_gnr_self_hosted_baremetal() -> (GhRunner, NextestProfile) {
106 (
107 GhRunner::SelfHosted(vec![
108 "self-hosted".to_string(),
109 "Windows".to_string(),
110 "X64".to_string(),
111 "TDX".to_string(),
112 "GNR".to_string(),
113 "Baremetal".to_string(),
114 ]),
115 NextestProfile::CiLarge,
116 )
117}
118
119pub fn windows_snp_self_hosted_baremetal() -> (GhRunner, NextestProfile) {
120 (
121 GhRunner::SelfHosted(vec![
122 "self-hosted".to_string(),
123 "Windows".to_string(),
124 "X64".to_string(),
125 "SNP".to_string(),
126 "Baremetal".to_string(),
127 ]),
128 NextestProfile::CiLarge,
129 )
130}
131
132pub fn linux_snp_mshv_self_hosted() -> (GhRunner, NextestProfile) {
133 (
134 GhRunner::SelfHosted(vec![
135 "self-hosted".to_string(),
136 "Linux".to_string(),
137 "X64".to_string(),
138 "SNP".to_string(),
139 "MSHV".to_string(),
140 ]),
141 NextestProfile::Ci,
142 )
143}
144
145pub fn default_windows() -> (GhRunner, NextestProfile) {
146 windows_intel_v6_1es()
147}
148
149pub fn default_linux() -> (GhRunner, NextestProfile) {
150 linux_amd_v7_1es()
151}