Skip to content

Commit a4f6fe5

Browse files
authored
chore: add github workflows and update asf yaml (#144)
1 parent b7d8f52 commit a4f6fe5

18 files changed

Lines changed: 550 additions & 198 deletions

.asf.yaml

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
# https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features
2222

2323
github:
24-
description: "Apache Paimon C++"
24+
description: "Paimon-cpp is a high-performance C++ implementation of Apache Paimon."
2525
homepage: https://paimon.apache.org/
26+
ghp_branch: gh-pages
27+
ghp_path: /
2628
labels:
2729
- paimon
2830
- apache
@@ -31,17 +33,47 @@ github:
3133
merge: false
3234
squash: true
3335
rebase: false
34-
protected_branches:
35-
main:
36+
rulesets:
37+
- name: "Branch Protection"
38+
type: branch
39+
branches:
40+
includes:
41+
- "~DEFAULT_BRANCH"
42+
- "release-*"
43+
excludes: []
44+
restrict_deletion: true
45+
restrict_force_push: true
46+
required_linear_history: true
47+
required_conversation_resolution: true
3648
required_pull_request_reviews:
49+
dismiss_stale_reviews: true
50+
require_last_push_approval: true
3751
required_approving_review_count: 1
38-
required_linear_history: true
52+
required_status_checks:
53+
- name: "pre-commit"
54+
app_slug: -1
55+
- name: "gcc-test"
56+
app_slug: -1
57+
- name: "rat-license-check"
58+
app_slug: -1
59+
- name: "test-with-sanitizer"
60+
app_slug: -1
61+
- name: "clang-release"
62+
app_slug: -1
63+
- name: "gcc-release"
64+
app_slug: -1
65+
- name: "clang-test"
66+
app_slug: -1
67+
- name: "gcc8-test"
68+
app_slug: -1
3969
pull_requests:
40-
del_branch_on_merge: true
70+
allow_auto_merge: false
71+
allow_update_branch: true
72+
del_branch_on_merge: false
4173
features:
4274
wiki: true
4375
issues: true
44-
projects: true
76+
projects: false
4577

4678
notifications:
4779
commits: commits@paimon.apache.org

.github/workflows/build_docs.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. 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,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: "Publish Docs"
19+
20+
on:
21+
push:
22+
branches:
23+
- main
24+
paths:
25+
- 'apidoc/**'
26+
- 'docs/**'
27+
- 'include/**'
28+
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.ref }}
31+
cancel-in-progress: false
32+
33+
permissions:
34+
contents: write
35+
36+
jobs:
37+
docs:
38+
runs-on: ubuntu-24.04
39+
40+
steps:
41+
- uses: actions/checkout@v6.0.1
42+
with:
43+
fetch-depth: 1
44+
45+
- uses: actions/setup-python@v6
46+
with:
47+
python-version: '3.x'
48+
49+
- name: Install dependencies
50+
run: |
51+
sudo apt-get update
52+
sudo apt-get install -y doxygen
53+
pip install -r docs/requirements.txt
54+
55+
- name: Build API
56+
run: |
57+
cd ./apidoc
58+
doxygen
59+
cd -
60+
61+
- name: Build Docs
62+
run: |
63+
cd docs
64+
make html
65+
mkdir -p /tmp/site
66+
cp -r ./_build/html/* /tmp/site/
67+
touch /tmp/site/.nojekyll
68+
cd -
69+
70+
- name: Deploy to gh-pages
71+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
72+
run: |
73+
git config --global user.name 'GitHub Actions'
74+
git config --global user.email 'actions@github.com'
75+
76+
git checkout --orphan gh-pages-tmp
77+
git rm --quiet -rf .
78+
cp -r /tmp/site/. .
79+
git add --all
80+
git commit -m "Publish docs from commit ${{ github.sha }}"
81+
git push -f origin gh-pages-tmp:gh-pages
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. 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,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Build Release
19+
20+
on:
21+
push:
22+
branches:
23+
- '**'
24+
tags:
25+
- '**'
26+
pull_request:
27+
28+
concurrency:
29+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
30+
cancel-in-progress: true
31+
32+
permissions:
33+
contents: read
34+
35+
jobs:
36+
clang-release:
37+
runs-on: ubuntu-24.04
38+
timeout-minutes: 120
39+
strategy:
40+
fail-fast: false
41+
steps:
42+
- name: Checkout paimon-cpp
43+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
44+
with:
45+
lfs: true
46+
- name: Setup ccache
47+
uses: ./.github/actions/setup-ccache
48+
with:
49+
cache-key-prefix: ccache-clang-release
50+
- name: Build Paimon
51+
shell: bash
52+
env:
53+
CC: clang
54+
CXX: clang++
55+
run: ci/scripts/build_paimon.sh $(pwd) false false Release
56+
- name: Show ccache statistics
57+
if: always()
58+
run: ccache -s
59+
gcc-release:
60+
runs-on: ubuntu-24.04
61+
timeout-minutes: 120
62+
strategy:
63+
fail-fast: false
64+
steps:
65+
- name: Checkout paimon-cpp
66+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
67+
with:
68+
lfs: true
69+
- name: Setup ccache
70+
uses: ./.github/actions/setup-ccache
71+
with:
72+
cache-key-prefix: ccache-gcc-release
73+
- name: Build Paimon
74+
shell: bash
75+
env:
76+
CC: gcc-14
77+
CXX: g++-14
78+
run: ci/scripts/build_paimon.sh $(pwd) false false Release
79+
- name: Show ccache statistics
80+
if: always()
81+
run: ccache -s

.github/workflows/clang_test.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. 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,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Clang Test
19+
20+
on:
21+
push:
22+
branches:
23+
- '**'
24+
tags:
25+
- '**'
26+
pull_request:
27+
28+
concurrency:
29+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
30+
cancel-in-progress: true
31+
32+
permissions:
33+
contents: read
34+
35+
jobs:
36+
clang-test:
37+
runs-on: ubuntu-24.04
38+
timeout-minutes: 120
39+
strategy:
40+
fail-fast: false
41+
steps:
42+
- name: Checkout paimon-cpp
43+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
44+
with:
45+
lfs: true
46+
fetch-depth: 0 # fetch all history for git diff in clang-tidy
47+
- name: Setup ccache
48+
uses: ./.github/actions/setup-ccache
49+
with:
50+
cache-key-prefix: ccache-clang-test
51+
- name: Build Paimon
52+
shell: bash
53+
env:
54+
CC: clang
55+
CXX: clang++
56+
run: ci/scripts/build_paimon.sh $(pwd) false true
57+
- name: Show ccache statistics
58+
if: always()
59+
run: ccache -s

.github/workflows/gcc8_test.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. 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,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Gcc 8 Test
19+
20+
on:
21+
push:
22+
branches:
23+
- '**'
24+
tags:
25+
- '**'
26+
pull_request:
27+
28+
concurrency:
29+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
30+
cancel-in-progress: true
31+
32+
permissions:
33+
contents: read
34+
35+
jobs:
36+
gcc8-test:
37+
runs-on: ubuntu-22.04
38+
container:
39+
image: ubuntu:20.04
40+
options: --privileged
41+
timeout-minutes: 120
42+
strategy:
43+
fail-fast: false
44+
steps:
45+
- name: Install dependencies
46+
run: |
47+
apt-get update
48+
DEBIAN_FRONTEND=noninteractive apt-get install -y gcc-8 g++-8 ninja-build git git-lfs tar curl tzdata zip unzip pkg-config build-essential python3-dev gdb sudo
49+
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-x86_64.tar.gz
50+
tar -zxvf cmake-3.28.3-linux-x86_64.tar.gz -C /usr/local --strip-components=1
51+
rm cmake-3.28.3-linux-x86_64.tar.gz
52+
- name: Enable core dumps
53+
run: |
54+
ulimit -c unlimited
55+
sysctl -w kernel.core_pattern=core.%e.%p
56+
- name: Debug core dump settings
57+
run: |
58+
ulimit -c
59+
cat /proc/sys/kernel/core_pattern
60+
ls -la
61+
- name: Checkout paimon-cpp
62+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
63+
with:
64+
lfs: true
65+
- name: Setup ccache
66+
uses: ./.github/actions/setup-ccache
67+
with:
68+
cache-key-prefix: ccache-gcc8-test
69+
- name: Build Paimon
70+
shell: bash
71+
env:
72+
CC: gcc-8
73+
CXX: g++-8
74+
run: ci/scripts/build_paimon.sh $(pwd)
75+
- name: Show ccache statistics
76+
if: always()
77+
run: ccache -s

0 commit comments

Comments
 (0)