-
Notifications
You must be signed in to change notification settings - Fork 81
232 lines (197 loc) · 6.76 KB
/
Copy pathci.yml
File metadata and controls
232 lines (197 loc) · 6.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# 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:
push:
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Validate .asf.yaml
run: python3 scripts/validate_asf_yaml.py
- name: Check License Header
uses: apache/skywalking-eyes/header@v0.8.0
- name: Install cargo-deny
uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9 # v2.84.0
with:
tool: cargo-deny@0.19.6
- name: Fetch locked dependencies
run: cargo fetch --locked
- name: Check dependency policy
run: cargo deny --locked --all-features check --warn unmaintained advisories licenses
- name: Verify dependency reports
run: python3 scripts/dependencies.py verify
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --locked --all-targets --workspace --features fulltext,vortex -- -D warnings
msrv:
runs-on: ubuntu-latest
env:
PYO3_PYTHON: python3.11
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install Rust 1.91.0
run: rustup toolchain install 1.91.0 --profile minimal
- name: Validate workspace MSRV metadata
run: |
cargo +1.91.0 metadata --locked --format-version 1 --no-deps |
jq -e '.packages | all(.rust_version == "1.91.0")' >/dev/null
- name: Check workspace at MSRV
run: cargo +1.91.0 check --locked --workspace --all-targets --all-features
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v7
- name: Build
run: cargo build --locked --features fulltext,vortex
unit:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v7
- name: Test
run: cargo test --locked -p paimon --all-targets --features fulltext,vortex
env:
RUST_LOG: DEBUG
RUST_BACKTRACE: full
# The e2e tests round-trip through a real FileSystemCatalog, which has
# known Windows path-compatibility issues (the `paimon` filesystem
# catalog tests are likewise gated with `#[cfg(not(windows))]`).
- name: Test paimon-rest-server
if: runner.os != 'Windows'
run: cargo test --locked -p paimon-rest-server --all-targets
env:
RUST_LOG: DEBUG
RUST_BACKTRACE: full
integration:
name: integration (${{ matrix.suite }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- suite: rust
needs_docker: true
needs_lumina: false
needs_uv: false
- suite: datafusion
needs_docker: true
needs_lumina: true
needs_uv: false
- suite: lumina
needs_docker: false
needs_lumina: true
needs_uv: false
- suite: python
needs_docker: true
needs_lumina: false
needs_uv: true
- suite: go
needs_docker: true
needs_lumina: false
needs_uv: false
env:
RUST_LOG: DEBUG
RUST_BACKTRACE: full
steps:
- uses: actions/checkout@v7
- name: Rust Cache
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: integration-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
integration-${{ runner.os }}-
- name: Start Docker containers
if: matrix.needs_docker == true
run: make docker-up
- name: Rust Integration Test
if: matrix.suite == 'rust'
run: cargo test --locked -p paimon-integration-tests --all-targets
- name: Install lumina native library
if: matrix.needs_lumina == true
run: |
pip install lumina-data
echo "LUMINA_LIB_PATH=$(python3 -c 'import lumina_data; print(lumina_data.__path__[0])')/lib/liblumina_py.so" >> $GITHUB_ENV
- name: Core Lumina Native Build Test
if: matrix.suite == 'lumina'
run: >
cargo test --locked -p paimon
table::lumina_index_build_builder::tests::test_execute_writes_lumina_index_manifest
--features fulltext,vortex
-- --ignored --exact
- name: DataFusion Lumina Build Query E2E Test
if: matrix.suite == 'lumina'
run: >
cargo test --locked -p paimon-datafusion
--features vortex
vector_search_tests::test_lumina_build_then_vector_search_query
-- --ignored --exact
- name: DataFusion Integration Test
if: matrix.suite == 'datafusion'
run: cargo test --locked -p paimon-datafusion --all-targets
- name: DataFusion Vortex Integration Test
if: matrix.suite == 'datafusion'
run: cargo test --locked -p paimon-datafusion --features vortex --test vortex_tables
- name: Install uv
if: matrix.needs_uv == true
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39
with:
version: "0.9.3"
enable-cache: true
- name: Python Binding Integration Test
if: matrix.suite == 'python'
working-directory: bindings/python
run: make install && make test
- name: Go Integration Test
if: matrix.suite == 'go'
working-directory: bindings/go
run: make test
- name: Stop Docker containers
if: ${{ always() && matrix.needs_docker }}
run: make docker-down