Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/actions/setup-ccache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ runs:
steps:
- name: Install ccache
shell: bash
run: sudo apt-get update && sudo apt-get install -y ccache
run: |
if [[ "${RUNNER_OS}" == "macOS" ]]; then
brew install ccache
else
sudo apt-get update && sudo apt-get install -y ccache
fi

- name: Restore ccache
uses: actions/cache@v4
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,56 @@ jobs:
shell: bash
run: ci/scripts/test_asan_symbolize.sh

macos-build-and-test:
name: appleclang-release-arm64
runs-on: macos-15
timeout-minutes: 180
env:
CC: /usr/bin/clang
CXX: /usr/bin/clang++
PAIMON_BUILD_JOBS: '3'
CARGO_BUILD_JOBS: '3'
steps:
- name: Checkout paimon-cpp
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
lfs: true
- name: Install build dependencies
shell: bash
run: |
brew install cmake ninja protobuf openssl@3 curl
echo "$(brew --prefix protobuf)/bin" >> "$GITHUB_PATH"
echo "CMAKE_PREFIX_PATH=$(brew --prefix openssl@3):$(brew --prefix curl)" >> "$GITHUB_ENV"
- name: Setup ccache
uses: ./.github/actions/setup-ccache
with:
cache-key-prefix: ccache-appleclang-release-arm64
- name: Install Rust and protobuf tools
shell: bash
run: ci/scripts/setup_rust.sh
- name: Install flatc and libclang (Vortex)
shell: bash
run: ci/scripts/setup_flatc.sh
- name: Build, test and verify installation
shell: bash
run: |
ci/scripts/build_paimon.sh \
--source_dir "$(pwd)" \
--build_type Release \
--install_smoke
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: appleclang-release-arm64-test-logs
path: |
build/build/test-logs/
build/Testing/Temporary/
build/CMakeFiles/CMakeConfigureLog.yaml
- name: Show ccache statistics
if: always()
run: ccache -s

build-and-test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner || 'ubuntu-24.04' }}
Expand Down
4 changes: 2 additions & 2 deletions ci/scripts/build_paimon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ if [[ "${enable_tsan}" == "true" ]]; then
fi
# CI always builds natively, so the host architecture is the target architecture.
host_arch=$(uname -m)
if [[ "${host_arch}" != "x86_64" ]]; then
if [[ "$(uname -s)" != "Linux" || "${host_arch}" != "x86_64" ]]; then
ENABLE_LUMINA="OFF"
echo "=== Lumina disabled: no prebuilt artifacts for ${host_arch} ==="
echo "=== Lumina disabled: no prebuilt artifacts for $(uname -s)-${host_arch} ==="
fi
if [[ "${verify_full_text_archives}" == "true" && "${ENABLE_FULL_TEXT}" != "ON" ]]; then
echo "--verify_full_text_archives requires the full-text index, which this build disables" >&2
Expand Down
15 changes: 13 additions & 2 deletions ci/scripts/setup_flatc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ FLATC_INSTALL_DIR=${FLATC_INSTALL_DIR:-"${HOME}/.local/bin"}

# Vortex's native dependencies invoke bindgen in their build scripts, which loads libclang at
# build time. Images that only carry GCC (e.g. the gcc8 test container) may lack it.
if ! ldconfig -p 2>/dev/null | grep -q 'libclang'; then
if [[ "$(uname -s)" == "Darwin" ]]; then
if ! brew --prefix llvm >/dev/null 2>&1; then
brew install llvm
fi
export LIBCLANG_PATH="$(brew --prefix llvm)/lib"
echo "LIBCLANG_PATH=${LIBCLANG_PATH}" >>"${GITHUB_ENV:-/dev/null}" || true
elif ! ldconfig -p 2>/dev/null | grep -q 'libclang'; then
if [[ "$(id -u)" -ne 0 ]] && command -v sudo >/dev/null 2>&1; then
apt_prefix="sudo"
else
Expand All @@ -63,7 +69,12 @@ git clone --depth 1 --branch "v${FLATBUFFERS_VERSION}" \
cmake -S "${workdir}/flatbuffers" -B "${workdir}/build" \
-DCMAKE_BUILD_TYPE=Release \
-DFLATBUFFERS_BUILD_TESTS=OFF
cmake --build "${workdir}/build" --target flatc -j "$(nproc)"
if command -v nproc >/dev/null 2>&1; then
build_jobs=$(nproc)
else
build_jobs=$(sysctl -n hw.ncpu)
fi
cmake --build "${workdir}/build" --target flatc -j "${build_jobs}"

mkdir -p "${FLATC_INSTALL_DIR}"
install -m 0755 "${workdir}/build/flatc" "${FLATC_INSTALL_DIR}/flatc"
Expand Down
21 changes: 11 additions & 10 deletions cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1558,16 +1558,17 @@ macro(build_vortex)
PROPERTIES IMPORTED_LOCATION "${VORTEX_STATIC_LIB}"
INTERFACE_INCLUDE_DIRECTORIES
"${VORTEX_INCLUDE_DIR}")
# System libraries required to link the Rust static archive on Linux (per Vortex's own
# vortex-ffi/cmake/SystemDependencies.cmake).
target_link_libraries(paimon_vortex_ffi
INTERFACE gcc_s
util
rt
Threads::Threads
m
${CMAKE_DL_LIBS}
c)
# System libraries required to link the Rust static archive.
target_link_libraries(paimon_vortex_ffi INTERFACE Threads::Threads m ${CMAKE_DL_LIBS}
c)
if(APPLE)
target_link_libraries(paimon_vortex_ffi
INTERFACE iconv "-framework Security"
"-framework SystemConfiguration"
"-framework CoreFoundation")
else()
target_link_libraries(paimon_vortex_ffi INTERFACE gcc_s util rt)
endif()
add_dependencies(paimon_vortex_ffi vortex_ep)

install(FILES "${VORTEX_STATIC_LIB}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
Expand Down
Loading