Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/ci_bindings_cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# 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: Bindings C++

on:
push:
branches:
- main
paths-ignore:
- 'website/**'
- '**/*.md'
pull_request:
branches:
- main
paths-ignore:
- 'website/**'
- '**/*.md'
- 'bindings/python/**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
cpp-integration-test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler

- name: Install Apache Arrow C++
run: |
sudo apt-get install -y -V ca-certificates lsb-release wget
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt-get install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt-get update
sudo apt-get install -y -V libarrow-dev

- name: Rust Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cpp-test-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}

- name: Build C++ bindings and tests
working-directory: bindings/cpp
run: |
cmake -B build -DFLUSS_ENABLE_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
cmake --build build --parallel

- name: Run C++ integration tests
working-directory: bindings/cpp
run: cd build && ctest --output-on-failure --timeout 300
env:
RUST_LOG: DEBUG
RUST_BACKTRACE: full
81 changes: 81 additions & 0 deletions .github/workflows/ci_bindings_python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# 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: Bindings Python

on:
push:
branches:
- main
paths-ignore:
- 'website/**'
- '**/*.md'
pull_request:
branches:
- main
paths-ignore:
- 'website/**'
- '**/*.md'
- 'bindings/cpp/**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
python-integration-test:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler

- name: Rust Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: python-test-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('**/Cargo.lock') }}

- name: Build Python bindings
working-directory: bindings/python
run: |
uv sync --extra dev
uv run maturin develop

- name: Run Python integration tests
working-directory: bindings/python
run: uv run pytest test/ -v
env:
RUST_LOG: DEBUG
RUST_BACKTRACE: full
60 changes: 60 additions & 0 deletions .github/workflows/ci_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 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: Check

on:
push:
branches:
- main
paths-ignore:
- 'website/**'
- '**/*.md'
pull_request:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check License Header
uses: apache/skywalking-eyes/header@v0.6.0

- name: Install cargo-deny
uses: taiki-e/install-action@v2
with:
tool: cargo-deny@0.14.22

- name: Check dependency licenses (Apache-compatible)
run: cargo deny check licenses

- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler

- name: Format
run: cargo fmt --all -- --check

- name: Clippy
run: cargo clippy --all-targets --workspace -- -D warnings
73 changes: 5 additions & 68 deletions .github/workflows/ci.yml → .github/workflows/ci_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

name: CI
name: Rust

on:
push:
Expand All @@ -30,37 +30,15 @@ on:
paths-ignore:
- 'website/**'
- '**/*.md'
- 'bindings/python/**'
- 'bindings/cpp/**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check License Header
uses: apache/skywalking-eyes/header@v0.6.0

- name: Install cargo-deny
uses: taiki-e/install-action@v2
with:
tool: cargo-deny@0.14.22

- name: Check dependency licenses (Apache-compatible)
run: cargo deny check licenses

- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler

- name: Format
run: cargo fmt --all -- --check

- name: Clippy
run: cargo clippy --all-targets --workspace -- -D warnings

build:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -98,6 +76,7 @@ jobs:
run: cargo build --workspace --all-targets

test:
timeout-minutes: 60
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -143,45 +122,3 @@ jobs:
env:
RUST_LOG: DEBUG
RUST_BACKTRACE: full

python-integration-test:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler

- name: Rust Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: python-test-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('**/Cargo.lock') }}

- name: Build Python bindings
working-directory: bindings/python
run: |
uv sync --extra dev
uv run maturin develop

- name: Run Python integration tests
working-directory: bindings/python
run: uv run pytest test/ -v
env:
RUST_LOG: DEBUG
RUST_BACKTRACE: full
23 changes: 23 additions & 0 deletions bindings/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,26 @@ if (FLUSS_ENABLE_ADDRESS_SANITIZER)
target_compile_options(fluss_cpp PRIVATE -fsanitize=leak,address,undefined -fno-omit-frame-pointer -fno-common -O1)
target_link_options(fluss_cpp PRIVATE -fsanitize=leak,address,undefined)
endif()

if (FLUSS_ENABLE_TESTING)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/tags/v${FLUSS_GOOGLETEST_VERSION}.tar.gz
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

enable_testing()

file(GLOB TEST_SOURCE_FILES "test/*.cpp")
add_executable(fluss_cpp_test ${TEST_SOURCE_FILES})
target_link_libraries(fluss_cpp_test PRIVATE fluss_cpp GTest::gtest)
target_link_libraries(fluss_cpp_test PRIVATE Arrow::arrow_shared)
target_compile_definitions(fluss_cpp_test PRIVATE ARROW_FOUND)
target_include_directories(fluss_cpp_test PRIVATE
${CPP_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/test
)

add_test(NAME fluss_cpp_integration_tests COMMAND fluss_cpp_test)
endif()
Loading