diff --git a/.github/.licenserc.yaml b/.github/.licenserc.yaml new file mode 100644 index 000000000..35c9500c7 --- /dev/null +++ b/.github/.licenserc.yaml @@ -0,0 +1,33 @@ +# Copyright 2024-present Alibaba Inc. +# +# Licensed 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. + +header: + license: + spdx-id: Apache-2.0 + copyright-owner: Alibaba Inc. + + paths: + - '**' + + paths-ignore: + - '**/.gitignore' + - '.github/**' + - 'test/test_data/**' + - 'LICENSE' + - 'NOTICE' + - 'third_party/**' + - '**/*.svg' + - '**/*.diff' + + comment: on-failure diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 000000000..fd8519543 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,52 @@ +# Copyright 2024-present Alibaba Inc. +# +# Licensed 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: Test + +on: + push: + branches: + - '**' + tags: + - '**' + pull_request: + +concurrency: + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} + cancel-in-progress: true + +permissions: + contents: read + +env: + PAIMON_HOME: /tmp/paimon + +jobs: + ubuntu: + name: AMD64 Ubuntu 24.04 + runs-on: ubuntu-24.04 + timeout-minutes: 120 + strategy: + fail-fast: false + steps: + - name: Checkout paimon-cpp + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + lfs: true + - name: Build Paimon + shell: bash + env: + CC: clang + CXX: clang++ + run: ci/scripts/build_paimon.sh $(pwd) ON diff --git a/ci/scripts/build_paimon.sh b/ci/scripts/build_paimon.sh new file mode 100755 index 000000000..c6e2fbbca --- /dev/null +++ b/ci/scripts/build_paimon.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# +# Copyright 2024-present Alibaba Inc. +# +# Licensed 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. + +set -eux + +source_dir=${1} +build_dir=${1}/build + +mkdir ${build_dir} +pushd ${build_dir} + +CMAKE_ARGS=( + "-G Ninja" + "-DCMAKE_BUILD_TYPE=Debug" + "-DPAIMON_BUILD_TESTS=ON" + "-DPAIMON_ENABLE_LANCE=ON" + "-DPAIMON_ENABLE_JINDO=ON" +) + +cmake "${CMAKE_ARGS[@]}" ${source_dir} +cmake --build . -- -j$(nproc) +ctest --output-on-failure -j $(nproc) + +popd + +rm -rf ${build_dir}