Skip to content

Commit b4e2c1c

Browse files
authored
chore: add test for workflows (#3)
add test workflows for clang
1 parent f19f854 commit b4e2c1c

File tree

3 files changed

+124
-0
lines changed

3 files changed

+124
-0
lines changed

.github/.licenserc.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright 2024-present Alibaba Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
header:
16+
license:
17+
spdx-id: Apache-2.0
18+
copyright-owner: Alibaba Inc.
19+
20+
paths:
21+
- '**'
22+
23+
paths-ignore:
24+
- '**/.gitignore'
25+
- '.github/**'
26+
- 'test/test_data/**'
27+
- 'LICENSE'
28+
- 'NOTICE'
29+
- 'third_party/**'
30+
- '**/*.svg'
31+
- '**/*.diff'
32+
33+
comment: on-failure

.github/workflows/test.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright 2024-present Alibaba Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Test
16+
17+
on:
18+
push:
19+
branches:
20+
- '**'
21+
tags:
22+
- '**'
23+
pull_request:
24+
25+
concurrency:
26+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
27+
cancel-in-progress: true
28+
29+
permissions:
30+
contents: read
31+
32+
env:
33+
PAIMON_HOME: /tmp/paimon
34+
35+
jobs:
36+
ubuntu:
37+
name: AMD64 Ubuntu 24.04
38+
runs-on: ubuntu-24.04
39+
timeout-minutes: 120
40+
strategy:
41+
fail-fast: false
42+
steps:
43+
- name: Checkout paimon-cpp
44+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
45+
with:
46+
lfs: true
47+
- name: Build Paimon
48+
shell: bash
49+
env:
50+
CC: clang
51+
CXX: clang++
52+
run: ci/scripts/build_paimon.sh $(pwd) ON

ci/scripts/build_paimon.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2024-present Alibaba Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -eux
18+
19+
source_dir=${1}
20+
build_dir=${1}/build
21+
22+
mkdir ${build_dir}
23+
pushd ${build_dir}
24+
25+
CMAKE_ARGS=(
26+
"-G Ninja"
27+
"-DCMAKE_BUILD_TYPE=Debug"
28+
"-DPAIMON_BUILD_TESTS=ON"
29+
"-DPAIMON_ENABLE_LANCE=ON"
30+
"-DPAIMON_ENABLE_JINDO=ON"
31+
)
32+
33+
cmake "${CMAKE_ARGS[@]}" ${source_dir}
34+
cmake --build . -- -j$(nproc)
35+
ctest --output-on-failure -j $(nproc)
36+
37+
popd
38+
39+
rm -rf ${build_dir}

0 commit comments

Comments
 (0)