From 424bb6ed0302de5c6e6ec86311dbea93918f3559 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 07:08:31 +0900 Subject: [PATCH 01/12] GH-40077: [CI] Use GitHub hosted M1 macOS runner --- dev/tasks/java-jars/github.yml | 8 ++------ dev/tasks/python-wheels/github.osx.arm64.yml | 2 +- dev/tasks/r/github.packages.yml | 3 +-- dev/tasks/tasks.yml | 2 +- dev/tasks/verify-rc/github.macos.arm64.yml | 2 +- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/dev/tasks/java-jars/github.yml b/dev/tasks/java-jars/github.yml index 8fe5878254d..d954320611b 100644 --- a/dev/tasks/java-jars/github.yml +++ b/dev/tasks/java-jars/github.yml @@ -79,14 +79,12 @@ jobs: matrix: platform: - { runs_on: ["macos-latest"], arch: "x86_64"} - - { runs_on: ["self-hosted", "macOS", "arm64", "devops-managed"], arch: "aarch_64" } + - { runs_on: ["macos-14-arm64"], arch: "aarch_64" } env: MACOSX_DEPLOYMENT_TARGET: "10.15" steps: {{ macros.github_checkout_arrow()|indent }} - name: Set up Python - if: | - !contains(matrix.platform.runs_on, 'self-hosted') uses: actions/setup-python@v4 with: cache: 'pip' @@ -134,9 +132,7 @@ jobs: run: | set -e # make brew Java available to CMake - if [ "{{ arch }}" = "aarch_64" ]; then - export JAVA_HOME=$(brew --prefix openjdk@11)/libexec/openjdk.jdk/Contents/Home - fi + export JAVA_HOME=$(brew --prefix openjdk@11)/libexec/openjdk.jdk/Contents/Home arrow/ci/scripts/java_jni_macos_build.sh \ $GITHUB_WORKSPACE/arrow \ $GITHUB_WORKSPACE/arrow/cpp-build \ diff --git a/dev/tasks/python-wheels/github.osx.arm64.yml b/dev/tasks/python-wheels/github.osx.arm64.yml index 380c2e42f1d..fcfeadbc8c1 100644 --- a/dev/tasks/python-wheels/github.osx.arm64.yml +++ b/dev/tasks/python-wheels/github.osx.arm64.yml @@ -40,7 +40,7 @@ env: jobs: build: name: Build wheel for Python {{ python_version }} on macOS - runs-on: ["self-hosted", "macOS", "arm64"] + runs-on: "macos-14-arm64" steps: - name: Cleanup run: rm -rf arrow vcpkg build crossbow-env build-*-env test-*-env diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml index 2ddfd02e731..f9bb529888c 100644 --- a/dev/tasks/r/github.packages.yml +++ b/dev/tasks/r/github.packages.yml @@ -67,8 +67,7 @@ jobs: matrix: platform: - { runs_on: ["self-hosted", "macos-10.13"], arch: "x86_64" } - - - { runs_on: ["self-hosted", "macOS", "arm64", "devops-managed"], arch: "arm64" } + - { runs_on: macos-10.14-arm64, arch: "arm64" } openssl: ['3.0', '1.1'] steps: diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index c166ea15f37..204c4fa33ca 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -992,7 +992,7 @@ tasks: TEST_INTEGRATION_JAVA: 0 PYTEST_ADDOPTS: "-k 'not test_cancellation'" target: {{ target }} - github_runner: ["self-hosted", "macOS", "arm64"] + github_runner: "macos-14-arm64" {% endfor %} {% for macos_version in ["11", "12"] %} diff --git a/dev/tasks/verify-rc/github.macos.arm64.yml b/dev/tasks/verify-rc/github.macos.arm64.yml index fce10925df2..a5b0a2a4d5b 100644 --- a/dev/tasks/verify-rc/github.macos.arm64.yml +++ b/dev/tasks/verify-rc/github.macos.arm64.yml @@ -22,7 +22,7 @@ jobs: verify: name: "Verify release candidate on macOS" - runs-on: {{ github_runner|default(["self-hosted", "macOS", "arm64"]) }} + runs-on: {{ github_runner|default("macos-14-arm64") }} {% if env is defined %} env: {% for key, value in env.items() %} From b7b568e83848bf9cb869d8af878a4dbae1387969 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 12:19:27 +0900 Subject: [PATCH 02/12] Remove needless -arm64 --- dev/tasks/java-jars/github.yml | 2 +- dev/tasks/python-wheels/github.osx.arm64.yml | 2 +- dev/tasks/tasks.yml | 2 +- dev/tasks/verify-rc/github.macos.arm64.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tasks/java-jars/github.yml b/dev/tasks/java-jars/github.yml index d954320611b..03cbcc7c98f 100644 --- a/dev/tasks/java-jars/github.yml +++ b/dev/tasks/java-jars/github.yml @@ -79,7 +79,7 @@ jobs: matrix: platform: - { runs_on: ["macos-latest"], arch: "x86_64"} - - { runs_on: ["macos-14-arm64"], arch: "aarch_64" } + - { runs_on: ["macos-14"], arch: "aarch_64" } env: MACOSX_DEPLOYMENT_TARGET: "10.15" steps: diff --git a/dev/tasks/python-wheels/github.osx.arm64.yml b/dev/tasks/python-wheels/github.osx.arm64.yml index fcfeadbc8c1..b29583b722e 100644 --- a/dev/tasks/python-wheels/github.osx.arm64.yml +++ b/dev/tasks/python-wheels/github.osx.arm64.yml @@ -40,7 +40,7 @@ env: jobs: build: name: Build wheel for Python {{ python_version }} on macOS - runs-on: "macos-14-arm64" + runs-on: "macos-14" steps: - name: Cleanup run: rm -rf arrow vcpkg build crossbow-env build-*-env test-*-env diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 204c4fa33ca..d6f8490bcf9 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -992,7 +992,7 @@ tasks: TEST_INTEGRATION_JAVA: 0 PYTEST_ADDOPTS: "-k 'not test_cancellation'" target: {{ target }} - github_runner: "macos-14-arm64" + github_runner: "macos-14" {% endfor %} {% for macos_version in ["11", "12"] %} diff --git a/dev/tasks/verify-rc/github.macos.arm64.yml b/dev/tasks/verify-rc/github.macos.arm64.yml index a5b0a2a4d5b..925f572839e 100644 --- a/dev/tasks/verify-rc/github.macos.arm64.yml +++ b/dev/tasks/verify-rc/github.macos.arm64.yml @@ -22,7 +22,7 @@ jobs: verify: name: "Verify release candidate on macOS" - runs-on: {{ github_runner|default("macos-14-arm64") }} + runs-on: {{ github_runner|default("macos-14") }} {% if env is defined %} env: {% for key, value in env.items() %} From 0c3aa7c163ce0c22bf9d1902903ddebab80bd1f1 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 14:27:07 +0900 Subject: [PATCH 03/12] Use GitHub hosted macOS runner --- dev/tasks/python-wheels/github.osx.arm64.yml | 2 +- dev/tasks/r/github.packages.yml | 29 +++----------------- 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/dev/tasks/python-wheels/github.osx.arm64.yml b/dev/tasks/python-wheels/github.osx.arm64.yml index b29583b722e..02e7e46ec11 100644 --- a/dev/tasks/python-wheels/github.osx.arm64.yml +++ b/dev/tasks/python-wheels/github.osx.arm64.yml @@ -48,7 +48,7 @@ jobs: {{ macros.github_checkout_arrow()|indent }} - name: Add Brew's Bison to PATH - run: echo "/opt/homebrew/opt/bison/bin" >> $GITHUB_PATH + run: echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH - name: Retrieve VCPKG version from arrow/.env run: | diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml index f9bb529888c..663759c3c42 100644 --- a/dev/tasks/r/github.packages.yml +++ b/dev/tasks/r/github.packages.yml @@ -66,15 +66,14 @@ jobs: fail-fast: false matrix: platform: - - { runs_on: ["self-hosted", "macos-10.13"], arch: "x86_64" } - - { runs_on: macos-10.14-arm64, arch: "arm64" } + - { runs_on: macos-10.13, arch: "x86_64" } + - { runs_on: macos-10.14, arch: "arm64" } openssl: ['3.0', '1.1'] steps: {{ macros.github_checkout_arrow(action_v="3")|indent }} {{ macros.github_change_r_pkg_version(is_fork, '${{ needs.source.outputs.pkg_version }}')|indent }} - name: Install Deps - if: {{ "${{ !contains(matrix.platform.runs_on, 'macos-10.13') }}" }} run: | brew install sccache ninja brew install openssl@{{ '${{ matrix.openssl }}' }} @@ -210,43 +209,23 @@ jobs: matrix: platform: - { runs_on: 'windows-latest', name: "Windows"} - - { runs_on: macos-11 , name: "macOS Big Sur"} - - { runs_on: ["self-hosted", "macOS", "arm64", "devops-managed"], name: "macOS Big Sur (M1)" } + - { runs_on: macos-11 , name: "macOS x86_64"} + - { runs_on: macos-14, name: "macOS arm64" } r_version: [oldrel, release] steps: - uses: r-lib/actions/setup-r@v2 - # expression marker prevents the ! being parsed as yaml tag - if: {{ "${{ !contains(matrix.platform.runs_on, 'self-hosted') }}" }} with: r-version: {{ '${{ matrix.r_version }}' }} - - name: Setup R Self-Hosted - if: contains(matrix.platform.runs_on, 'self-hosted') - run: | - # rig is a system utility that allows for switching - # between pre-installed R version on the self-hosted runners - # rig add {{ '${{ matrix.r_version }}' }} #uncomment this to install latest release/oldrel - rig default {{ '${{ matrix.r_version }}' }} - - rig system setup-user-lib {{ macros.github_setup_local_r_repo(false, true, true)|indent }} - name: Prepare Dependency Installation shell: bash run: | tar -xzf repo/src/contrib/arrow_*.tar.gz arrow/DESCRIPTION - name: Install dependencies - if: {{ "${{ !contains(matrix.platform.runs_on, 'self-hosted') }}" }} uses: r-lib/actions/setup-r-dependencies@v2 with: working-directory: 'arrow' extra-packages: cpp11 - - name: Install dependencies self-hosted - if: {{ "${{ contains(matrix.platform.runs_on, 'self-hosted') }}" }} - shell: Rscript {0} - run: | - if (!requireNamespace("devtools", quietly = TRUE)) { - install.packages("devtools") - } - devtools::install_dev_deps('./arrow') - name: Set CRAN like openssl if: contains(matrix.platform.runs_on, 'arm64') run: | From 5931dca65a660edd18e29a043128d540f810841f Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 14:56:07 +0900 Subject: [PATCH 04/12] Unify GitHub Actions template for macOS wheels --- dev/tasks/python-wheels/github.osx.arm64.yml | 3 +- .../{github.osx.amd64.yml => github.osx.yml} | 34 ++++++------- dev/tasks/tasks.yml | 50 +++++++++++-------- 3 files changed, 43 insertions(+), 44 deletions(-) rename dev/tasks/python-wheels/{github.osx.amd64.yml => github.osx.yml} (83%) diff --git a/dev/tasks/python-wheels/github.osx.arm64.yml b/dev/tasks/python-wheels/github.osx.arm64.yml index 02e7e46ec11..bd05fd8dda1 100644 --- a/dev/tasks/python-wheels/github.osx.arm64.yml +++ b/dev/tasks/python-wheels/github.osx.arm64.yml @@ -23,10 +23,9 @@ {{ macros.github_header() }} env: - ARROW_JEMALLOC: OFF + ARROW_JEMALLOC: "{{ arrow_jemalloc }}" CC: "clang" CMAKE_BUILD_TYPE: release - CMAKE_CXX_COMPILER_LAUNCHER: "ccache" CXX: "clang++" MACOSX_DEPLOYMENT_TARGET: "{{ macos_deployment_target }}" PYARROW_BUILD_VERBOSE: 1 diff --git a/dev/tasks/python-wheels/github.osx.amd64.yml b/dev/tasks/python-wheels/github.osx.yml similarity index 83% rename from dev/tasks/python-wheels/github.osx.amd64.yml rename to dev/tasks/python-wheels/github.osx.yml index e31a681653b..5b34bfc35a4 100644 --- a/dev/tasks/python-wheels/github.osx.amd64.yml +++ b/dev/tasks/python-wheels/github.osx.yml @@ -19,14 +19,17 @@ {{ macros.github_header() }} env: + ARROW_JEMALLOC: "{{ arrow_jemalloc }}" CC: "clang" + CMAKE_BUILD_TYPE: release + CMAKE_CXX_COMPILER_LAUNCHER: "ccache" CXX: "clang++" MACOSX_DEPLOYMENT_TARGET: "{{ macos_deployment_target }}" PYARROW_BUILD_VERBOSE: 1 PYARROW_VERSION: "{{ arrow.no_rc_version }}" PYTHON_VERSION: "{{ python_version }}" PYTHON: "/Library/Frameworks/Python.framework/Versions/{{ python_version }}/bin/python{{ python_version }}" - VCPKG_DEFAULT_TRIPLET: amd64-osx-static-release + VCPKG_DEFAULT_TRIPLET: "{{ vcpkg_arch }}-osx-static-release" VCPKG_FEATURE_FLAGS: "manifests" VCPKG_OVERLAY_TRIPLETS: {{ "${{ github.workspace }}/arrow/ci/vcpkg" }} VCPKG_ROOT: {{ "${{ github.workspace }}/vcpkg" }} @@ -34,7 +37,7 @@ env: jobs: build: name: Build wheel for Python {{ python_version }} on macOS - runs-on: macos-latest + runs-on: "{{ runs_on }}" env: VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' steps: @@ -47,27 +50,21 @@ jobs: uses: lukka/get-cmake@v3.21.2 - name: Retrieve VCPKG version from arrow/.env - shell: bash run: | vcpkg_version=$(cat "arrow/.env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"') echo "VCPKG_VERSION=$vcpkg_version" >> $GITHUB_ENV - name: Install Vcpkg - shell: bash - env: - MACOSX_DEPLOYMENT_TARGET: "10.15" run: arrow/ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION - name: Add Vcpkg to PATH - shell: bash run: echo ${VCPKG_ROOT} >> $GITHUB_PATH - name: Setup NuGet Credentials - shell: bash env: GITHUB_TOKEN: {{ '${{ secrets.GITHUB_TOKEN }}' }} run: | - mono `vcpkg fetch nuget | tail -n 1` \ + mono $(vcpkg fetch nuget | tail -n 1) \ sources add \ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" \ -storepasswordincleartext \ @@ -75,7 +72,7 @@ jobs: -username "$GITHUB_REPOSITORY_OWNER" \ -password "$GITHUB_TOKEN" \ - mono `vcpkg fetch nuget | tail -n 1` \ + mono $(vcpkg fetch nuget | tail -n 1) \ setapikey "$GITHUB_TOKEN" \ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" @@ -93,33 +90,30 @@ jobs: --x-feature=s3 - name: Install Python {{ python_version }} - shell: bash run: sudo arrow/ci/scripts/install_python.sh macos {{ python_version }} - name: Build Wheel - shell: bash run: | $PYTHON -m venv build-env source build-env/bin/activate pip install --upgrade pip wheel - PYTHON=python arrow/ci/scripts/python_wheel_macos_build.sh x86_64 $(pwd)/arrow $(pwd)/build + PYTHON=python arrow/ci/scripts/python_wheel_macos_build.sh {{ arch }} $(pwd)/arrow $(pwd)/build - uses: actions/upload-artifact@v3 with: name: wheel path: arrow/python/repaired_wheels/*.whl - - name: Test Wheel on AMD64 - shell: bash + - name: Test Wheel env: PYTEST_ADDOPTS: "-k 'not test_cancellation'" run: | - $PYTHON -m venv test-amd64-env - source test-amd64-env/bin/activate + $PYTHON -m venv test-env + source test-env/bin/activate pip install --upgrade pip wheel - arch -x86_64 pip install -r arrow/python/requirements-wheel-test.txt - PYTHON=python arch -x86_64 arrow/ci/scripts/install_gcs_testbench.sh default - arch -x86_64 arrow/ci/scripts/python_wheel_unix_test.sh $(pwd)/arrow + arch -{{ arch }} pip install -r arrow/python/requirements-wheel-test.txt + PYTHON=python arch -{{ arch }} arrow/ci/scripts/install_gcs_testbench.sh default + arch -{{ arch }} arrow/ci/scripts/python_wheel_unix_test.sh $(pwd)/arrow {{ macros.github_upload_releases("arrow/python/repaired_wheels/*.whl")|indent }} {{ macros.github_upload_gemfury("arrow/python/repaired_wheels/*.whl")|indent }} diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index d6f8490bcf9..59198385db4 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -393,63 +393,69 @@ tasks: - pyarrow-{no_rc_version}-{{ python_tag }}-{{ abi_tag }}-{{ platform_tag }}.whl {% endfor %} -{############################## Wheel OSX ####################################} +{############################## Wheel macOS ####################################} {% for macos_version, macos_codename in [("10.15", "catalina")] %} {% set platform_tag = "macosx_{}_x86_64".format(macos_version.replace('.', '_')) %} wheel-macos-{{ macos_codename }}-{{ python_tag }}-amd64: ci: github - template: python-wheels/github.osx.amd64.yml + template: python-wheels/github.osx.yml params: + arch: "x86_64" + arrow_jemalloc: "ON" python_version: "{{ python_version }}" macos_deployment_target: "{{ macos_version }}" + runs_on: "macos-latest" + vcpkg_arch: "amd64" artifacts: - pyarrow-{no_rc_version}-{{ python_tag }}-{{ abi_tag }}-{{ platform_tag }}.whl {% endfor %} -{############################## Wheel Windows ################################} - - wheel-windows-{{ python_tag }}-amd64: - ci: github - template: python-wheels/github.windows.yml - params: - python_version: "{{ python_version }}" - artifacts: - - pyarrow-{no_rc_version}-{{ python_tag }}-{{ abi_tag }}-win_amd64.whl - -{% endfor %} - -{############################## Wheel OSX M1 #################################} - # The python 3.8 universal2 installer has been built with macos deployment # target 11.0, so we cannot build binaries with earlier deployment target # otherwise distutils will raise a deployment target version mismatch error. wheel-macos-big-sur-cp38-arm64: ci: github - template: python-wheels/github.osx.arm64.yml + template: python-wheels/github.osx.yml params: - arch: arm64 - arrow_simd_level: "DEFAULT" + arch: "arm64" + arrow_jemalloc: "OFF" python_version: "3.8" macos_deployment_target: "11.0" - + runs_on: "macos-14" + vcpkg_arch: "arm64" artifacts: - pyarrow-{no_rc_version}-cp38-cp38-macosx_11_0_arm64.whl {% for python_version, python_tag in [("3.9", "cp39"), ("3.10", "cp310"), ("3.11", "cp311"), ("3.12", "cp312")] %} wheel-macos-big-sur-{{ python_tag }}-arm64: ci: github - template: python-wheels/github.osx.arm64.yml + template: python-wheels/github.osx.yml params: - arch: arm64 + arch: "arm64" + arrow_jemalloc: "OFF" python_version: "{{ python_version }}" macos_deployment_target: "11.0" + runs_on: "macos-14" + vcpkg_arch: "arm64" artifacts: - pyarrow-{no_rc_version}-{{ python_tag }}-{{ python_tag }}-macosx_11_0_arm64.whl {% endfor %} +{############################## Wheel Windows ################################} + + wheel-windows-{{ python_tag }}-amd64: + ci: github + template: python-wheels/github.windows.yml + params: + python_version: "{{ python_version }}" + artifacts: + - pyarrow-{no_rc_version}-{{ python_tag }}-{{ abi_tag }}-win_amd64.whl + +{% endfor %} + {############################ Python sdist ####################################} python-sdist: From d9f4a05c0bc718415a96138e3d257ecf374c0938 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 14:57:42 +0900 Subject: [PATCH 05/12] Fix name --- dev/tasks/r/github.packages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml index 663759c3c42..cf3fcd6a529 100644 --- a/dev/tasks/r/github.packages.yml +++ b/dev/tasks/r/github.packages.yml @@ -66,8 +66,8 @@ jobs: fail-fast: false matrix: platform: - - { runs_on: macos-10.13, arch: "x86_64" } - - { runs_on: macos-10.14, arch: "arm64" } + - { runs_on: macos-13, arch: "x86_64" } + - { runs_on: macos-14, arch: "arm64" } openssl: ['3.0', '1.1'] steps: @@ -209,7 +209,7 @@ jobs: matrix: platform: - { runs_on: 'windows-latest', name: "Windows"} - - { runs_on: macos-11 , name: "macOS x86_64"} + - { runs_on: macos-11, name: "macOS x86_64"} - { runs_on: macos-14, name: "macOS arm64" } r_version: [oldrel, release] steps: From fe789d126ae52a587d86a982763ef858eae0c841 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 15:11:02 +0900 Subject: [PATCH 06/12] Remove duplicated --- dev/tasks/tasks.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 59198385db4..9d604c379eb 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -413,23 +413,6 @@ tasks: {% endfor %} - # The python 3.8 universal2 installer has been built with macos deployment - # target 11.0, so we cannot build binaries with earlier deployment target - # otherwise distutils will raise a deployment target version mismatch error. - wheel-macos-big-sur-cp38-arm64: - ci: github - template: python-wheels/github.osx.yml - params: - arch: "arm64" - arrow_jemalloc: "OFF" - python_version: "3.8" - macos_deployment_target: "11.0" - runs_on: "macos-14" - vcpkg_arch: "arm64" - artifacts: - - pyarrow-{no_rc_version}-cp38-cp38-macosx_11_0_arm64.whl - -{% for python_version, python_tag in [("3.9", "cp39"), ("3.10", "cp310"), ("3.11", "cp311"), ("3.12", "cp312")] %} wheel-macos-big-sur-{{ python_tag }}-arm64: ci: github template: python-wheels/github.osx.yml @@ -442,7 +425,6 @@ tasks: vcpkg_arch: "arm64" artifacts: - pyarrow-{no_rc_version}-{{ python_tag }}-{{ python_tag }}-macosx_11_0_arm64.whl -{% endfor %} {############################## Wheel Windows ################################} From 18394e828ac5f551b8c19738d3a3367dd4a7f888 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 15:41:17 +0900 Subject: [PATCH 07/12] Remove Homebrew's CMake --- dev/tasks/python-wheels/github.osx.arm64.yml | 127 ------------------- dev/tasks/python-wheels/github.osx.yml | 3 + 2 files changed, 3 insertions(+), 127 deletions(-) delete mode 100644 dev/tasks/python-wheels/github.osx.arm64.yml diff --git a/dev/tasks/python-wheels/github.osx.arm64.yml b/dev/tasks/python-wheels/github.osx.arm64.yml deleted file mode 100644 index bd05fd8dda1..00000000000 --- a/dev/tasks/python-wheels/github.osx.arm64.yml +++ /dev/null @@ -1,127 +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. - -# Prerequisites on the host: -# - brew install bash bison coreutils ninja cmake -# - sudo arrow/ci/scripts/install_python.sh macos 3.9 - -{% import 'macros.jinja' as macros with context %} - -{{ macros.github_header() }} - -env: - ARROW_JEMALLOC: "{{ arrow_jemalloc }}" - CC: "clang" - CMAKE_BUILD_TYPE: release - CXX: "clang++" - MACOSX_DEPLOYMENT_TARGET: "{{ macos_deployment_target }}" - PYARROW_BUILD_VERBOSE: 1 - PYARROW_VERSION: "{{ arrow.no_rc_version }}" - PYTHON_VERSION: "{{ python_version }}" - PYTHON: "/Library/Frameworks/Python.framework/Versions/{{ python_version }}/bin/python{{ python_version }}" - VCPKG_FEATURE_FLAGS: "manifests" - VCPKG_OVERLAY_TRIPLETS: {{ "${{ github.workspace }}/arrow/ci/vcpkg" }} - VCPKG_ROOT: {{ "${{ github.workspace }}/vcpkg" }} - -jobs: - build: - name: Build wheel for Python {{ python_version }} on macOS - runs-on: "macos-14" - steps: - - name: Cleanup - run: rm -rf arrow vcpkg build crossbow-env build-*-env test-*-env - - {{ macros.github_checkout_arrow()|indent }} - - - name: Add Brew's Bison to PATH - run: echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH - - - name: Retrieve VCPKG version from arrow/.env - run: | - vcpkg_version=$(cat "arrow/.env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"') - echo "VCPKG_VERSION=$vcpkg_version" >> $GITHUB_ENV - - - name: Install Vcpkg - env: - MACOSX_DEPLOYMENT_TARGET: "11.0" - run: arrow/ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION - - - name: Add Vcpkg to PATH - run: echo ${VCPKG_ROOT} >> $GITHUB_PATH - - - name: Install ARM64 Packages - env: - VCPKG_DEFAULT_TRIPLET: arm64-osx-static-release - run: | - vcpkg install \ - --clean-after-build \ - --x-install-root=${VCPKG_ROOT}/installed \ - --x-manifest-root=arrow/ci/vcpkg \ - --x-feature=azure \ - --x-feature=flight \ - --x-feature=gcs \ - --x-feature=json \ - --x-feature=parquet \ - --x-feature=s3 - - - name: Build ARM64 Wheel - env: - ARROW_SIMD_LEVEL: "DEFAULT" - VCPKG_DEFAULT_TRIPLET: arm64-osx-static-release - run: | - $PYTHON -m venv build-arm64-env - source build-arm64-env/bin/activate - pip install --upgrade pip wheel - arrow/ci/scripts/python_wheel_macos_build.sh arm64 $(pwd)/arrow $(pwd)/build - - - uses: actions/upload-artifact@v3 - with: - name: wheel - path: arrow/python/repaired_wheels/*.whl - - - name: Test Wheel on ARM64 - shell: bash - env: - PYTEST_ADDOPTS: "-k 'not test_cancellation'" - run: | - $PYTHON -m venv test-arm64-env - source test-arm64-env/bin/activate - pip install --upgrade pip wheel - # libffi has to be installed on the m1 runner which causes issues with - # the cffi wheel. We build cffi with the flags pointing to the correct libffi location. - LDFLAGS=-L$(brew --prefix libffi)/lib CFLAGS=-I$(brew --prefix libffi)/include \ - pip install cffi --no-binary :all: - pip install -r arrow/python/requirements-wheel-test.txt - PYTHON=python arrow/ci/scripts/install_gcs_testbench.sh default - arrow/ci/scripts/python_wheel_unix_test.sh $(pwd)/arrow - - - name: Upload artifacts - shell: bash - run: | - $PYTHON -m venv crossbow-env - source crossbow-env/bin/activate - arch -x86_64 pip install -e arrow/dev/archery[crossbow-upload] - arch -x86_64 archery crossbow \ - --queue-path $(pwd) \ - --queue-remote {{ queue_remote_url }} \ - upload-artifacts \ - --sha {{ task.branch }} \ - --tag {{ task.tag }} \ - "arrow/python/repaired_wheels/*.whl" - env: - CROSSBOW_GITHUB_TOKEN: {{ "${{ secrets.CROSSBOW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}" }} - - {{ macros.github_upload_gemfury("arrow/python/repaired_wheels/*.whl")|indent }} diff --git a/dev/tasks/python-wheels/github.osx.yml b/dev/tasks/python-wheels/github.osx.yml index 5b34bfc35a4..1f0f1c59099 100644 --- a/dev/tasks/python-wheels/github.osx.yml +++ b/dev/tasks/python-wheels/github.osx.yml @@ -46,6 +46,9 @@ jobs: - name: Install System Dependencies run: brew install bash bison coreutils ninja + - name: Remove Homebrew's CMake + run: brew uninstall cmake + - name: Install Specific CMake version uses: lukka/get-cmake@v3.21.2 From 0fb82651300b8edf777408a7090921305b36d7e0 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 15:43:20 +0900 Subject: [PATCH 08/12] Remove garbage --- dev/tasks/r/github.packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml index cf3fcd6a529..f23da3c8773 100644 --- a/dev/tasks/r/github.packages.yml +++ b/dev/tasks/r/github.packages.yml @@ -202,7 +202,7 @@ jobs: r-packages: needs: [source, windows-cpp, macos-cpp] - name: {{ '${{ matrix.platform.name }} ${{ matrix.r_version.r }}' }} + name: {{ '${{ matrix.platform.name }} ${{ matrix.r_version }}' }} runs-on: {{ '${{ matrix.platform.runs_on }}' }} strategy: fail-fast: false From ff19b9d7d8361bbad862238773c628ab89492e56 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 15:53:06 +0900 Subject: [PATCH 09/12] Debug --- dev/tasks/python-wheels/github.osx.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dev/tasks/python-wheels/github.osx.yml b/dev/tasks/python-wheels/github.osx.yml index 1f0f1c59099..4cf45c3a2f8 100644 --- a/dev/tasks/python-wheels/github.osx.yml +++ b/dev/tasks/python-wheels/github.osx.yml @@ -60,6 +60,20 @@ jobs: - name: Install Vcpkg run: arrow/ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION + - name: Install Vcpkg + if: failure() + run: | + set -x + ls -lah vcpkg/buildtrees/detect_compiler/ || : + if [ -x vcpkg/buildtrees/detect_compiler/ ]; then + for log in vcpkg/buildtrees/detect_compiler/*.log; do + echo ${log} + echo "----------" + cat ${log} + echo "----------" + done + fi + - name: Add Vcpkg to PATH run: echo ${VCPKG_ROOT} >> $GITHUB_PATH From faad00e2ab4dd489519d6fdd83b2457cf4474dcb Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 16:38:03 +0900 Subject: [PATCH 10/12] Debug --- dev/tasks/python-wheels/github.osx.yml | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/dev/tasks/python-wheels/github.osx.yml b/dev/tasks/python-wheels/github.osx.yml index 4cf45c3a2f8..bd10c089c84 100644 --- a/dev/tasks/python-wheels/github.osx.yml +++ b/dev/tasks/python-wheels/github.osx.yml @@ -60,20 +60,6 @@ jobs: - name: Install Vcpkg run: arrow/ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION - - name: Install Vcpkg - if: failure() - run: | - set -x - ls -lah vcpkg/buildtrees/detect_compiler/ || : - if [ -x vcpkg/buildtrees/detect_compiler/ ]; then - for log in vcpkg/buildtrees/detect_compiler/*.log; do - echo ${log} - echo "----------" - cat ${log} - echo "----------" - done - fi - - name: Add Vcpkg to PATH run: echo ${VCPKG_ROOT} >> $GITHUB_PATH @@ -106,6 +92,20 @@ jobs: --x-feature=parquet \ --x-feature=s3 + - name: Install Vcpkg + if: failure() + run: | + set -x + ls -lah vcpkg/buildtrees/detect_compiler/ || : + if [ -x vcpkg/buildtrees/detect_compiler/ ]; then + for log in vcpkg/buildtrees/detect_compiler/*.log; do + echo ${log} + echo "----------" + cat ${log} + echo "----------" + done + fi + - name: Install Python {{ python_version }} run: sudo arrow/ci/scripts/install_python.sh macos {{ python_version }} From 6ca82930ceec60151f86e3c2a2fcae6627f11980 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 16:56:23 +0900 Subject: [PATCH 11/12] Remove ccache --- dev/tasks/python-wheels/github.osx.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dev/tasks/python-wheels/github.osx.yml b/dev/tasks/python-wheels/github.osx.yml index bd10c089c84..66f64d747c0 100644 --- a/dev/tasks/python-wheels/github.osx.yml +++ b/dev/tasks/python-wheels/github.osx.yml @@ -22,7 +22,6 @@ env: ARROW_JEMALLOC: "{{ arrow_jemalloc }}" CC: "clang" CMAKE_BUILD_TYPE: release - CMAKE_CXX_COMPILER_LAUNCHER: "ccache" CXX: "clang++" MACOSX_DEPLOYMENT_TARGET: "{{ macos_deployment_target }}" PYARROW_BUILD_VERBOSE: 1 @@ -92,7 +91,7 @@ jobs: --x-feature=parquet \ --x-feature=s3 - - name: Install Vcpkg + - name: Debug if: failure() run: | set -x From de8ae54ff751d194cf193e916dddb4dc3801cf27 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 10 Mar 2024 22:19:14 +0900 Subject: [PATCH 12/12] Use Homebrew's CMake and Bison --- dev/tasks/python-wheels/github.osx.yml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/dev/tasks/python-wheels/github.osx.yml b/dev/tasks/python-wheels/github.osx.yml index 66f64d747c0..11bdf031f51 100644 --- a/dev/tasks/python-wheels/github.osx.yml +++ b/dev/tasks/python-wheels/github.osx.yml @@ -43,13 +43,9 @@ jobs: {{ macros.github_checkout_arrow()|indent }} - name: Install System Dependencies - run: brew install bash bison coreutils ninja - - - name: Remove Homebrew's CMake - run: brew uninstall cmake - - - name: Install Specific CMake version - uses: lukka/get-cmake@v3.21.2 + run: | + brew install bash bison coreutils ninja + echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH - name: Retrieve VCPKG version from arrow/.env run: | @@ -91,20 +87,6 @@ jobs: --x-feature=parquet \ --x-feature=s3 - - name: Debug - if: failure() - run: | - set -x - ls -lah vcpkg/buildtrees/detect_compiler/ || : - if [ -x vcpkg/buildtrees/detect_compiler/ ]; then - for log in vcpkg/buildtrees/detect_compiler/*.log; do - echo ${log} - echo "----------" - cat ${log} - echo "----------" - done - fi - - name: Install Python {{ python_version }} run: sudo arrow/ci/scripts/install_python.sh macos {{ python_version }}