From 754d4a0be585525647b5f6f9221aae5a32cae224 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 19 Dec 2024 12:00:09 +0900 Subject: [PATCH 1/3] GH-45076: [CI][Packaging][Python] Simplify dev/tasks/python-wheels/github.linux.yml --- dev/tasks/python-wheels/github.linux.yml | 25 ++++++++++++------------ 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/dev/tasks/python-wheels/github.linux.yml b/dev/tasks/python-wheels/github.linux.yml index 8ddd0a23099df..ec5b9b31da8e1 100644 --- a/dev/tasks/python-wheels/github.linux.yml +++ b/dev/tasks/python-wheels/github.linux.yml @@ -19,16 +19,6 @@ {{ macros.github_header() }} -# Testing free-threaded wheels uses a different Docker setup -{% set test_imports_image = ( - 'python-free-threaded-wheel-manylinux-test-imports' if python_abi_tag == 'cp313t' - else 'python-wheel-manylinux-test-imports') -%} -{% set test_unittests_image = ( - 'python-free-threaded-wheel-manylinux-test-unittests' if python_abi_tag == 'cp313t' - else 'python-wheel-manylinux-test-unittests') -%} - permissions: packages: write @@ -60,6 +50,15 @@ jobs: {{ macros.github_install_archery()|indent }} {{ macros.github_login_dockerhub()|indent }} + - name: Prepare + run: | + if [ "${PYTHON_ABI_TAG}" = "cp313t" ]; then + test_image_prefix=python-free-threaded + else + test_image_prefix=python + fi + echo "TEST_IMAGE_PREFIX=${test_image_prefix}" >> ${GITHUB_ENV} + - name: Build wheel shell: bash env: @@ -85,8 +84,8 @@ jobs: shell: bash run: | source arrow/ci/scripts/util_enable_core_dumps.sh - archery docker run {{ test_imports_image }} - archery docker run {{ test_unittests_image }} + archery docker run ${TEST_IMAGE_PREFIX}-wheel-manylinux-test-imports + archery docker run ${TEST_IMAGE_PREFIX}-wheel-manylinux-test-unittests - name: Test wheel on AlmaLinux 8 shell: bash @@ -158,5 +157,5 @@ jobs: shell: bash run: | archery docker push python-wheel-manylinux-{{ manylinux_version }} - archery docker push {{ test_unittests_image }} + archery docker push ${TEST_IMAGE_PREFIX}-wheel-manylinux-test-unittests {% endif %} From 94f0744d9a3685178172c12c7ed5f0f7ee5da426 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 19 Dec 2024 12:02:06 +0900 Subject: [PATCH 2/3] Test --- dev/tasks/python-wheels/github.linux.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/dev/tasks/python-wheels/github.linux.yml b/dev/tasks/python-wheels/github.linux.yml index ec5b9b31da8e1..7a9a91b3029de 100644 --- a/dev/tasks/python-wheels/github.linux.yml +++ b/dev/tasks/python-wheels/github.linux.yml @@ -152,10 +152,8 @@ jobs: {{ macros.github_upload_gemfury("arrow/python/repaired_wheels/*.whl")|indent }} {{ macros.github_upload_wheel_scientific_python("arrow/python/repaired_wheels/*.whl")|indent }} - {% if arrow.is_default_branch() %} - name: Push Docker images shell: bash run: | archery docker push python-wheel-manylinux-{{ manylinux_version }} archery docker push ${TEST_IMAGE_PREFIX}-wheel-manylinux-test-unittests - {% endif %} From 154fbfbaa52d9bb9a3d120b23be1c36d68a76c7c Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 19 Dec 2024 13:53:15 +0900 Subject: [PATCH 3/3] Revert --- dev/tasks/python-wheels/github.linux.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/tasks/python-wheels/github.linux.yml b/dev/tasks/python-wheels/github.linux.yml index 7a9a91b3029de..ec5b9b31da8e1 100644 --- a/dev/tasks/python-wheels/github.linux.yml +++ b/dev/tasks/python-wheels/github.linux.yml @@ -152,8 +152,10 @@ jobs: {{ macros.github_upload_gemfury("arrow/python/repaired_wheels/*.whl")|indent }} {{ macros.github_upload_wheel_scientific_python("arrow/python/repaired_wheels/*.whl")|indent }} + {% if arrow.is_default_branch() %} - name: Push Docker images shell: bash run: | archery docker push python-wheel-manylinux-{{ manylinux_version }} archery docker push ${TEST_IMAGE_PREFIX}-wheel-manylinux-test-unittests + {% endif %}