-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ci:dry-run
to skip performing builds but still test the matrix
#437
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
from packaging.version import Version | ||
|
||
CI_TARGETS_YAML = "ci-targets.yaml" | ||
CI_SKIP_LABELS = ["ci:skip", "documentation"] | ||
CI_EXTRA_SKIP_LABELS = ["documentation"] | ||
|
||
|
||
def meets_conditional_version(version: str, min_version: str) -> bool: | ||
|
@@ -38,15 +38,19 @@ def parse_labels(labels: Optional[str]) -> dict[str, set[str]]: | |
for label in labels.split(","): | ||
label = label.strip() | ||
|
||
# Handle special directive labels | ||
if label in CI_SKIP_LABELS: | ||
# Handle special labels | ||
if label in CI_EXTRA_SKIP_LABELS: | ||
result["directives"].add("skip") | ||
continue | ||
|
||
if not label or ":" not in label: | ||
continue | ||
|
||
category, value = label.split(":", 1) | ||
|
||
if category == "ci": | ||
category = "directives" | ||
Comment on lines
+51
to
+52
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could just avoid this rename and use |
||
|
||
if category in result: | ||
result[category].add(value) | ||
|
||
|
@@ -95,6 +99,7 @@ def generate_matrix_entries( | |
target_triple, | ||
target_config, | ||
platform, | ||
label_filters.get("directives", set()), | ||
) | ||
|
||
# Apply label filters if present | ||
|
@@ -113,6 +118,7 @@ def add_matrix_entries_for_config( | |
target_triple: str, | ||
config: dict[str, Any], | ||
platform: str, | ||
directives: set[str], | ||
) -> None: | ||
python_versions = config["python_versions"] | ||
build_options = config["build_options"] | ||
|
@@ -135,6 +141,9 @@ def add_matrix_entries_for_config( | |
if "run" in config: | ||
base_entry["run"] = str(config["run"]).lower() | ||
|
||
if "dry-run" in directives: | ||
base_entry["dry-run"] = "true" | ||
|
||
# Process regular build options | ||
for python_version in python_versions: | ||
for build_option in build_options: | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(otherwise it's really confusing why there's a checkout action running here)