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
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: CI

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

jobs:
pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install pre-commit
run: python -m pip install pre-commit

- name: Run pre-commit hooks
run: pre-commit run --all-files

cmake:
name: CMake configure
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y ninja-build

- name: Configure
run: cmake -S . -B build -G Ninja -DPAIMON_BUILD_TESTS=ON

- name: Build
run: cmake --build build --parallel
34 changes: 34 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

cmake_minimum_required(VERSION 3.16)
project(paimon VERSION 0.1.0 LANGUAGES C CXX)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")

include(GNUInstallDirs)
include(DefineOptions)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

include(san-config)

if(PAIMON_BUILD_TESTS)
enable_testing()
endif()
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
Copyright (c) 2011 The LevelDB Authors. All rights reserved.

This product includes software from cppjieba project (MIT)
Copyright 2013
Copyright 2013
14 changes: 10 additions & 4 deletions cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,12 @@ function(paimon_enforce_patched_dependency_policy)
elseif(_arrow_source STREQUAL "AUTO")
message(STATUS "Forcing Arrow_SOURCE to BUNDLED because paimon-cpp requires "
"project-specific Arrow patches")
set(Arrow_SOURCE "BUNDLED"
set(Arrow_SOURCE
"BUNDLED"
CACHE STRING "Dependency source for Arrow" FORCE)
set(Arrow_SOURCE "BUNDLED" PARENT_SCOPE)
set(Arrow_SOURCE
"BUNDLED"
PARENT_SCOPE)
endif()

if(PAIMON_ENABLE_ORC)
Expand All @@ -435,9 +438,12 @@ function(paimon_enforce_patched_dependency_policy)
elseif(_orc_source STREQUAL "AUTO")
message(STATUS "Forcing ORC_SOURCE to BUNDLED because paimon-cpp requires "
"project-specific ORC patches")
set(ORC_SOURCE "BUNDLED"
set(ORC_SOURCE
"BUNDLED"
CACHE STRING "Dependency source for ORC" FORCE)
set(ORC_SOURCE "BUNDLED" PARENT_SCOPE)
set(ORC_SOURCE
"BUNDLED"
PARENT_SCOPE)
endif()
endif()
endfunction()
Expand Down