8000 CI: only build cirrus wheels when requested (#24286) · numpy/numpy@1a0066b · GitHub
[go: up one dir, main page]

Skip to c 8000 ontent

Commit 1a0066b

Browse files
authored
CI: only build cirrus wheels when requested (#24286)
[skip ci]
1 parent ee56599 commit 1a0066b

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

.cirrus.star

Lines changed: 19 additions & 7 deletions
8000
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,26 @@ def main(ctx):
2626
SHA = env.get("CIRRUS_CHANGE_IN_REPO")
2727
url = "https://api.github.com/repos/numpy/numpy/git/commits/" + SHA
2828
dct = http.get(url).json()
29-
# if "[wheel build]" in dct["message"]:
30-
# return fs.read("ci/cirrus_wheels.yml")
3129

32-
if "[skip cirrus]" in dct["message"] or "[skip ci]" in dct["message"]:
30+
commit_msg = dct["message"]
31+
if "[skip cirrus]" in commit_msg or "[skip ci]" in commit_msg:
3332
return []
3433

35-
# add extra jobs to the cirrus run by += adding to config
36-
config = fs.read("tools/ci/cirrus_wheels.yml")
37-
config += fs.read("tools/ci/cirrus_macosx_arm64.yml")
34+
wheel = False
35+
labels = env.get("CIRRUS_PR_LABELS", "")
36+
pr_number = env.get("CIRRUS_PR", "-1")
37+
tag = env.get("CIRRUS_TAG", "")
3838

39-
return config
39+
if "[wheel build]" in commit_msg:
40+
wheel = True
41+
42+
# if int(pr_number) > 0 and ("14 - Release" in labels or "36 - Build" in labels):
43+
# wheel = True
44+
45+
if tag.startswith("v") and "dev0" not in tag:
46+
wheel = True
47+
48+
if wheel:
49+
return fs.read("tools/ci/cirrus_wheels.yml")
50+
51+
return fs.read("tools/ci/cirrus_macosx_arm64.yml")

0 commit comments

Comments
 (0)
0