From b4cdf874bd955a6116407f1f346066d8167d1beb Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 6 Mar 2025 18:38:48 +0900 Subject: [PATCH] GH-45675: [Release] Run binary RC verification jobs in apache/arrow --- .github/workflows/verify_rc.yml | 182 +++++++++++++++++++++ dev/release/verify-release-candidate.sh | 3 +- dev/tasks/tasks.yml | 58 ------- dev/tasks/verify-rc/github.linux.amd64.yml | 71 -------- 4 files changed, 184 insertions(+), 130 deletions(-) create mode 100644 .github/workflows/verify_rc.yml delete mode 100644 dev/tasks/verify-rc/github.linux.amd64.yml diff --git a/.github/workflows/verify_rc.yml b/.github/workflows/verify_rc.yml new file mode 100644 index 000000000000..879086cbb793 --- /dev/null +++ b/.github/workflows/verify_rc.yml @@ -0,0 +1,182 @@ +# 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. + +name: Verify RC + +on: + push: + tags: + - "*-rc*" + +permissions: + contents: read + +env: + TEST_DEFAULT: "0" + VERBOSE: "1" + +jobs: + apt: + name: APT + runs-on: ${{ matrix.runs-on }} + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + runs-on: + - ubuntu-latest + - ubuntu-24.04-arm + env: + TEST_APT: "1" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Run + run: | + package_id=${GITHUB_REF_NAME%-rc*} + version=${package_id#apache-arrow-} + rc=${GITHUB_REF_NAME#*-rc} + dev/release/verify-release-candidate.sh ${version} ${rc} + + binary: + name: Binary + runs-on: ubuntu-latest + timeout-minutes: 30 + env: + TEST_BINARY: "1" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Run + run: | + package_id=${GITHUB_REF_NAME%-rc*} + version=${package_id#apache-arrow-} + rc=${GITHUB_REF_NAME#*-rc} + dev/release/verify-release-candidate.sh ${version} ${rc} + + wheels-linux: + name: Wheels Linux + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + distro: + - almalinux-8 + - conda + - ubuntu-22.04 + - ubuntu-24.04 + env: + TEST_WHEELS: "1" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 + with: + python-version: 3 + - name: Setup Archery + run: python -m pip install -e dev/archery[docker] + - name: Prepare + run: | + package_id=${GITHUB_REF_NAME%-rc*} + echo "VERSION=${package_id#apache-arrow-}" >> ${GITHUB_ENV} + echo "RC=${GITHUB_REF_NAME#*-rc}" >> ${GITHUB_ENV} + distro=${{ matrix.distro }} + if [ "${distro}" = "conda" ]; then + echo "SERVICE=${distro}-verify-rc" >> ${GITHUB_ENV} + else + os=${distro%-*} + version=${distro#*-} + echo "SERVICE=${os}-verify-rc" >> ${GITHUB_ENV} + echo "$(echo ${os} | tr a-z A-Z)=${version}" >> ${GITHUB_ENV} + fi + - name: Run + run: | + archery docker run \ + -e TEST_DEFAULT="${TEST_DEFAULT}" \ + -e TEST_WHEELS="${TEST_WHEELS}" \ + -e VERBOSE="${VERBOSE}" \ + -e VERIFY_RC="${RC}" \ + -e VERIFY_VERSION="${VERSION}" \ + ${SERVICE} + + wheels-macos: + name: Wheels macOS + runs-on: ${{ matrix.runs-on }} + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + runs-on: + - macos-13 + - macos-14 + env: + TEST_WHEELS: "1" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Run + run: | + package_id=${GITHUB_REF_NAME%-rc*} + version=${package_id#apache-arrow-} + rc=${GITHUB_REF_NAME#*-rc} + dev/release/verify-release-candidate.sh ${version} ${rc} + + wheels-windows: + name: Wheels Windows + runs-on: windows-latest + timeout-minutes: 45 + env: + PYARROW_TEST_GDB: "OFF" + TEST_WHEELS: "1" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Prepare + shell: bash + run: | + package_id=${GITHUB_REF_NAME%-rc*} + echo "VERSION=${package_id#apache-arrow-}" >> ${GITHUB_ENV} + echo "RC=${GITHUB_REF_NAME#*-rc}" >> ${GITHUB_ENV} + - uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1 + - name: Install System Dependencies + run: | + choco install --no-progress --yes boost-msvc-14.1 + choco install --no-progress --yes wget + - name: Download Timezone Database + shell: bash + run: ci/scripts/download_tz_database.sh + - name: Run verification + shell: cmd + run: | + dev/release/verify-release-candidate-wheels.bat %VERSION% %RC% + + yum: + name: Yum + runs-on: ${{ matrix.runs-on }} + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + runs-on: + - ubuntu-latest + - ubuntu-24.04-arm + env: + TEST_YUM: "1" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Run + run: | + package_id=${GITHUB_REF_NAME%-rc*} + version=${package_id#apache-arrow-} + rc=${GITHUB_REF_NAME#*-rc} + dev/release/verify-release-candidate.sh ${version} ${rc} diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index ba7fde4dc442..7c26e0a05ef4 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -175,7 +175,8 @@ test_binary() { mkdir -p ${download_dir} ${PYTHON:-python3} $SOURCE_DIR/download_rc_binaries.py $VERSION $RC_NUMBER \ - --dest=${download_dir} + --dest=${download_dir} \ + --repository=${GITHUB_REPOSITORY:-apache/arrow} verify_dir_artifact_signatures ${download_dir} } diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 9924d26f4bca..ebbfd3e07843 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -122,15 +122,6 @@ groups: verify-rc: - verify-rc-* - verify-rc-binaries: - - verify-rc-binaries-* - - verify-rc-jars: - - verify-rc-binaries-jars-* - - verify-rc-wheels: - - verify-rc-binaries-wheels-* - verify-rc-source: - verify-rc-source-* @@ -747,29 +738,8 @@ tasks: distro: {{ distribution }} {% endfor %} - {% for target in ["jars", "wheels"] %} - verify-rc-binaries-{{ target }}-linux-{{ distribution }}-{{ version }}-amd64: - ci: github - template: verify-rc/github.linux.amd64.docker.yml - params: - target: {{ target }} - distro: {{ distribution }} - {% endfor %} - {% endfor %} - # Separated these tasks from the loop above due to: - # - 'binary' verification is not platform dependent - # - 'yum' and 'apt' requires docker so we need to run the verification script - # directly on the host - {% for target in ["binary", "yum", "apt"] %} - verify-rc-binaries-{{ target }}-linux-amd64: - ci: github - template: verify-rc/github.linux.amd64.yml - params: - target: {{ target }} - {% endfor %} - ######################## macOS verification ################################ {% for target in ["cpp", "integration", "python"] %} @@ -814,26 +784,6 @@ tasks: github_runner: "macos-14" {% endfor %} - {% for macos_version in ["13"] %} - verify-rc-binaries-wheels-macos-{{ macos_version }}-amd64: - ci: github - template: verify-rc/github.macos.yml - params: - github_runner: "macos-{{ macos_version }}" - target: "wheels" - {% endfor %} - - {% for macos_version in ["14"] %} - verify-rc-binaries-wheels-macos-{{ macos_version }}-arm64: - ci: github - template: verify-rc/github.macos.yml - params: - env: - PYTEST_ADDOPTS: "-k 'not test_cancellation'" - github_runner: "macos-{{ macos_version }}" - target: "wheels" - {% endfor %} - ######################## Windows verification ############################## verify-rc-source-windows: @@ -844,14 +794,6 @@ tasks: PYARROW_TEST_GDB: "OFF" script: "verify-release-candidate.bat" - verify-rc-binaries-wheels-windows: - ci: github - template: verify-rc/github.win.yml - params: - env: - PYARROW_TEST_GDB: "OFF" - script: "verify-release-candidate-wheels.bat" - ############################## Docker tests ################################## {% for image in ["alpine-linux-cpp", diff --git a/dev/tasks/verify-rc/github.linux.amd64.yml b/dev/tasks/verify-rc/github.linux.amd64.yml deleted file mode 100644 index 854020e85ce3..000000000000 --- a/dev/tasks/verify-rc/github.linux.amd64.yml +++ /dev/null @@ -1,71 +0,0 @@ -# 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. - -{% import 'macros.jinja' as macros with context %} - -{{ macros.github_header() }} - -{% set use_conda = use_conda|default(False) %} - -jobs: - verify: - name: "Verify release candidate on Ubuntu" - runs-on: {{ github_runner|default("ubuntu-22.04") }} - {% if env is defined %} - env: - {% for key, value in env.items() %} - {{ key }}: {{ value }} - {% endfor %} - {% endif %} - - steps: - {{ macros.github_checkout_arrow(fetch_depth=0)|indent }} - - - name: Install System Dependencies - run: | - sudo apt-get update -y - sudo apt-get install -y \ - autoconf-archive \ - binfmt-support \ - bison \ - build-essential \ - curl \ - flex \ - gtk-doc-tools \ - libgirepository1.0-dev \ - wget - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.1 - - - uses: actions/setup-java@v2 - with: - distribution: 'temurin' - java-version: '11' - - - name: Run verification - shell: bash - env: - TEST_DEFAULT: 0 - TEST_{{ target|upper }}: 1 - {% if use_conda %} - USE_CONDA: 1 - {% endif %} - run: | - arrow/dev/release/verify-release-candidate.sh {{ release|default("") }} {{ rc|default("") }}