From d8b65dc9f5c8658b6e54b9495b6a93b094a1d608 Mon Sep 17 00:00:00 2001 From: Andrew Nelson Date: Sat, 29 Jul 2023 12:43:37 +1000 Subject: [PATCH 1/7] CI: only build wheels when requested [wheel build] --- .cirrus.star | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.cirrus.star b/.cirrus.star index 25c7b7dfd863..79f622e92098 100644 --- a/.cirrus.star +++ b/.cirrus.star @@ -26,14 +26,26 @@ def main(ctx): SHA = env.get("CIRRUS_CHANGE_IN_REPO") url = "https://api.github.com/repos/scipy/scipy/git/commits/" + SHA dct = http.get(url).json() - # if "[wheel build]" in dct["message"]: - # return fs.read("ci/cirrus_wheels.yml") - if "[skip cirrus]" in dct["message"] or "[skip ci]" in dct["message"]: + commit_msg = dct["message"] + if "[skip cirrus]" in commit_msg or "[skip ci]" in commit_msg: return [] - # add extra jobs to the cirrus run by += adding to config - config = fs.read("tools/ci/cirrus_wheels.yml") - config += fs.read("tools/ci/cirrus_macosx_arm64.yml") + wheel = False + labels = env.get("CIRRUS_PR_LABELS", "") + pr_number = env.get("CIRRUS_PR", "-1") + tag = env.get("CIRRUS_TAG", "") - return config + if "[wheel build]" in commit_msg: + wheel = True + + if int(pr_number) > 0 and ("14 - Release" in labels or "36 - Build" in labels): + wheel = True + + if tag.startswith("v") and "dev0" not in tag: + wheel = True + + if wheel: + return fs.read("ci/cirrus_wheels.yml") + + return fs.read("tools/ci/cirrus_macosx_arm64.yml") From b019d48fbc34fb5f045284562e90ecc99716a0a3 Mon Sep 17 00:00:00 2001 From: Andrew Nelson Date: Sat, 29 Jul 2023 12:45:56 +1000 Subject: [PATCH 2/7] CI: only build wheels when requested [wheel build] --- .cirrus.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.star b/.cirrus.star index 79f622e92098..73317ef5cb0b 100644 --- a/.cirrus.star +++ b/.cirrus.star @@ -24,7 +24,7 @@ def main(ctx): # only contains the actual commit message on a non-PR trigger event. # For a PR event it contains the PR title and description. SHA = env.get("CIRRUS_CHANGE_IN_REPO") - url = "https://api.github.com/repos/scipy/scipy/git/commits/" + SHA + url = "https://api.github.com/repos/numpy/numpy/git/commits/" + SHA dct = http.get(url).json() commit_msg = dct["message"] From a3d68a0da6a965d19b6c28c6422f81ff8838c9fc Mon Sep 17 00:00:00 2001 From: Andrew Nelson Date: Sat, 29 Jul 2023 12:48:24 +1000 Subject: [PATCH 3/7] CI: only build wheels when requested [wheel build] --- .cirrus.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.star b/.cirrus.star index 73317ef5cb0b..1db448204890 100644 --- a/.cirrus.star +++ b/.cirrus.star @@ -37,7 +37,7 @@ def main(ctx): tag = env.get("CIRRUS_TAG", "") if "[wheel build]" in commit_msg: - wheel = True + return fs.read("ci/cirrus_wheels.yml") if int(pr_number) > 0 and ("14 - Release" in labels or "36 - Build" in labels): wheel = True From f4190e4bfcb208b238cda1dbf3ecd2f99faa1539 Mon Sep 17 00:00:00 2001 From: Andrew Nelson Date: Sat, 29 Jul 2023 12:49:30 +1000 Subject: [PATCH 4/7] CI: only build wheels when requested [wheel build] --- .cirrus.star | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.star b/.cirrus.star index 1db448204890..9548f5db35a6 100644 --- a/.cirrus.star +++ b/.cirrus.star @@ -37,7 +37,7 @@ def main(ctx): tag = env.get("CIRRUS_TAG", "") if "[wheel build]" in commit_msg: - return fs.read("ci/cirrus_wheels.yml") + wheel = True if int(pr_number) > 0 and ("14 - Release" in labels or "36 - Build" in labels): wheel = True @@ -46,6 +46,6 @@ def main(ctx): wheel = True if wheel: - return fs.read("ci/cirrus_wheels.yml") + return fs.read("tools/ci/cirrus_wheels.yml") return fs.read("tools/ci/cirrus_macosx_arm64.yml") From 2e4b2ac590e07356f62be98a10f078e2dcc5028c Mon Sep 17 00:00:00 2001 From: Andrew Nelson Date: Sat, 29 Jul 2023 12:51:50 +1000 Subject: [PATCH 5/7] CI: only build wheels when requested --- .cirrus.star | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.star b/.cirrus.star index 9548f5db35a6..0c3e45d802fa 100644 --- a/.cirrus.star +++ b/.cirrus.star @@ -48,4 +48,5 @@ def main(ctx): if wheel: return fs.read("tools/ci/cirrus_wheels.yml") + return fs.read("tools/ci/cirrus_macosx_arm64.yml") From 5ca2bcafd339570ae138ac74dc6cd53711018c9d Mon Sep 17 00:00:00 2001 From: Andrew Nelson Date: Sun, 30 Jul 2023 13:40:59 +1000 Subject: [PATCH 6/7] CI: only build wheels when requested --- .cirrus.star | 1 - 1 file changed, 1 deletion(-) diff --git a/.cirrus.star b/.cirrus.star index 0c3e45d802fa..9548f5db35a6 100644 --- a/.cirrus.star +++ b/.cirrus.star @@ -48,5 +48,4 @@ def main(ctx): if wheel: return fs.read("tools/ci/cirrus_wheels.yml") - return fs.read("tools/ci/cirrus_macosx_arm64.yml") From f4188581a35b964a9dbda0f78522d8fce05b8349 Mon Sep 17 00:00:00 2001 From: Andrew Nelson Date: Sun, 30 Jul 2023 20:27:02 +1000 Subject: [PATCH 7/7] CI: remove label based building --- .cirrus.star | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.star b/.cirrus.star index 9548f5db35a6..6f331a7c5b66 100644 --- a/.cirrus.star +++ b/.cirrus.star @@ -39,8 +39,8 @@ def main(ctx): if "[wheel build]" in commit_msg: wheel = True - if int(pr_number) > 0 and ("14 - Release" in labels or "36 - Build" in labels): - wheel = True + # if int(pr_number) > 0 and ("14 - Release" in labels or "36 - Build" in labels): + # wheel = True if tag.startswith("v") and "dev0" not in tag: wheel = True