1414from packaging .version import Version
1515
1616CI_TARGETS_YAML = "ci-targets.yaml"
17- CI_SKIP_LABELS = ["ci:skip" , "documentation" ]
17+ CI_EXTRA_SKIP_LABELS = ["documentation" ]
1818
1919
2020def meets_conditional_version (version : str , min_version : str ) -> bool :
@@ -38,15 +38,19 @@ def parse_labels(labels: Optional[str]) -> dict[str, set[str]]:
3838 for label in labels .split ("," ):
3939 label = label .strip ()
4040
41- # Handle special directive labels
42- if label in CI_SKIP_LABELS :
41+ # Handle special labels
42+ if label in CI_EXTRA_SKIP_LABELS :
4343 result ["directives" ].add ("skip" )
4444 continue
4545
4646 if not label or ":" not in label :
4747 continue
4848
4949 category , value = label .split (":" , 1 )
50+
51+ if category == "ci" :
52+ category = "directives"
53+
5054 if category in result :
5155 result [category ].add (value )
5256
@@ -95,6 +99,7 @@ def generate_matrix_entries(
9599 target_triple ,
96100 target_config ,
97101 platform ,
102+ label_filters .get ("directives" , set ()),
98103 )
99104
100105 # Apply label filters if present
@@ -113,6 +118,7 @@ def add_matrix_entries_for_config(
113118 target_triple : str ,
114119 config : dict [str , Any ],
115120 platform : str ,
121+ directives : set [str ],
116122) -> None :
117123 python_versions = config ["python_versions" ]
118124 build_options = config ["build_options" ]
@@ -135,6 +141,9 @@ def add_matrix_entries_for_config(
135141 if "run" in config :
136142 base_entry ["run" ] = str (config ["run" ]).lower ()
137143
144+ if "dry-run" in directives :
145+ base_entry ["dry-run" ] = "true"
146+
138147 # Process regular build options
139148 for python_version in python_versions :
140149 for build_option in build_options :
0 commit comments