Skip to content

Commit 746c8b5

Browse files
committed
Merge remote-tracking branch 'origin' into add_static_lib
2 parents 03844db + affe78e commit 746c8b5

20 files changed

+1386
-103
lines changed

.github/workflows/build_linux_arm64_wheels-gh.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ jobs:
169169
sudo rm -f dist/*linux_aarch64.whl
170170
ls -lh dist
171171
shell: bash
172+
- name: Setup core dump collection
173+
run: |
174+
mkdir -p tmp/core
175+
echo "tmp/core/core.%p" | sudo tee /proc/sys/kernel/core_pattern
176+
ulimit -c unlimited
172177
- name: Test wheel on all Python versions
173178
run: |
174179
export PATH="$HOME/.pyenv/bin:$PATH"
@@ -182,6 +187,25 @@ jobs:
182187
pyenv shell --unset
183188
done
184189
continue-on-error: false
190+
- name: Check and upload core files if present
191+
if: always()
192+
run: |
193+
if ls tmp/core/core.* >/dev/null 2>&1; then
194+
echo "CORE_FILES_FOUND=true" >> $GITHUB_ENV
195+
tar -czvf core-files-linux-aarch64.tar.gz tmp/core/core.*
196+
echo "Core files tar created: core-files-linux-aarch64.tar.gz"
197+
ls -lh core-files-linux-aarch64.tar.gz
198+
else
199+
echo "CORE_FILES_FOUND=false" >> $GITHUB_ENV
200+
echo "No core files found in tmp/core"
201+
fi
202+
continue-on-error: true
203+
- name: Upload core files if present
204+
if: always() && env.CORE_FILES_FOUND == 'true'
205+
uses: actions/upload-artifact@v4
206+
with:
207+
name: core-files-linux-aarch64
208+
path: core-files-linux-aarch64.tar.gz
185209
- name: Upload wheels to release
186210
if: startsWith(github.ref, 'refs/tags/v')
187211
run: |
@@ -191,11 +215,13 @@ jobs:
191215
- name: Packege libchdb.so
192216
run: |
193217
cp programs/local/chdb.h chdb.h
194-
tar -czvf linux-aarch64-libchdb.tar.gz libchdb.so chdb.h
218+
cp programs/local/chdb.hpp chdb.hpp
219+
tar -czvf linux-aarch64-libchdb.tar.gz libchdb.so chdb.h chdb.hpp
195220
- name: Package libchdb.a
196221
run: |
197222
cp programs/local/chdb.h chdb.h
198-
tar -czvf linux-aarch64-libchdb-static.tar.gz libchdb.a chdb.h
223+
cp programs/local/chdb.hpp chdb.hpp
224+
tar -czvf linux-aarch64-libchdb-static.tar.gz libchdb.a chdb.h chdb.hpp
199225
- name: Upload libchdb.so to release
200226
if: startsWith(github.ref, 'refs/tags/v')
201227
run: |

.github/workflows/build_linux_x86_wheels.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ jobs:
168168
sudo rm -f dist/*-linux_x86_64.whl
169169
ls -lh dist
170170
shell: bash
171+
- name: Setup core dump collection
172+
run: |
173+
mkdir -p tmp/core
174+
echo "tmp/core/core.%p" | sudo tee /proc/sys/kernel/core_pattern
175+
ulimit -c unlimited
171176
- name: Test wheel on all Python versions
172177
run: |
173178
export PATH="$HOME/.pyenv/bin:$PATH"
@@ -181,6 +186,25 @@ jobs:
181186
pyenv shell --unset
182187
done
183188
continue-on-error: false
189+
- name: Check and upload core files if present
190+
if: always()
191+
run: |
192+
if ls tmp/core/core.* >/dev/null 2>&1; then
193+
echo "CORE_FILES_FOUND=true" >> $GITHUB_ENV
194+
tar -czvf core-files-linux-x86_64.tar.gz tmp/core/core.*
195+
echo "Core files tar created: core-files-linux-x86_64.tar.gz"
196+
ls -lh core-files-linux-x86_64.tar.gz
197+
else
198+
echo "CORE_FILES_FOUND=false" >> $GITHUB_ENV
199+
echo "No core files found in tmp/core"
200+
fi
201+
continue-on-error: true
202+
- name: Upload core files artifact
203+
if: always() && env.CORE_FILES_FOUND == 'true'
204+
uses: actions/upload-artifact@v4
205+
with:
206+
name: core-files-linux-x86_64
207+
path: core-files-linux-x86_64.tar.gz
184208
- name: Upload wheels to release
185209
if: startsWith(github.ref, 'refs/tags/v')
186210
run: |
@@ -190,11 +214,13 @@ jobs:
190214
- name: Packege libchdb.so
191215
run: |
192216
cp programs/local/chdb.h chdb.h
193-
tar -czvf linux-x86_64-libchdb.tar.gz libchdb.so chdb.h
217+
cp programs/local/chdb.hpp chdb.hpp
218+
tar -czvf linux-x86_64-libchdb.tar.gz libchdb.so chdb.h chdb.hpp
194219
- name: Package libchdb.a
195220
run: |
196221
cp programs/local/chdb.h chdb.h
197-
tar -czvf linux-x86_64-libchdb-static.tar.gz libchdb.a chdb.h
222+
cp programs/local/chdb.hpp chdb.hpp
223+
tar -czvf linux-x86_64-libchdb-static.tar.gz libchdb.a chdb.h chdb.hpp
198224
- name: Upload libchdb.so to release
199225
if: startsWith(github.ref, 'refs/tags/v')
200226
run: |

.github/workflows/build_macos_arm64_wheels.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ jobs:
170170
eval "$(pyenv init -)"
171171
pyenv shell 3.8
172172
python -m wheel tags --platform-tag=macosx_11_0_arm64 --remove dist/*.whl
173+
- name: Setup core dump
174+
run: |
175+
mkdir -p tmp/core
176+
sudo sysctl kern.corefile=$PWD/tmp/core/core.%P
177+
sudo sysctl kern.coredump=1
178+
ulimit -c unlimited
173179
- name: Test wheel on all Python versions
174180
run: |
175181
export PATH="$HOME/.pyenv/bin:$PATH"
@@ -183,6 +189,25 @@ jobs:
183189
pyenv shell --unset
184190
done
185191
continue-on-error: false
192+
- name: Check and upload core files if present
193+
if: always()
194+
run: |
195+
if ls tmp/core/core.* >/dev/null 2>&1; then
196+
echo "CORE_FILES_FOUND=true" >> $GITHUB_ENV
197+
tar -czvf core-files-macos-arm64.tar.gz tmp/core/core.*
198+
echo "Core files tar created: core-files-macos-arm64.tar.gz"
199+
ls -lh core-files-macos-arm64.tar.gz
200+
else
201+
echo "CORE_FILES_FOUND=false" >> $GITHUB_ENV
202+
echo "No core files found in tmp/core"
203+
fi
204+
continue-on-error: true
205+
- name: Upload core files artifact
206+
if: always() && env.CORE_FILES_FOUND == 'true'
207+
uses: actions/upload-artifact@v4
208+
with:
209+
name: core-files-macos-arm64
210+
path: core-files-macos-arm64.tar.gz
186211
- name: Show files
187212
run: ls -lh dist
188213
shell: bash
@@ -195,11 +220,13 @@ jobs:
195220
- name: Packege libchdb.so
196221
run: |
197222
cp programs/local/chdb.h chdb.h
198-
tar -czvf macos-arm64-libchdb.tar.gz libchdb.so chdb.h
223+
cp programs/local/chdb.hpp chdb.hpp
224+
tar -czvf macos-arm64-libchdb.tar.gz libchdb.so chdb.h chdb.hpp
199225
- name: Package libchdb.a
200226
run: |
201227
cp programs/local/chdb.h chdb.h
202-
tar -czvf macos-arm64-libchdb-static.tar.gz libchdb.a chdb.h
228+
cp programs/local/chdb.hpp chdb.hpp
229+
tar -czvf macos-arm64-libchdb-static.tar.gz libchdb.a chdb.h chdb.hpp
203230
- name: Upload libchdb.so to release
204231
if: startsWith(github.ref, 'refs/tags/v')
205232
run: |

.github/workflows/build_macos_x86_wheels.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ jobs:
171171
eval "$(pyenv init -)"
172172
pyenv shell 3.8
173173
python -m wheel tags --platform-tag=macosx_10_15_x86_64 --remove dist/*.whl
174+
- name: Setup core dump collection
175+
run: |
176+
mkdir -p tmp/core
177+
sudo sysctl kern.corefile=$PWD/tmp/core/core.%P
178+
sudo sysctl kern.coredump=1
179+
ulimit -c unlimited
174180
- name: Test wheel on all Python versions
175181
run: |
176182
export PATH="$HOME/.pyenv/bin:$PATH"
@@ -184,6 +190,25 @@ jobs:
184190
pyenv shell --unset
185191
done
186192
continue-on-error: false
193+
- name: Check and upload core files if present
194+
if: always()
195+
run: |
196+
if ls tmp/core/core.* >/dev/null 2>&1; then
197+
echo "CORE_FILES_FOUND=true" >> $GITHUB_ENV
198+
tar -czvf core-files-macos-x86_64.tar.gz tmp/core/core.*
199+
echo "Core files tar created: core-files-macos-x86_64.tar.gz"
200+
ls -lh core-files-macos-x86_64.tar.gz
201+
else
202+
echo "CORE_FILES_FOUND=false" >> $GITHUB_ENV
203+
echo "No core files found in tmp/core"
204+
fi
205+
continue-on-error: true
206+
- name: Upload core files artifact
207+
if: always() && env.CORE_FILES_FOUND == 'true'
208+
uses: actions/upload-artifact@v4
209+
with:
210+
name: core-files-macos-x86_64
211+
path: core-files-macos-x86_64.tar.gz
187212
- name: Show files
188213
run: ls -lh dist
189214
shell: bash
@@ -196,11 +221,13 @@ jobs:
196221
- name: Packege libchdb.so
197222
run: |
198223
cp programs/local/chdb.h chdb.h
199-
tar -czvf macos-x86_64-libchdb.tar.gz libchdb.so chdb.h
224+
cp programs/local/chdb.hpp chdb.hpp
225+
tar -czvf macos-x86_64-libchdb.tar.gz libchdb.so chdb.h chdb.hpp
200226
- name: Package libchdb.a
201227
run: |
202228
cp programs/local/chdb.h chdb.h
203-
tar -czvf macos-x86_64-libchdb-static.tar.gz libchdb.a chdb.h
229+
cp programs/local/chdb.hpp chdb.hpp
230+
tar -czvf macos-x86_64-libchdb-static.tar.gz libchdb.a chdb.h chdb.hpp
204231
- name: Upload libchdb.so to release
205232
if: startsWith(github.ref, 'refs/tags/v')
206233
run: |

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,11 @@ test_main
247247
/tests/data
248248
/examples/chdbStub
249249
/examples/chdbSimple
250+
/examples/chdbCppBasic
251+
/examples/chdbCppAdvanced
252+
/examples/chdbCppErrorHandling
253+
/examples/chdbCppStreaming
254+
/examples/:memory:
250255
/examples/chdbDlopen
251256
libchdb.so
252257
*.gz

0 commit comments

Comments
 (0)