This is an automated email from the ASF dual-hosted git repository.

Amar3tto pushed a commit to branch test-python-arm-sep-8
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 2f770d2d64543c255150f534e749c1f8f5cf2569
Author: Vitaly Terentyev <[email protected]>
AuthorDate: Tue Sep 8 12:19:55 2026 +0400

    cibwArchs
---
 .github/workflows/beam_PostCommit_Python_Arm.yml | 6 ++++--
 sdks/python/build.gradle                         | 5 +++--
 sdks/python/scripts/run_integration_test.sh      | 2 +-
 sdks/python/test-suites/dataflow/common.gradle   | 6 +++++-
 4 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/beam_PostCommit_Python_Arm.yml 
b/.github/workflows/beam_PostCommit_Python_Arm.yml
index acefdcc44a9..6d72584a5f7 100644
--- a/.github/workflows/beam_PostCommit_Python_Arm.yml
+++ b/.github/workflows/beam_PostCommit_Python_Arm.yml
@@ -94,6 +94,9 @@ jobs:
           credentials_json: ${{ secrets.GCP_SA_KEY }}
       - name: Set up Cloud SDK
         uses: 
google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db
+      # aarch64 wheels are built with cibuildwheel on this x86 runner.
+      - uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8
+        name: Set up QEMU
       - name: Set PY_VER_CLEAN
         id: set_py_ver_clean
         run: |
@@ -106,11 +109,10 @@ jobs:
           gradle-command: 
:sdks:python:test-suites:dataflow:py${{steps.set_py_ver_clean.outputs.py_ver_clean}}:postCommitArmIT
           arguments: |
             -PuseWheelDistribution \
+            -PcibwArchs=aarch64 \
             -PpythonVersion=${{ matrix.python_version }} \
             -PusePrebuiltSdkContainer \
         env:
-          # Use multiarch images published by Publish Beam SDK Snapshots.
-          SDK_CONTAINER_IMAGE: 
gcr.io/apache-beam-testing/beam-sdk/beam_python${{ matrix.python_version 
}}_sdk:latest
           USER: github-actions
       - name: Archive Python Test Results
         uses: actions/upload-artifact@v7
diff --git a/sdks/python/build.gradle b/sdks/python/build.gradle
index 339d87c76cb..f08df4ebe57 100644
--- a/sdks/python/build.gradle
+++ b/sdks/python/build.gradle
@@ -222,12 +222,13 @@ def platform_identifiers_map = [
 ]
 
 platform_identifiers_map.each { platform, idsuffix ->
-  def archs = 'auto'
+  def archs = project.rootProject.findProperty('cibwArchs') ?: 'auto'
   // note: A fix for arm64 platform in gradle environment. For some reason the
   // task fails with "Invalid archs option {<Architecture.arm64: 'arm64'>}."
   // even though os.arch is 'aarch64'
   // Running cibuildwheel command directly in shell it succeeded, however
-  if (platform == 'linux' && 
'aarch64'.equalsIgnoreCase(System.getProperty("os.arch"))) {
+  if (archs == 'auto' && platform == 'linux' &&
+    'aarch64'.equalsIgnoreCase(System.getProperty("os.arch"))) {
     archs = 'aarch64'
   }
   getVersionsAsList('python_versions').each { it ->
diff --git a/sdks/python/scripts/run_integration_test.sh 
b/sdks/python/scripts/run_integration_test.sh
index c1e0401793f..19e2ec78d12 100755
--- a/sdks/python/scripts/run_integration_test.sh
+++ b/sdks/python/scripts/run_integration_test.sh
@@ -253,7 +253,7 @@ if [[ -z $PIPELINE_OPTS ]]; then
     # and pushed by the caller under MULTIARCH_TAG.
     if [[ -n "${SDK_CONTAINER_IMAGE:-}" ]]; then
       opts+=("--sdk_container_image=$SDK_CONTAINER_IMAGE")
-    else
+    elif [[ -n "${MULTIARCH_TAG:-}" ]]; then
       IMAGE_NAME="beam_python${PY_VERSION}_sdk"
       
opts+=("--sdk_container_image=us.gcr.io/$PROJECT/$USER/$IMAGE_NAME:$MULTIARCH_TAG")
     fi
diff --git a/sdks/python/test-suites/dataflow/common.gradle 
b/sdks/python/test-suites/dataflow/common.gradle
index abe7867181e..abbe564d25e 100644
--- a/sdks/python/test-suites/dataflow/common.gradle
+++ b/sdks/python/test-suites/dataflow/common.gradle
@@ -50,8 +50,12 @@ task initializeForDataflowJob{
     dependsOn ":sdks:python:bdistPy${pythonVersionNumber}linux"
 
     doLast {
+      def cibwArchs = project.rootProject.findProperty('cibwArchs')
+      def wheelInclude = cibwArchs == 'aarch64' ?
+        "**/apache_beam-*cp${pythonVersionNumber}*aarch64*.whl" :
+        "**/apache_beam-*cp${pythonVersionNumber}*manylinux*.whl"
       def collection = 
project.fileTree(project.project(':sdks:python').buildDir){
-          include "**/apache_beam-*cp${pythonVersionNumber}*manylinux*.whl"
+        include wheelInclude
       }
       // sdkLocation ext is set at execution time
       String packageFilename = collection.singleFile.toString()

Reply via email to