kou commented on code in PR #4899:
URL: https://github.com/apache/arrow-adbc/pull/4899#discussion_r4288143036


##########
ci/linux-packages/yum/almalinux-10/Dockerfile:
##########
@@ -47,7 +47,16 @@ RUN \
 
 
 ARG GO_VERSION
-RUN wget --no-verbose https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
-    tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz && \
-    rm go${GO_VERSION}.linux-amd64.tar.gz
+ARG TARGETPLATFORM
+RUN if [[ ${TARGETPLATFORM} == "linux/amd64" ]]; then \
+        ARCH="amd64"; \
+    elif [[ ${TARGETPLATFORM} == "linux/arm64" ]]; then \
+        ARCH="arm64"; \
+    else \
+        echo "Unsupported platform: ${TARGETPLATFORM}"; \
+        exit 1; \
+    fi && \

Review Comment:
   Can we use `arch` or something instead of adding a new build argument?



##########
.github/workflows/packaging.yml:
##########
@@ -388,19 +388,25 @@ jobs:
 
   linux:
     name: Linux ${{ matrix.target }}
-    runs-on: ubuntu-latest
+    runs-on: ${{ matrix.runner }}
     needs:
       - source
     strategy:
       fail-fast: false
       matrix:
-        target:
-          - almalinux-8
-          - almalinux-9
-          - almalinux-10
-          - debian-trixie
-          - ubuntu-jammy
-          - ubuntu-noble
+        include:
+          - { target: almalinux-8,          runner: ubuntu-latest }
+          - { target: almalinux-8-aarch64,  runner: ubuntu-24.04-arm }
+          - { target: almalinux-9,          runner: ubuntu-latest }
+          - { target: almalinux-9-aarch64,  runner: ubuntu-24.04-arm }
+          - { target: almalinux-10,         runner: ubuntu-latest }
+          - { target: almalinux-10-aarch64, runner: ubuntu-24.04-arm }
+          - { target: debian-trixie,        runner: ubuntu-latest }
+          - { target: debian-trixie-arm64,  runner: ubuntu-24.04-arm }
+          - { target: ubuntu-jammy,         runner: ubuntu-latest }
+          - { target: ubuntu-jammy-arm64,   runner: ubuntu-24.04-arm }
+          - { target: ubuntu-noble,         runner: ubuntu-latest }
+          - { target: ubuntu-noble-arm64,   runner: ubuntu-24.04-arm }

Review Comment:
   Can we define only the distribution part such as `almalinux-8` and the 
architecture part such as `arm64` and compute `target` and `runner` from them? 
For example:
   
   ```yaml:
       linux:
         name: Linux ${{ matrix.distribution }} ${{ matrix.architecture }}
         runs-on: ${{ matrix.architecture == 'arm64' && 'ubuntu-24.04-arm' || 
'ubuntu-latest' }}
         needs:
           - source
         strategy:
           fail-fast: false
           matrix:
             distribution:
               - almalinux-8
               - almalinux-9
               - almalinux-10
               - debian-trixie
               - ubuntu-jammy
               - ubuntu-noble
             architecture:
               - amd64
               - arm64
         env:
           # amd64: almalinux-10, debian-trixie, ...
           # arm64: almalinux-10-aarch64, debian-trixie-arm64, ...
           TARGET: >-
             ${{ matrix.distribution }}${{
               matrix.architecture == 'arm64' &&
                 (startsWith(matrix.distribution, 'almalinux-') && '-aarch64' 
|| '-arm64') ||
                 ''
             }}
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to