mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Allow extended exclude and disable patterns.
This commit is contained in:
28
.github/workflows/Parameters.yml
vendored
28
.github/workflows/Parameters.yml
vendored
@@ -203,26 +203,44 @@ jobs:
|
||||
for disable in disabled:
|
||||
print(f"- {disable}")
|
||||
|
||||
def match(combination: str, pattern: str) -> bool:
|
||||
system, version = combination.split(":")
|
||||
sys, ver = pattern.split(":")
|
||||
|
||||
if sys == "*":
|
||||
return (ver == "*") or (version == ver)
|
||||
elif system == sys:
|
||||
return (ver == "*") or (version == ver)
|
||||
else:
|
||||
return False
|
||||
|
||||
def notIn(combination: str, patterns: Iterable[str]) -> bool:
|
||||
for pattern in patterns:
|
||||
if match(combination, pattern):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
combinations = [
|
||||
(system, version)
|
||||
for system in systems
|
||||
if system in data["sys"]
|
||||
for version in versions
|
||||
if version in data["python"]
|
||||
and f"{system}:{version}" not in excludes
|
||||
and f"{system}:{version}" not in disabled
|
||||
and notIn(f"{system}:{version}", excludes)
|
||||
and notIn(f"{system}:{version}", disabled)
|
||||
] + [
|
||||
(system, currentMSYS2Version)
|
||||
for system in systems
|
||||
if system in data["runtime"]
|
||||
and f"{system}:{currentMSYS2Version}" not in excludes
|
||||
and f"{system}:{currentMSYS2Version}" not in disabled
|
||||
and notIn(f"{system}:{currentMSYS2Version}", excludes)
|
||||
and notIn(f"{system}:{currentMSYS2Version}", disabled)
|
||||
] + [
|
||||
(system, version)
|
||||
for system, version in includes
|
||||
if system in data["sys"]
|
||||
and version in data["python"]
|
||||
and f"{system}:{version}" not in disabled
|
||||
and notIn(f"{system}:{version}", disabled)
|
||||
]
|
||||
print(f"Combinations ({len(combinations)}):")
|
||||
for system, version in combinations:
|
||||
|
||||
Reference in New Issue
Block a user