diff --git a/dev/tasks/homebrew-formulae/apache-arrow.rb b/dev/tasks/homebrew-formulae/apache-arrow.rb index 9086fdaae4ab4..f5d7ff36ea041 100644 --- a/dev/tasks/homebrew-formulae/apache-arrow.rb +++ b/dev/tasks/homebrew-formulae/apache-arrow.rb @@ -57,7 +57,8 @@ class ApacheArrow < Formula fails_with gcc: "5" def install - # https://github.com/Homebrew/homebrew-core/issues/76537 + # This isn't for https://github.com/Homebrew/homebrew-core/issues/76537 . + # This may improve performance. ENV.runtime_cpu_detection if Hardware::CPU.intel? # link against system libc++ instead of llvm provided libc++ @@ -90,6 +91,11 @@ def install -DARROW_WITH_ZSTD=ON -DPARQUET_BUILD_EXECUTABLES=ON ] + # Disable runtime SIMD dispatch. It may cause "illegal opcode" + # error on Intel Mac because of one-definition-rule violation. + # + # https://github.com/apache/arrow/issues/36685 + args << "-DARROW_RUNTIME_SIMD_LEVEL=NONE" if OS.mac? and Hardware::CPU.intel? system "cmake", "-S", "cpp", "-B", "build", *args, *std_cmake_args system "cmake", "--build", "build" diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja index 475494af18ce6..1f2f9a72975eb 100644 --- a/dev/tasks/macros.jinja +++ b/dev/tasks/macros.jinja @@ -214,6 +214,7 @@ on: # see https://github.com/actions/runner-images/issues/6868 brew install --overwrite python@3.11 python@3.10 + set -x ARROW_GLIB_FORMULA=$(echo ${ARROW_FORMULA} | sed -e 's/\.rb/-glib.rb/') echo "ARROW_GLIB_FORMULA=${ARROW_GLIB_FORMULA}" >> ${GITHUB_ENV} for formula in ${ARROW_FORMULA} ${ARROW_GLIB_FORMULA}; do @@ -223,11 +224,12 @@ on: # Pin the current commit in the formula to test so that # we're not always pulling from the tip of the default branch sed -i '' -E \ - -e 's@https://github.com/apache/arrow.git"$@{{ arrow.remote }}.git", revision: "{{ arrow.head }}"@' \ + -e 's@https://github.com/apache/arrow.git", branch: "main"$@{{ arrow.remote }}.git", revision: "{{ arrow.head }}"@' \ ${formula} # Sometimes crossbow gives a remote URL with .git and sometimes not. # Make sure there's only one sed -i '' -E -e 's@.git.git@.git@' ${formula} + cat ${formula} cp ${formula} $(brew --repository homebrew/core)/Formula/ done {% endmacro %} diff --git a/dev/tasks/r/github.macos.brew.yml b/dev/tasks/r/github.macos.brew.yml index dea7564c5f80f..8a0e6f6bb96e3 100644 --- a/dev/tasks/r/github.macos.brew.yml +++ b/dev/tasks/r/github.macos.brew.yml @@ -24,21 +24,33 @@ jobs: name: "Homebrew + R package" runs-on: macOS-11 steps: + - name: Show system information + run: | + sysctl hw.optional machdep.cpu + {{ macros.github_checkout_arrow()|indent }} {{ macros.configure_homebrew_arrow(formula)|indent }} - name: Install apache-arrow env: - {{ macros.github_set_sccache_envvars()|indent(8)}} + {{ macros.github_set_sccache_envvars()|indent(8)}} run: | - brew install sccache # for testing brew install minio - + # TODO(ARROW-16907): apache/arrow@main seems to be installed already # so this does nothing on a branch/PR - brew install -v --HEAD apache-arrow + brew install -v --HEAD {{ '$(brew --repository homebrew/core)/Formula/apache-arrow.rb' }} + + mkdir -p homebrew-logs + cp -a ~/Library/Logs/Homebrew/apache-arrow homebrew-logs/ + - name: Save logs + if: always() + uses: actions/upload-artifact@v2 + with: + name: homebrew-logs + path: homebrew-logs - uses: r-lib/actions/setup-r@v2 - name: Install dependencies