diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 2a9c5a4953e..6aad5811f12 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -390,21 +390,33 @@ jobs: dist/*.pom linux: - name: Linux ${{ matrix.target }} - runs-on: ubuntu-latest + name: Linux ${{ matrix.distribution }} ${{ matrix.platform.arch }} + runs-on: ${{ matrix.platform.runs_on }} needs: - source strategy: max-parallel: 2 fail-fast: false matrix: - target: + distribution: - almalinux-8 - almalinux-9 - almalinux-10 - debian-trixie - ubuntu-jammy - ubuntu-noble + platform: + - { arch: amd64, runs_on: ubuntu-latest } + - { arch: arm64, runs_on: ubuntu-24.04-arm } + env: + # amd64: almalinux-10, debian-trixie, ... + # arm64: almalinux-10-aarch64, debian-trixie-arm64, ... + TARGET: >- + ${{ matrix.distribution }}${{ + matrix.platform.arch == 'arm64' && + (startsWith(matrix.distribution, 'almalinux-') && '-aarch64' || '-arm64') || + '' + }} steps: - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: @@ -419,17 +431,17 @@ jobs: - name: Set output variables run: | echo "ARROW_SOURCE=$(pwd)/arrow" >> $GITHUB_ENV - case ${{ matrix.target }} in + case ${{ env.TARGET }} in almalinux-*) echo "TASK_NAMESPACE=yum" >> $GITHUB_ENV - echo "YUM_TARGETS=${{ matrix.target }}" >> $GITHUB_ENV + echo "YUM_TARGETS=${{ env.TARGET }}" >> $GITHUB_ENV ;; debian-*|ubuntu-*) echo "TASK_NAMESPACE=apt" >> $GITHUB_ENV - echo "APT_TARGETS=${{ matrix.target }}" >> $GITHUB_ENV + echo "APT_TARGETS=${{ env.TARGET }}" >> $GITHUB_ENV ;; esac - distribution=$(echo ${{ matrix.target }} | cut -d- -f1) + distribution=$(echo ${{ env.TARGET }} | cut -d- -f1) echo "DISTRIBUTION=${distribution}" >> $GITHUB_ENV source_archive=$(echo apache-arrow-adbc-*.tar.gz) @@ -454,9 +466,9 @@ jobs: - name: Cache ccache uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: - path: adbc/ci/linux-packages/${{ env.TASK_NAMESPACE }}/build/${{ matrix.target }}/ccache - key: linux-${{ env.TASK_NAMESPACE }}-ccache-${{ matrix.target }}-{{ "${{ hashFiles('adbc.h', 'c/**', 'glib/**') }}" }} - restore-keys: linux-${{ env.TASK_NAMESPACE }}-ccache-${{ matrix.target }}- + path: adbc/ci/linux-packages/${{ env.TASK_NAMESPACE }}/build/${{ env.TARGET }}/ccache + key: linux-${{ env.TASK_NAMESPACE }}-ccache-${{ env.TARGET }}-{{ "${{ hashFiles('adbc.h', 'c/**', 'glib/**') }}" }} + restore-keys: linux-${{ env.TASK_NAMESPACE }}-ccache-${{ env.TARGET }}- lookup-only: true - name: Login to GitHub Container registry @@ -481,15 +493,15 @@ jobs: cp -a \ adbc/ci/linux-packages/${TASK_NAMESPACE}/repositories/${DISTRIBUTION} \ ./ - tar czf ${{ matrix.target }}.tar.gz ${DISTRIBUTION} + tar czf ${{ env.TARGET }}.tar.gz ${DISTRIBUTION} - name: Upload artifacts uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: - name: ${{ matrix.target }} + name: ${{ env.TARGET }} retention-days: 7 path: | - ${{ matrix.target }}.tar.gz + ${{ env.TARGET }}.tar.gz - name: Push Docker image run: | diff --git a/ci/linux-packages/Gemfile.lock b/ci/linux-packages/Gemfile.lock index e84031e860a..37a5911b621 100644 --- a/ci/linux-packages/Gemfile.lock +++ b/ci/linux-packages/Gemfile.lock @@ -5,7 +5,6 @@ GEM PLATFORMS ruby - x86_64-linux-gnu DEPENDENCIES apt-dists-merge diff --git a/ci/linux-packages/apt/debian-trixie-arm64/from b/ci/linux-packages/apt/debian-trixie-arm64/from new file mode 100644 index 00000000000..e2455893c4d --- /dev/null +++ b/ci/linux-packages/apt/debian-trixie-arm64/from @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +arm64v8/debian:trixie diff --git a/ci/linux-packages/apt/ubuntu-jammy-arm64/from b/ci/linux-packages/apt/ubuntu-jammy-arm64/from new file mode 100644 index 00000000000..fc3f0c433c8 --- /dev/null +++ b/ci/linux-packages/apt/ubuntu-jammy-arm64/from @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +arm64v8/ubuntu:jammy diff --git a/ci/linux-packages/apt/ubuntu-noble-arm64/from b/ci/linux-packages/apt/ubuntu-noble-arm64/from new file mode 100644 index 00000000000..4414c353871 --- /dev/null +++ b/ci/linux-packages/apt/ubuntu-noble-arm64/from @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +arm64v8/ubuntu:noble diff --git a/ci/linux-packages/yum/almalinux-10-aarch64/from b/ci/linux-packages/yum/almalinux-10-aarch64/from new file mode 100644 index 00000000000..2058e68f540 --- /dev/null +++ b/ci/linux-packages/yum/almalinux-10-aarch64/from @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +arm64v8/almalinux:10 diff --git a/ci/linux-packages/yum/almalinux-10/Dockerfile b/ci/linux-packages/yum/almalinux-10/Dockerfile index 170242dfda9..0714f84e313 100644 --- a/ci/linux-packages/yum/almalinux-10/Dockerfile +++ b/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 +RUN ARCH=$(arch) && \ + if [[ ${ARCH} == "x86_64" ]]; then \ + GO_ARCH="amd64"; \ + elif [[ ${ARCH} == "aarch64" ]]; then \ + GO_ARCH="arm64"; \ + else \ + echo "Unsupported platform: ${ARCH}"; \ + exit 1; \ + fi && \ + wget --no-verbose https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz && \ + tar -C /usr/local -xzf go${GO_VERSION}.linux-${GO_ARCH}.tar.gz && \ + rm go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ENV PATH="/usr/local/go/bin:${PATH}" diff --git a/ci/linux-packages/yum/almalinux-8-aarch64/from b/ci/linux-packages/yum/almalinux-8-aarch64/from new file mode 100644 index 00000000000..b570587e03c --- /dev/null +++ b/ci/linux-packages/yum/almalinux-8-aarch64/from @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +arm64v8/almalinux:8 diff --git a/ci/linux-packages/yum/almalinux-8/Dockerfile b/ci/linux-packages/yum/almalinux-8/Dockerfile index 79bf9bf7c42..0f628528728 100644 --- a/ci/linux-packages/yum/almalinux-8/Dockerfile +++ b/ci/linux-packages/yum/almalinux-8/Dockerfile @@ -47,7 +47,16 @@ RUN \ yum clean ${quiet} all 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 +RUN ARCH=$(arch) && \ + if [[ ${ARCH} == "x86_64" ]]; then \ + GO_ARCH="amd64"; \ + elif [[ ${ARCH} == "aarch64" ]]; then \ + GO_ARCH="arm64"; \ + else \ + echo "Unsupported platform: ${ARCH}"; \ + exit 1; \ + fi && \ + wget --no-verbose https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz && \ + tar -C /usr/local -xzf go${GO_VERSION}.linux-${GO_ARCH}.tar.gz && \ + rm go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ENV PATH="/usr/local/go/bin:${PATH}" diff --git a/ci/linux-packages/yum/almalinux-9-aarch64/from b/ci/linux-packages/yum/almalinux-9-aarch64/from new file mode 100644 index 00000000000..5fab1520f4e --- /dev/null +++ b/ci/linux-packages/yum/almalinux-9-aarch64/from @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +arm64v8/almalinux:9 diff --git a/ci/linux-packages/yum/almalinux-9/Dockerfile b/ci/linux-packages/yum/almalinux-9/Dockerfile index 20445deb62c..7140e4235dc 100644 --- a/ci/linux-packages/yum/almalinux-9/Dockerfile +++ b/ci/linux-packages/yum/almalinux-9/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 +RUN ARCH=$(arch) && \ + if [[ ${ARCH} == "x86_64" ]]; then \ + GO_ARCH="amd64"; \ + elif [[ ${ARCH} == "aarch64" ]]; then \ + GO_ARCH="arm64"; \ + else \ + echo "Unsupported platform: ${ARCH}"; \ + exit 1; \ + fi && \ + wget --no-verbose https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz && \ + tar -C /usr/local -xzf go${GO_VERSION}.linux-${GO_ARCH}.tar.gz && \ + rm go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ENV PATH="/usr/local/go/bin:${PATH}"