Skip to content

Commit d255ec0

Browse files
committed
ci: unify compiler builds in a matrix
1 parent 2637b86 commit d255ec0

3 files changed

Lines changed: 33 additions & 149 deletions

File tree

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: Clang Test
15+
name: Build and Test
1616

1717
on:
1818
push:
@@ -30,30 +30,56 @@ permissions:
3030
contents: read
3131

3232
jobs:
33-
clang-test:
33+
build-and-test:
34+
name: ${{ matrix.name }}
3435
runs-on: ubuntu-24.04
3536
timeout-minutes: 120
3637
strategy:
3738
fail-fast: false
39+
matrix:
40+
include:
41+
- name: gcc-release
42+
cc: gcc-14
43+
cxx: g++-14
44+
fetch_depth: 1
45+
build_args: --build_type Release
46+
- name: clang-release
47+
cc: clang
48+
cxx: clang++
49+
fetch_depth: 1
50+
build_args: --build_type Release
51+
- name: gcc-debug
52+
cc: gcc-14
53+
cxx: g++-14
54+
fetch_depth: 1
55+
build_args: ''
56+
- name: clang-debug
57+
cc: clang
58+
cxx: clang++
59+
fetch_depth: 0
60+
build_args: --check_clang_tidy
3861
steps:
3962
- name: Checkout paimon-cpp
4063
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4164
with:
4265
lfs: true
43-
fetch-depth: 0 # fetch all history for git diff in clang-tidy
66+
fetch-depth: ${{ matrix.fetch_depth }}
4467
- name: Setup ccache
4568
uses: ./.github/actions/setup-ccache
4669
with:
47-
cache-key-prefix: ccache-clang-test
70+
cache-key-prefix: ccache-${{ matrix.name }}
4871
- name: Install Rust toolchain (tantivy-fts)
4972
shell: bash
5073
run: ci/scripts/setup_rust.sh
5174
- name: Build Paimon
5275
shell: bash
5376
env:
54-
CC: clang
55-
CXX: clang++
56-
run: ci/scripts/build_paimon.sh --source_dir "$(pwd)" --check_clang_tidy
77+
CC: ${{ matrix.cc }}
78+
CXX: ${{ matrix.cxx }}
79+
run: >-
80+
ci/scripts/build_paimon.sh
81+
--source_dir "$(pwd)"
82+
${{ matrix.build_args }}
5783
- name: Show ccache statistics
5884
if: always()
5985
run: ccache -s

.github/workflows/build_release.yaml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.github/workflows/gcc_test.yaml

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)