Skip to content
Open
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
14 changes: 14 additions & 0 deletions .github/workflows/build_linux_arm64_wheels-gh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ jobs:
name: Build Universal Wheel (Linux ARM64)
runs-on: GH-Linux-ARM64
steps:
- name: Check CPU capabilities and requirements
run: |
echo "=== CPU Information ==="
cat /proc/cpuinfo
echo ""
echo "=== Checking CPU requirements ==="

if grep -P "^(?=.*atomic)(?=.*ssbs)" /proc/cpuinfo > /dev/null; then
echo "CPU meets minimum requirements (atomic and ssbs flags found)"
else
echo "CPU does not meet minimum requirements"
echo "Missing required flags: atomic and/or ssbs"
echo "This may cause build failures. Consider using -DNO_ARMV81_OR_HIGHER=1"
fi
- name: Install Python build dependencies
run: |
sudo apt-get update
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build_macos_x86_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Update submodules
run: |
git submodule update --init --recursive --jobs 4
Expand Down
24 changes: 12 additions & 12 deletions chdb/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,21 @@ elif [ "$(uname)" == "Linux" ]; then
if [ "$(uname -m)" == "x86_64" ]; then
CPU_FEATURES="-DENABLE_AVX=1 -DENABLE_AVX2=0"
LLVM="-DENABLE_EMBEDDED_COMPILER=1 -DENABLE_DWARF_PARSER=1"
RUST_FEATURES="-DENABLE_RUST=1 -DENABLE_DELTA_KERNEL_RS=1"
CORROSION_CMAKE_FILE="${PROJ_DIR}/contrib/corrosion-cmake/CMakeLists.txt"
if [ -f "${CORROSION_CMAKE_FILE}" ]; then
if ! grep -q 'OPENSSL_NO_DEPRECATED_3_0' "${CORROSION_CMAKE_FILE}"; then
echo "Modifying corrosion CMakeLists.txt for Linux x86_64..."
${SED_INPLACE} 's/corrosion_set_env_vars(${target_name} "RUSTFLAGS=${RUSTFLAGS}")/corrosion_set_env_vars(${target_name} "RUSTFLAGS=${RUSTFLAGS} --cfg osslconf=\\\"OPENSSL_NO_DEPRECATED_3_0\\\"")/g' "${CORROSION_CMAKE_FILE}"
else
echo "corrosion CMakeLists.txt already modified, skipping..."
fi
else
CPU_FEATURES="-DENABLE_AVX=0 -DENABLE_AVX2=0"
LLVM="-DENABLE_EMBEDDED_COMPILER=0 -DENABLE_DWARF_PARSER=0"
fi
RUST_FEATURES="-DENABLE_RUST=1 -DENABLE_DELTA_KERNEL_RS=1"
CORROSION_CMAKE_FILE="${PROJ_DIR}/contrib/corrosion-cmake/CMakeLists.txt"
if [ -f "${CORROSION_CMAKE_FILE}" ]; then
if ! grep -q 'OPENSSL_NO_DEPRECATED_3_0' "${CORROSION_CMAKE_FILE}"; then
echo "Modifying corrosion CMakeLists.txt for Linux x86_64..."
${SED_INPLACE} 's/corrosion_set_env_vars(${target_name} "RUSTFLAGS=${RUSTFLAGS}")/corrosion_set_env_vars(${target_name} "RUSTFLAGS=${RUSTFLAGS} --cfg osslconf=\\\"OPENSSL_NO_DEPRECATED_3_0\\\"")/g' "${CORROSION_CMAKE_FILE}"
else
echo "Warning: corrosion CMakeLists.txt not found at ${CORROSION_CMAKE_FILE}"
echo "corrosion CMakeLists.txt already modified, skipping..."
fi
else
CPU_FEATURES="-DENABLE_AVX=0 -DENABLE_AVX2=0 -DNO_ARMV81_OR_HIGHER=1"
LLVM="-DENABLE_EMBEDDED_COMPILER=0 -DENABLE_DWARF_PARSER=0"
echo "Warning: corrosion CMakeLists.txt not found at ${CORROSION_CMAKE_FILE}"
fi
else
echo "OS not supported"
Expand Down
12 changes: 6 additions & 6 deletions cmake/cpu_features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ elseif (ARCH_AARCH64)
# legacy profile (full Graviton 3 /proc/cpuinfo is "fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm
# jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs paca pacg dcpodp svei8mm svebf16 i8mm
# bf16 dgh rng")
execute_process(
COMMAND grep -P "^(?=.*atomic)(?=.*ssbs)" /proc/cpuinfo
OUTPUT_VARIABLE FLAGS)
if (NOT FLAGS)
MESSAGE(FATAL_ERROR "The build machine does not satisfy the minimum CPU requirements, try to run cmake with -DNO_ARMV81_OR_HIGHER=1")
endif()
# execute_process(
# COMMAND grep -P "^(?=.*atomic)(?=.*ssbs)" /proc/cpuinfo
# OUTPUT_VARIABLE FLAGS)
# if (NOT FLAGS)
# MESSAGE(FATAL_ERROR "The build machine does not satisfy the minimum CPU requirements, try to run cmake with -DNO_ARMV81_OR_HIGHER=1")
# endif()
endif()

elseif (ARCH_PPC64LE)
Expand Down
18 changes: 17 additions & 1 deletion tests/test_delta_lake.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,26 @@
import unittest
import sys
import platform
import subprocess
import chdb
from chdb import session

@unittest.skipUnless(sys.platform.startswith("linux") and platform.machine() in ["x86_64", "AMD64"], "Runs only in the Linux x86 environment")
def is_musl_linux():
"""Check if running on musl Linux"""
if platform.system() != "Linux":
return False
try:
result = subprocess.run(['ldd', '--version'], capture_output=True, text=True)
print(f"stdout: {result.stdout.lower()}")
print(f"stderr: {result.stderr.lower()}")
# Check both stdout and stderr for musl
output_text = (result.stdout + result.stderr).lower()
return 'musl' in output_text
except Exception as e:
print(f"Exception in is_musl_linux: {e}")
return False

@unittest.skipUnless(sys.platform.startswith("linux") and not is_musl_linux(), "Runs only on Linux platforms")
class TestDeltaLake(unittest.TestCase):
def setUp(self) -> None:
return super().setUp()
Expand Down
Loading