Skip to content

Commit 710d7d1

Browse files
authored
Merge pull request #5 from lriggs/local_dremio_27_20
DX-110305 Use vcpkg on mac builds to install llvm. This removes the z…
2 parents 9035d6c + 08116e2 commit 710d7d1

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

.github/workflows/jarbuild.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ jobs:
158158
jni-macos:
159159
name: JNI ${{ matrix.platform.runs_on }} ${{ matrix.platform.arch }}
160160
runs-on: ${{ matrix.platform.runs_on }}
161-
timeout-minutes: 45
161+
timeout-minutes: 445
162162
needs:
163163
- source
164164
strategy:
165165
fail-fast: false
166166
matrix:
167167
platform:
168168
- { runs_on: macos-15-intel, arch: "x86_64"}
169-
- { runs_on: macos-14, arch: "aarch_64" }
169+
- { runs_on: macos-15, arch: "aarch_64" }
170170
env:
171171
MACOSX_DEPLOYMENT_TARGET: "14.0"
172172
steps:
@@ -205,20 +205,19 @@ jobs:
205205
python-version: 3.12
206206
- name: Install Archery
207207
run: pip install -e arrow/dev/archery[all]
208+
- name: Checkout vcpkg
209+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
210+
with:
211+
repository: Microsoft/vcpkg
212+
path: arrow/cpp/submodules/vcpkg
213+
- name: Install vcpkg
214+
run: |
215+
cd arrow/cpp/submodules/vcpkg
216+
./bootstrap-vcpkg.sh
217+
echo "VCPKG_ROOT=${PWD}/arrow/cpp/submodules/vcpkg" >> ${GITHUB_ENV}
218+
echo "${PWD}/arrow/cpp/submodules/vcpkg" >> ${GITHUB_PATH}
208219
- name: Install dependencies
209220
run: |
210-
# We want to use llvm@14 to avoid shared z3
211-
# dependency. llvm@14 doesn't depend on z3 and llvm depends
212-
# on z3. And Homebrew's z3 provides only shared library. It
213-
# doesn't provides static z3 because z3's CMake doesn't accept
214-
# building both shared and static libraries at once.
215-
# See also: Z3_BUILD_LIBZ3_SHARED in
216-
# https://github.com/Z3Prover/z3/blob/master/README-CMake.md
217-
#
218-
# If llvm is installed, Apache Arrow C++ uses llvm rather than
219-
# llvm@14 because llvm is newer than llvm@14.
220-
brew uninstall llvm || :
221-
222221
# Ensure updating python@XXX with the "--overwrite" option.
223222
# If python@XXX is updated without "--overwrite", it causes
224223
# a conflict error. Because Python 3 installed not by
@@ -240,7 +239,13 @@ jobs:
240239
brew uninstall pkg-config@0.29.2 || :
241240
fi
242241
242+
# Install basic build tools via brew (vcpkg needs these)
243+
brew install cmake ninja pkg-config
243244
brew bundle --file=arrow/cpp/Brewfile
245+
246+
# Clean up any existing LLVM installations in favor of vcpkg.
247+
brew uninstall llvm || :
248+
244249
# We want to link aws-sdk-cpp statically but Homebrew's
245250
# aws-sdk-cpp provides only shared library. If we have
246251
# Homebrew's aws-sdk-cpp, our build mix Homebrew's
@@ -259,6 +264,14 @@ jobs:
259264
# bundled Protobuf.
260265
brew uninstall protobuf
261266
267+
# Use vcpkg to install LLVM.
268+
vcpkg install \
269+
--clean-after-build \
270+
--x-install-root=${VCPKG_ROOT}/installed \
271+
--x-manifest-root=arrow/ci/vcpkg \
272+
--overlay-ports=arrow/ci/vcpkg/overlay/llvm/ \
273+
--x-feature=gandiva-llvm
274+
262275
brew bundle --file=Brewfile
263276
- name: Prepare ccache
264277
run: |

0 commit comments

Comments
 (0)