Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
80 changes: 28 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ jobs:
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- uses: moonrepo/setup-rust@v1
with:
channel: nightly
components: rustfmt
cache: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check formatting
run: cargo +nightly fmt --check

Expand All @@ -35,15 +39,13 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: moonrepo/setup-rust@v1
with:
components: clippy
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- uses: Swatinem/rust-cache@v2
with:
shared-key: ubuntu-latest
cache-targets: false # sccache handles compilation artifacts
cache-target: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Clippy
run: cargo clippy --workspace --all-features -- -D warnings
env:
Expand Down Expand Up @@ -77,17 +79,16 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- uses: Swatinem/rust-cache@v2
- uses: moonrepo/setup-rust@v1
with:
shared-key: ${{ matrix.os }}
cache-targets: false # sccache handles compilation artifacts
bins: cargo-nextest
cache-target: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: mozilla-actions/sccache-action@v0.0.9
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- uses: taiki-e/install-action@nextest
- name: Run tests
# Exclude hdbconnect-py: PyO3 abi3 crates can't link Python standalone.
# hdbconnect-py is tested via Python tests (test-python job).
Expand All @@ -105,11 +106,6 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
with:
version: v0.13.0
- uses: actions/setup-python@v6
with:
python-version: "3.12"
Expand All @@ -121,7 +117,6 @@ jobs:
sccache: true
env:
SCCACHE_GHA_ENABLED: "true"
SCCACHE_GHA_VERSION: "1"
- name: Upload wheel
uses: actions/upload-artifact@v6
with:
Expand All @@ -141,11 +136,6 @@ jobs:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
with:
version: v0.13.0
- uses: actions/setup-python@v6
with:
python-version: "3.12"
Expand All @@ -157,7 +147,6 @@ jobs:
sccache: true
env:
SCCACHE_GHA_ENABLED: "true"
SCCACHE_GHA_VERSION: "1"
- name: Upload wheel
uses: actions/upload-artifact@v6
with:
Expand Down Expand Up @@ -276,13 +265,6 @@ jobs:
# (advapi32-sys, username) support Windows ARM64
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
with:
version: v0.13.0
- uses: actions/setup-python@v6
with:
python-version: "3.12"
Expand All @@ -296,9 +278,6 @@ jobs:
sccache: true
env:
SCCACHE_GHA_ENABLED: "true"
SCCACHE_GHA_VERSION: "1"
# Increase cache size for cross-compilation (more targets = more artifacts)
SCCACHE_CACHE_SIZE: "2G"
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
Expand Down Expand Up @@ -339,17 +318,16 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- uses: Swatinem/rust-cache@v2
- uses: moonrepo/setup-rust@v1
with:
shared-key: ubuntu-latest
cache-targets: false # sccache handles compilation artifacts
bins: cargo-llvm-cov
cache-target: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: mozilla-actions/sccache-action@v0.0.9
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate coverage
# Exclude hdbconnect-py: PyO3 abi3 crates can't link Python standalone.
run: cargo llvm-cov --workspace --all-features --exclude hdbconnect-py --lcov --output-path lcov.info
Expand All @@ -375,15 +353,13 @@ jobs:
run: |
MSRV=$(grep '^rust-version' Cargo.toml | sed 's/.*"\(.*\)".*/\1/')
echo "version=$MSRV" >> $GITHUB_OUTPUT
- uses: dtolnay/rust-toolchain@master
- uses: moonrepo/setup-rust@v1
with:
toolchain: ${{ steps.msrv.outputs.version }}
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- uses: Swatinem/rust-cache@v2
with:
shared-key: ubuntu-latest
cache-targets: false # sccache handles compilation artifacts
channel: ${{ steps.msrv.outputs.version }}
cache-target: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Check MSRV
run: cargo check --workspace
env:
Expand Down
39 changes: 20 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ jobs:
# (advapi32-sys, username) support Windows ARM64
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
shared-key: wheels-${{ matrix.target }}
workspaces: python -> target
- uses: actions/setup-python@v6
with:
python-version: "3.12"
Expand All @@ -67,6 +60,9 @@ jobs:
target: ${{ matrix.target }}
args: --release --out dist
manylinux: ${{ matrix.manylinux }}
sccache: true
env:
SCCACHE_GHA_ENABLED: "true"
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
Expand Down Expand Up @@ -136,23 +132,19 @@ jobs:
use_cross: false
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: moonrepo/setup-rust@v1
with:
targets: ${{ matrix.target }}
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main
- name: Install cross (for cross-compilation)
if: matrix.use_cross
run: cargo binstall --no-confirm cross
bins: cross
cache-target: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Install musl tools (Linux musl)
if: matrix.target == 'x86_64-unknown-linux-musl'
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
- uses: Swatinem/rust-cache@v2
with:
shared-key: mcp-${{ matrix.target }}
workspaces: crates/hdbconnect-mcp -> target
- name: Get binary name
id: binary
run: |
Expand All @@ -165,9 +157,15 @@ jobs:
- name: Build binary (cross)
if: matrix.use_cross
run: cross build --package hdbconnect-mcp --release --target ${{ matrix.target }}
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
- name: Build binary (native)
if: "!matrix.use_cross"
run: cargo build --package hdbconnect-mcp --release --target ${{ matrix.target }}
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
- name: Strip binary (Linux/macOS, native only)
if: matrix.os != 'windows-latest' && !matrix.use_cross
run: strip target/${{ matrix.target }}/release/${{ steps.binary.outputs.name }}
Expand Down Expand Up @@ -234,8 +232,11 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: moonrepo/setup-rust@v1
with:
cache: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Verify version matches tag
run: |
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ High-performance Python driver for SAP HANA with native Arrow support.
[![CI](https://github.com/bug-ops/pyhdb-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/bug-ops/pyhdb-rs/actions/workflows/ci.yml)
[![Security](https://github.com/bug-ops/pyhdb-rs/actions/workflows/security.yml/badge.svg)](https://github.com/bug-ops/pyhdb-rs/actions/workflows/security.yml)
[![codecov](https://codecov.io/gh/bug-ops/pyhdb-rs/graph/badge.svg?token=75RR61N6FI)](https://codecov.io/gh/bug-ops/pyhdb-rs)
[![CodSpeed Badge](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/bug-ops/pyhdb-rs)
[![Crates.io](https://img.shields.io/crates/v/hdbconnect-arrow.svg)](https://crates.io/crates/hdbconnect-arrow)
[![docs.rs](https://img.shields.io/docsrs/hdbconnect-arrow)](https://docs.rs/hdbconnect-arrow)
[![PyPI](https://img.shields.io/pypi/v/pyhdb_rs.svg)](https://pypi.org/project/pyhdb_rs/)
Expand Down
2 changes: 2 additions & 0 deletions crates/hdbconnect-arrow/src/conversion/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,7 @@ mod tests {
}

#[test]
#[cfg(feature = "test-utils")]
fn test_processor_homogeneous_decimal128() {
use crate::traits::row::MockRowBuilder;

Expand Down Expand Up @@ -1122,6 +1123,7 @@ mod tests {
}

#[test]
#[cfg(feature = "test-utils")]
fn test_processor_homogeneous_decimal128_with_nulls() {
use crate::traits::row::MockRowBuilder;

Expand Down
Loading
Loading