Skip to content

CI Open issue when arm wheel fails on CirrusCI #25620

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
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions build_tools/cirrus/arm_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ macos_arm64_wheel_task:
CIBW_BUILD_VERBOSITY: 1
PATH: $HOME/mambaforge/bin/:$PATH
CONDA_HOME: $HOME/mambaforge
# Upload tokens have been encrypted via the CirrusCI interface:
# https://cirrus-ci.org/guide/writing-tasks/#encrypted-variables
# See `maint_tools/update_tracking_issue.py` for details on the permissions the token requires.
BOT_GITHUB_TOKEN: ENCRYPTED[9b50205e2693f9e4ce9a3f0fcb897a259289062fda2f5a3b8aaa6c56d839e0854a15872f894a70fca337dd4787274e0f]
Comment on lines +17 to +20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for having added this comment. 👍

matrix:
- env:
CIBW_BUILD: cp38-macosx_arm64
Expand All @@ -30,6 +34,11 @@ macos_arm64_wheel_task:

cibuildwheel_script:
- bash build_tools/wheels/build_wheels.sh
- bash build_tools/cirrus/update_tracking_issue.sh true

on_failure:
update_tracker_script:
- bash build_tools/cirrus/update_tracking_issue.sh false

wheels_artifacts:
path: "wheelhouse/*"
Expand All @@ -53,6 +62,10 @@ linux_arm64_wheel_task:
CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh
CIBW_TEST_REQUIRES: pytest pandas threadpoolctl pytest-xdist
CIBW_BUILD_VERBOSITY: 1
# Upload tokens have been encrypted via the CirrusCI interface:
# https://cirrus-ci.org/guide/writing-tasks/#encrypted-variables
# See `maint_tools/update_tracking_issue.py` for details on the permissions the token requires.
BOT_GITHUB_TOKEN: ENCRYPTED[9b50205e2693f9e4ce9a3f0fcb897a259289062fda2f5a3b8aaa6c56d839e0854a15872f894a70fca337dd4787274e0f]
matrix:
- env:
CIBW_BUILD: cp38-manylinux_aarch64
Expand All @@ -66,6 +79,11 @@ linux_arm64_wheel_task:
cibuildwheel_script:
- apt install -y python3 python-is-python3
- bash build_tools/wheels/build_wheels.sh
- bash build_tools/cirrus/update_tracking_issue.sh true

on_failure:
update_tracker_script:
- bash build_tools/cirrus/update_tracking_issue.sh false

wheels_artifacts:
path: "wheelhouse/*"
Expand Down
21 changes: 21 additions & 0 deletions build_tools/cirrus/update_tracking_issue.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Update tracking issue if Cirrus fails nightly job

if [[ "$CIRRUS_CRON" != "nightly" ]]; then
exit 0
fi

# TEST_PASSED is either "true" or "false"
TEST_PASSED="$1"

python -m venv .venv
source .venv/bin/activate
python -m pip install defusedxml PyGithub

LINK_TO_RUN="https://cirrus-ci.com/build/$CIRRUS_BUILD_ID"

python maint_tools/update_tracking_issue.py \
$BOT_GITHUB_TOKEN \
$CIRRUS_TASK_NAME \
$CIRRUS_REPO_FULL_NAME \
$LINK_TO_RUN \
--tests-passed $TEST_PASSED