Skip to content

DX-114802: Upgrade Java JAR build workflow with modern improvements (dremio_26.1_18.1.0)#126

Draft
timhurskidremio wants to merge 18 commits intodremio:dremio_26.1_18.1.0from
timhurskidremio:upgrade-java-jars-workflow-dremio_26.1_18.1.0
Draft

DX-114802: Upgrade Java JAR build workflow with modern improvements (dremio_26.1_18.1.0)#126
timhurskidremio wants to merge 18 commits intodremio:dremio_26.1_18.1.0from
timhurskidremio:upgrade-java-jars-workflow-dremio_26.1_18.1.0

Conversation

@timhurskidremio
Copy link

@timhurskidremio timhurskidremio commented Feb 26, 2026

  • Update GitHub Actions to v4+ with SHA pinning
  • Add ARM64 support for Ubuntu and macOS
  • Use vcpkg for LLVM to remove z3 runtime dependency
  • Add disk space cleanup for macOS runners
  • Add disk space monitoring throughout build
  • Enhance testing for ARM64 libraries

     - Update GitHub Actions to v4+ with SHA pinning
     - Add ARM64 support for Ubuntu and macOS
     - Use vcpkg for LLVM to remove z3 runtime dependency
     - Add disk space cleanup for macOS runners
     - Add disk space monitoring throughout build
     - Enhance testing for ARM64 libraries

     Ref: DX-103340
@timhurskidremio timhurskidremio force-pushed the upgrade-java-jars-workflow-dremio_26.1_18.1.0 branch from b5cb6b6 to 2681868 Compare February 26, 2026 05:13
timhurskidremio and others added 16 commits February 25, 2026 23:46
- Remove redundant 'virtual' keyword from lvalue.h:123 (already has 'override')
- Replace 'unsigned long' with 'auto' in encrypt_utils_common.cc to avoid C type lint warning
Change from deprecated 'macos-13' to 'macos-13-large' for x86_64 builds.
The 'macos-13-us-default' configuration is no longer supported by GitHub Actions.
Replace deprecated 'macos-13' with 'macos-13-large' for AMD64 builds in:
- C++ workflow (.github/workflows/cpp.yml)
- Python workflow (.github/workflows/python.yml)
- MATLAB workflow (.github/workflows/matlab.yml)

The 'macos-13-us-default' configuration is no longer supported by GitHub Actions.
Using explicit runs-on matrix values to specify macos-13-large for x86_64 and macos-14 for ARM64.
…13-large

According to GitHub Actions runner-images documentation, macos-13 and macos-13-large
do not exist. The available x86_64 (AMD64) runners are:
- macos-14-large (oldest available)
- macos-15-large
- macos-26-large (newest)

Updated all workflows to use macos-14-large for AMD64 builds:
- C++ workflow (.github/workflows/cpp.yml)
- Python workflow (.github/workflows/python.yml)
- MATLAB workflow (.github/workflows/matlab.yml)
- Java JARs workflow (dev/tasks/java-jars/github.yml)
Update to match upstream Apache Arrow main branch:
- Use correct URL format: /releases/download/v.../googletest-... instead of /archive/release-...
- Use correct SHA256 checksum: 65fab701... (for googletest-1.17.0.tar.gz from releases)
  instead of d5558cd4... (for archive/release-1.17.0.tar.gz)

This fixes the 404 error when downloading GoogleTest from Apache JFrog Artifactory,
as the mirror expects the same file format as the upstream GitHub release.
The CMake build was using hardcoded old GoogleTest URL format in
ThirdpartyToolchain.cmake, which overrode the fix in versions.txt.

Changed from:
- /archive/release-1.17.0.tar.gz (404 error)
- Chromium mirror (also 404)

To:
- /releases/download/v1.17.0/googletest-1.17.0.tar.gz (works!)

Also removed the Chromium mirror as it doesn't have GoogleTest 1.17.0.

Tested locally on macOS ARM64 - build completes successfully.
The FindLLVMAlt.cmake script was failing when trying to find old LLVM versions
(llvm@13, llvm@11, llvm@10, llvm@9, llvm@8, llvm@7) that no longer exist in
Homebrew. The 'brew --prefix llvm@XX' command would error out and cause CMake
configuration to fail.

Changes:
- Added ERROR_QUIET to execute_process() to suppress brew errors
- Added check to only append LLVM_BREW_PREFIX if it's not empty

This allows CMake to gracefully try multiple LLVM versions and use the first
one that exists (e.g., llvm@14, llvm@15, etc.).
Add LLVM path detection logic that:
- Determines vcpkg triplet based on architecture
- Sets LLVM_DIR to point to vcpkg-installed LLVM when VCPKG_ROOT_LOCAL is set
- Configures CMAKE_OSX_SYSROOT for proper SDK detection
- Sets ARROW_GANDIVA_PC_CXX_FLAGS for C++ headers
- Uses vcpkg's RE2 for ABI compatibility with LLVM/Abseil

This matches the build script from dremio-arrow-java.
vcpkg installs LLVM 21.1.1 via the overlay, but the ARROW_LLVM_VERSIONS
list only went up to 19.1, causing CMake's FindLLVMAlt.cmake to reject
the installed LLVM as incompatible.

Use 21.1 (not just 21) to match CMake's version compatibility rules
which require MAJOR.MINOR format for proper matching.
@timhurskidremio timhurskidremio force-pushed the upgrade-java-jars-workflow-dremio_26.1_18.1.0 branch from 27f7912 to 9a691ec Compare March 12, 2026 03:22
The macOS CI runner has Homebrew's Boost 1.90.0 installed, but it's
missing the 'system' component. This causes Arrow's ThirdpartyToolchain
to detect the partial installation and then attempt to build Boost from
source as a fallback. However, this creates a conflict because some
Boost targets (like Boost::filesystem) were already imported from the
system Boost before the fallback was triggered.

Setting Boost_SOURCE=BUNDLED tells Arrow to ignore the system Boost
entirely and build all components from source, avoiding the conflict.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants