Skip to content

Commit ca89546

Browse files
authored
ci: fix publish paimon-datafusion and python issue (#253)
1 parent 2a7e5fc commit ca89546

4 files changed

Lines changed: 68 additions & 3 deletions

File tree

.github/workflows/release-rust.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,23 @@ jobs:
5353
rustup default stable
5454
5555
- name: Dry run
56+
# Only dry-run paimon since paimon-datafusion depends on it
57+
if: matrix.package == 'paimon'
5658
run: cargo publish -p ${{ matrix.package }} --all-features --dry-run
5759

5860
- name: Publish ${{ matrix.package }} to crates.io
5961
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-')
6062
run: cargo publish -p ${{ matrix.package }} --all-features
6163
env:
6264
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
65+
66+
- name: Wait for crates.io to update
67+
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-') && matrix.package == 'paimon'
68+
run: |
69+
VERSION=${GITHUB_REF_NAME#v}
70+
for i in {1..10}; do
71+
CURRENT=$(curl -s https://crates.io/api/v1/crates/paimon | jq -r '.crate.max_version')
72+
[ "$CURRENT" = "$VERSION" ] && echo "✅ paimon $VERSION available" && exit 0
73+
echo "Waiting for $VERSION (currently $CURRENT)... $i/10"
74+
sleep 30
75+
done

.github/workflows/release_python_binding.yml

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
command: sdist
5050
args: -o dist
5151
before-script-linux: |
52-
yum install -y openssl-devel 2>/dev/null || apt-get update && apt-get install -y libssl-dev
52+
sudo apt-get update && sudo apt-get install -y libssl-dev
5353
5454
- name: Upload sdist
5555
uses: actions/upload-artifact@v4
@@ -78,7 +78,58 @@ jobs:
7878
args: --release -o dist
7979
manylinux: ${{ matrix.manylinux || 'auto' }}
8080
before-script-linux: |
81-
yum install -y openssl-devel 2>/dev/null || apt-get update && apt-get install -y libssl-dev
81+
# Install OpenSSL for x86_64 (manylinux2014 with OpenSSL 1.1)
82+
if [ "${{ matrix.target }}" = "x86_64" ]; then
83+
yum install -y openssl11-devel
84+
# Create symlinks so pkg-config finds openssl11 as openssl
85+
ln -sf /usr/lib64/pkgconfig/openssl11.pc /usr/lib64/pkgconfig/openssl.pc
86+
ln -sf /usr/lib64/pkgconfig/libssl11.pc /usr/lib64/pkgconfig/libssl.pc
87+
ln -sf /usr/lib64/pkgconfig/libcrypto11.pc /usr/lib64/pkgconfig/libcrypto.pc
88+
fi
89+
90+
# Install precompiled OpenSSL from Debian packages for aarch64
91+
if [ "${{ matrix.target }}" = "aarch64" ]; then
92+
set -e
93+
echo "Installing OpenSSL for aarch64 from Debian packages..."
94+
95+
(cd /tmp
96+
# Debian Bullseye arm64 packages (OpenSSL 1.1.1)
97+
DEBIAN_MIRROR="http://ftp.debian.org/debian/pool/main/o/openssl"
98+
curl -sLO "${DEBIAN_MIRROR}/libssl1.1_1.1.1w-0+deb11u1_arm64.deb"
99+
curl -sLO "${DEBIAN_MIRROR}/libssl-dev_1.1.1w-0+deb11u1_arm64.deb"
100+
101+
# Extract .deb packages (ar format)
102+
for deb in *.deb; do
103+
ar x "$deb"
104+
tar xf data.tar.*
105+
rm -f debian-binary control.tar.* data.tar.*
106+
done
107+
108+
# Install to maturin's expected location
109+
TARGET_DIR="/usr/aarch64-unknown-linux-gnu"
110+
mkdir -p "${TARGET_DIR}/include/openssl" "${TARGET_DIR}/lib"
111+
112+
# Copy main OpenSSL headers (architecture-independent)
113+
cp -r usr/include/openssl/* "${TARGET_DIR}/include/openssl/"
114+
115+
# Overwrite with architecture-specific headers
116+
cp -f usr/include/aarch64-linux-gnu/openssl/configuration.h "${TARGET_DIR}/include/openssl/" || true
117+
cp -f usr/include/aarch64-linux-gnu/openssl/opensslconf.h "${TARGET_DIR}/include/openssl/" || true
118+
119+
# Copy libraries
120+
cp -a usr/lib/aarch64-linux-gnu/libssl* "${TARGET_DIR}/lib/"
121+
cp -a usr/lib/aarch64-linux-gnu/libcrypto* "${TARGET_DIR}/lib/"
122+
123+
# Verify
124+
echo "✓ OpenSSL installed"
125+
ls "${TARGET_DIR}/lib/libssl.a" && echo "✓ libssl.a found"
126+
ls "${TARGET_DIR}/include/openssl/opensslv.h" && echo "✓ opensslv.h found"
127+
ls "${TARGET_DIR}/include/openssl/opensslconf.h" && echo "✓ opensslconf.h found"
128+
) # End subshell
129+
130+
# Fix ring crate build: define ARM architecture version for aarch64
131+
export CFLAGS_aarch64_unknown_linux_gnu="-D__ARM_ARCH=8"
132+
fi
82133
83134
- name: Upload wheels
84135
uses: actions/upload-artifact@v4

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ arrow-ord = "58.0"
3737
arrow-select = "58.0"
3838
datafusion = "53.0.0"
3939
datafusion-ffi = "53.0.0"
40+
paimon = { version = "0.1.0", path = "crates/paimon" }
4041
parquet = "58.0"
4142
tokio = "1.39.2"
4243
tokio-util = "0.7"

crates/integrations/datafusion/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fulltext = ["paimon/fulltext"]
3434
async-trait = "0.1"
3535
chrono = "0.4"
3636
datafusion = { workspace = true }
37-
paimon = { path = "../../paimon" }
37+
paimon = { workspace = true }
3838
futures = "0.3"
3939
tokio = { workspace = true, features = ["rt", "time", "fs"] }
4040

0 commit comments

Comments
 (0)