Skip to content

Commit 1c5db41

Browse files
committed
Merge remote-tracking branch 'origin/main' into support_build_with_python314
2 parents 47ca135 + 855921f commit 1c5db41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4233
-185
lines changed

.github/workflows/build_linux_arm64_wheels-gh.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ jobs:
218218
- name: Run libchdb stub in examples dir
219219
run: |
220220
bash -x ./examples/runStub.sh
221+
bash -x ./examples/runArrowTest.sh
221222
- name: Check ccache statistics
222223
run: |
223224
ccache -s

.github/workflows/build_linux_x86_wheels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ jobs:
219219
- name: Run libchdb stub in examples dir
220220
run: |
221221
bash -x ./examples/runStub.sh
222+
bash -x ./examples/runArrowTest.sh
222223
- name: Check ccache statistics
223224
run: |
224225
ccache -s

.github/workflows/build_macos_arm64_wheels.yml

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,32 @@ on:
2222
jobs:
2323
build_universal_wheel:
2424
name: Build Universal Wheel (macOS ARM64)
25-
runs-on: macos-13-xlarge
25+
runs-on: macos-14-xlarge
2626
steps:
27+
- name: Check machine architecture
28+
run: |
29+
echo "=== Machine Architecture Information ==="
30+
echo "Machine type: $(uname -m)"
31+
echo "Architecture: $(arch)"
32+
echo "System info: $(uname -a)"
33+
echo "Hardware info:"
34+
system_profiler SPHardwareDataType | grep "Chip\|Processor"
35+
if sysctl -n hw.optional.arm64 2>/dev/null | grep -q "1"; then
36+
echo "This is an ARM64 (Apple Silicon) machine"
37+
else
38+
echo "This is an x86_64 (Intel) machine"
39+
fi
40+
- name: Free up disk space (Initial)
41+
run: |
42+
# Clean Homebrew cache
43+
brew cleanup -s 2>/dev/null || true
44+
rm -rf "$(brew --cache)" 2>/dev/null || true
45+
sudo rm -rf ~/Library/Developer/Xcode/DerivedData 2>/dev/null || true
46+
sudo rm -rf ~/Library/Caches/com.apple.dt.Xcode 2>/dev/null || true
47+
sudo rm -rf /Users/runner/Library/Android 2>/dev/null || true
48+
sudo rm -rf /tmp/* 2>/dev/null || true
49+
echo "=== Disk usage after cleanup ==="
50+
df -h
2751
- name: Setup pyenv
2852
run: |
2953
curl https://pyenv.run | bash
@@ -81,6 +105,7 @@ jobs:
81105
brew install openssl@3 || echo "OpenSSL install failed, continuing..."
82106
brew install --ignore-dependencies llvm@19
83107
brew install git ninja libtool gettext binutils grep findutils nasm lld@19 libiconv
108+
brew install ccache || echo "ccache installation failed, continuing without it"
84109
brew install go
85110
cd /usr/local/opt/ && sudo rm -f llvm && sudo ln -sf llvm@19 llvm
86111
export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:$PATH
@@ -103,6 +128,23 @@ jobs:
103128
- name: Update submodules
104129
run: |
105130
git submodule update --init --recursive --jobs 4
131+
- name: Free up disk space (Before compilation)
132+
run: |
133+
echo "=== Disk usage before compilation cleanup ==="
134+
df -h
135+
brew cleanup -s 2>/dev/null || true
136+
rm -rf "$(brew --cache)" 2>/dev/null || true
137+
rm -rf ~/.cache/pip 2>/dev/null || true
138+
rm -rf ~/.pyenv/.cache 2>/dev/null || true
139+
rm -rf ~/.cargo/registry/cache 2>/dev/null || true
140+
echo "=== Disk usage after cleanup ==="
141+
df -h
142+
- name: ccache
143+
uses: hendrikmuhs/ccache-action@v1.2
144+
with:
145+
key: ${{ runner.os }}-arm64-ccache
146+
max-size: 5G
147+
append-timestamp: true
106148
- name: Run chdb/build.sh
107149
timeout-minutes: 600
108150
run: |
@@ -173,6 +215,7 @@ jobs:
173215
- name: Run libchdb stub in examples dir
174216
run: |
175217
bash -x ./examples/runStub.sh
218+
bash -x ./examples/runArrowTest.sh
176219
- name: Build wheels
177220
run: |
178221
export PATH="$HOME/.pyenv/bin:$PATH"
@@ -194,16 +237,23 @@ jobs:
194237
sudo sysctl kern.corefile=$PWD/tmp/core/core.%P
195238
sudo sysctl kern.coredump=1
196239
ulimit -c unlimited
240+
- name: Free up disk space
241+
run: |
242+
# Clean more build artifacts
243+
rm -rf buildlib/contrib 2>/dev/null || true
244+
rm -rf buildlib/base 2>/dev/null || true
245+
rm -rf buildlib/src 2>/dev/null || true
197246
- name: Test wheel on all Python versions
198247
run: |
199248
export PATH="$HOME/.pyenv/bin:$PATH"
200249
eval "$(pyenv init -)"
201250
for version in 3.8 3.9 3.10 3.11 3.12 3.13 3.14; do
202251
echo "Testing chdb on Python $version"
203252
pyenv shell $version
204-
python -m pip install dist/*.whl --force-reinstall
253+
python -m pip install dist/*.whl --force-reinstall --no-cache-dir
205254
python -c "import chdb; res = chdb.query('select 1112222222,555', 'CSV'); print(f'Python $version: {res}')"
206255
make test
256+
python -m pip uninstall -y chdb
207257
pyenv shell --unset
208258
done
209259
continue-on-error: false

.github/workflows/build_macos_x86_wheels.yml

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,35 @@ on:
2222
jobs:
2323
build_universal_wheel:
2424
name: Build Universal Wheel (macOS x86_64)
25-
runs-on: macos-14-large
25+
runs-on: macos-15-intel
26+
timeout-minutes: 600
2627
steps:
28+
- name: Check machine architecture
29+
run: |
30+
echo "=== Machine Architecture Information ==="
31+
echo "Machine type: $(uname -m)"
32+
echo "Architecture: $(arch)"
33+
echo "System info: $(uname -a)"
34+
echo "Hardware info:"
35+
system_profiler SPHardwareDataType | grep "Chip\|Processor"
36+
if sysctl -n hw.optional.arm64 2>/dev/null | grep -q "1"; then
37+
echo "This is an ARM64 (Apple Silicon) machine"
38+
else
39+
echo "This is an x86_64 (Intel) machine"
40+
fi
2741
- name: Setup pyenv
2842
run: |
2943
curl https://pyenv.run | bash
3044
export PATH="$HOME/.pyenv/bin:$PATH"
3145
eval "$(pyenv init -)"
3246
33-
pyenv install 3.8:latest
3447
pyenv install 3.9:latest
3548
pyenv install 3.10:latest
3649
pyenv install 3.11:latest
3750
pyenv install 3.12:latest
3851
pyenv install 3.13:latest
3952
pyenv install 3.14:latest
40-
pyenv global 3.8 3.9 3.10 3.11 3.12 3.13 3.14
53+
pyenv global 3.9 3.10 3.11 3.12 3.13 3.14
4154
4255
echo "Installed versions:"
4356
pyenv versions
@@ -49,7 +62,7 @@ jobs:
4962
pyenv versions
5063
echo ""
5164
echo "Verifying all required Python versions are available:"
52-
for version in 3.8 3.9 3.10 3.11 3.12 3.13 3.14; do
65+
for version in 3.9 3.10 3.11 3.12 3.13 3.14; do
5366
if ! pyenv versions --bare | grep -q "^$version"; then
5467
echo "ERROR: Python $version is not installed!"
5568
exit 1
@@ -61,7 +74,7 @@ jobs:
6174
run: |
6275
export PATH="$HOME/.pyenv/bin:$PATH"
6376
eval "$(pyenv init -)"
64-
for version in 3.8 3.9 3.10 3.11 3.12 3.13 3.14; do
77+
for version in 3.9 3.10 3.11 3.12 3.13 3.14; do
6578
echo "Installing dependencies for Python $version"
6679
pyenv shell $version
6780
python -m pip install --upgrade pip
@@ -123,30 +136,39 @@ jobs:
123136
- name: Update submodules
124137
run: |
125138
git submodule update --init --recursive --jobs 4
139+
- name: ccache
140+
uses: hendrikmuhs/ccache-action@v1.2
141+
with:
142+
key: ${{ runner.os }}-x86_64-ccache
143+
max-size: 10G
144+
append-timestamp: true
145+
env:
146+
CCACHE_NOHASHDIR: "true"
126147
- name: Run chdb/build.sh
127148
timeout-minutes: 600
128149
run: |
129150
export PATH="$HOME/.pyenv/bin:$PATH"
130151
eval "$(pyenv init -)"
131152
source ~/.cargo/env
132-
pyenv shell 3.8
153+
pyenv shell 3.9
133154
export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
134155
export CC=$(brew --prefix llvm@19)/bin/clang
135156
export CXX=$(brew --prefix llvm@19)/bin/clang++
136157
bash gen_manifest.sh
137158
bash ./chdb/build.sh
138-
pyenv shell 3.8
159+
pyenv shell 3.9
139160
bash -x ./chdb/test_smoke.sh
140161
continue-on-error: false
141162
- name: Run chdb/build/build_static_lib.sh
142163
timeout-minutes: 600
143164
run: |
144-
export PATH=$HOME/.pyenv/bin:$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
165+
export PATH="$HOME/.pyenv/bin:$PATH"
166+
eval "$(pyenv init -)"
167+
source ~/.cargo/env
168+
export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
145169
export CC=$(brew --prefix llvm@19)/bin/clang
146170
export CXX=$(brew --prefix llvm@19)/bin/clang++
147-
source ~/.cargo/env
148-
eval "$(pyenv init -)"
149-
pyenv shell 3.8
171+
pyenv shell 3.9
150172
bash ./chdb/build/build_static_lib.sh
151173
pyenv shell --unset
152174
continue-on-error: false
@@ -194,6 +216,7 @@ jobs:
194216
- name: Run libchdb stub in examples dir
195217
run: |
196218
bash -x ./examples/runStub.sh
219+
bash -x ./examples/runArrowTest.sh
197220
- name: Build wheels
198221
run: |
199222
export PATH="$HOME/.pyenv/bin:$PATH"
@@ -202,25 +225,31 @@ jobs:
202225
export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
203226
export CC=$(brew --prefix llvm@19)/bin/clang
204227
export CXX=$(brew --prefix llvm@19)/bin/clang++
205-
pyenv shell 3.8
228+
pyenv shell 3.9
206229
make wheel
207230
- name: Fix wheel platform tag
208231
run: |
209232
export PATH="$HOME/.pyenv/bin:$PATH"
210233
eval "$(pyenv init -)"
211-
pyenv shell 3.8
234+
pyenv shell 3.9
212235
python -m wheel tags --platform-tag=macosx_10_15_x86_64 --remove dist/*.whl
213236
- name: Setup core dump collection
214237
run: |
215238
mkdir -p tmp/core
216239
sudo sysctl kern.corefile=$PWD/tmp/core/core.%P
217240
sudo sysctl kern.coredump=1
218241
ulimit -c unlimited
242+
- name: Free up disk space
243+
run: |
244+
# Clean more build artifacts
245+
rm -rf buildlib/contrib 2>/dev/null || true
246+
rm -rf buildlib/base 2>/dev/null || true
247+
rm -rf buildlib/src 2>/dev/null || true
219248
- name: Test wheel on all Python versions
220249
run: |
221250
export PATH="$HOME/.pyenv/bin:$PATH"
222251
eval "$(pyenv init -)"
223-
for version in 3.8 3.9 3.10 3.11 3.12 3.13 3.14; do
252+
for version in 3.9 3.10 3.11 3.12 3.13 3.14; do
224253
echo "Testing chdb on Python $version"
225254
pyenv shell $version
226255
python -m pip install dist/*.whl --force-reinstall
@@ -292,7 +321,7 @@ jobs:
292321
run: |
293322
export PATH="$HOME/.pyenv/bin:$PATH"
294323
eval "$(pyenv init -)"
295-
pyenv shell 3.8
324+
pyenv shell 3.9
296325
python -m twine upload dist/*.whl
297326
env:
298327
TWINE_USERNAME: __token__

0 commit comments

Comments
 (0)