Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CI: only build cirrus wheels when requested #24286

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

Merged
merged 7 commits into from
Jul 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions .cirrus.star
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,28 @@ 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()
# 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("tools/ci/cirrus_wheels.yml")

return fs.read("tools/ci/cirrus_macosx_arm64.yml")