Skip to content

Commit

Permalink
Build Arrow from scratch for dev cookbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Jan 28, 2025
1 parent b7bc248 commit 4313a1e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy_development_cookbooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ jobs:
run:
echo ${CONDA_PREFIX}
- name: Build cookbook
env:
- ARROW_NIGHTLY: 1
run:
make cpp
- name: Upload cpp book
Expand Down
37 changes: 30 additions & 7 deletions cpp/code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,37 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
endif()

# Add Arrow and other required packages
find_package(Arrow REQUIRED)
if(NOT ${ARROW_VERSION} VERSION_GREATER "9.0.0")
get_filename_component(ARROW_CMAKE_BASE_DIR ${Arrow_CONFIG} DIRECTORY)
list(INSERT CMAKE_MODULE_PATH 0 ${ARROW_CMAKE_BASE_DIR})
if(DEFINED ENV{ARROW_NIGHTLY})
set(CMAKE_BUILD_TYPE Debug)
set(ARROW_BUILD_SHARED True)
set(ARROW_DEPENDENCY_SOURCE "AUTO")
set(ARROW_SIMD_LEVEL NONE) # macOS-specific workaround
set(ARROW_ENABLE_THREADING ON)

set(ARROW_ACERO ON)
set(ARROW_COMPUTE ON)
set(ARROW_DATASET ON)
set(ARROW_FILESYSTEM ON)
set(ARROW_IPC ON)
set(ARROW_FLIGHT ON)
set(ARROW_PARQUET ON)

include(FetchContent)

FetchContent_Declare(Arrow
GIT_REPOSITORY https://github.com/apache/arrow.git
GIT_TAG main
GIT_SHALLOW TRUE SOURCE_SUBDIR cpp
OVERRIDE_FIND_PACKAGE
)

FetchContent_MakeAvailable(Arrow)
else()
find_package(Arrow REQUIRED)
find_package(ArrowDataset REQUIRED)
find_package(ArrowFlight REQUIRED)
find_package(Parquet REQUIRED)
endif()
find_package(ArrowDataset REQUIRED)
find_package(ArrowFlight REQUIRED)
find_package(Parquet REQUIRED)

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_CLANG_TIDY "clang-tidy")
Expand Down
3 changes: 0 additions & 3 deletions cpp/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@

name: cookbook-cpp-dev
channels:
- arrow-nightlies
- conda-forge
dependencies:
- python=3.9
- compilers
- arrow-nightlies::libarrow
- sphinx
- gtest
- gmock
- arrow-nightlies::pyarrow
- clang-tools
- zlib

0 comments on commit 4313a1e

Please sign in to comment.