@@ -322,12 +322,17 @@ jobs:
322322 key : ${{ matrix.os }}
323323 max-size : 5G
324324 append-timestamp : true
325- - name : Prepare chdb/build.sh
325+ - name : Run chdb/build.sh
326+ timeout-minutes : 300
326327 run : |
327328 python3 -m pip install pybind11
328329 export PATH=$(brew --prefix llvm@16)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
329330 export CC=$(brew --prefix llvm@16)/bin/clang
330- export CXX=$(brew --prefix llvm@16)/bin/clang++
331+ export CXX=$(brew --prefix llvm@16)/bin/clang++
332+ bash gen_manifest.sh
333+ bash ./chdb/build.sh
334+ python3 -m pip install pandas pyarrow
335+ bash -x ./chdb/test_smoke.sh
331336 continue-on-error : false
332337 - name : Check ccache statistics
333338 run : |
@@ -336,24 +341,6 @@ jobs:
336341 df -h
337342 env :
338343 CIBW_ENVIRONMENT_MACOS : " PATH=$(brew --prefix llvm@16)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin CC=$(brew --prefix llvm@16)/bin/clang CXX=$(brew --prefix llvm@16)/bin/clang++"
339- - name : Remove /usr/local/bin/python3
340- run : |
341- sudo rm -f /usr/local/bin/python3
342- - name : Install dependencies for building wheels
343- run : |
344- python3 -m pip install -U pip tox pybind11 twine setuptools wheel
345- python3 -m pip install cibuildwheel==2.16.2
346- - name : Build wheels
347- run : python3 -m cibuildwheel --output-dir wheelhouse
348- timeout-minutes : 300
349- env :
350- CIBW_ENVIRONMENT_MACOS : " PATH=$(brew --prefix llvm@16)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin CC=$(brew --prefix llvm@16)/bin/clang CXX=$(brew --prefix llvm@16)/bin/clang++"
351- CIBW_DEBUG : 1
352- CIBW_BEFORE_BUILD : " which python3 && pip install -U pip tox pybind11 && python3 -m pybind11 --includes && bash -x gen_manifest.sh && bash chdb/build.sh"
353- CIBW_BUILD_VERBOSITY : 3
354- # CIBW_BUILD: "cp38-macosx_x86_64 cp39-macosx_x86_64 cp310-macosx_x86_64"
355- CIBW_TEST_REQUIRES : " pyarrow pandas psutil"
356- CIBW_TEST_COMMAND : " cd {project} && make test"
357344 - name : Keep killall ccache and wait for ccache to finish
358345 if : always()
359346 run : |
@@ -362,17 +349,37 @@ jobs:
362349 killall ccache; \
363350 sleep 10; \
364351 done
352+ - name : Install dependencies for building wheels
353+ run : |
354+ python3 -m pip install -U pip tox pybind11 twine setuptools wheel
355+ - name : Build wheels
356+ timeout-minutes : 300
357+ run : |
358+ export PATH=$(brew --prefix llvm@16)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
359+ export CC=$(brew --prefix llvm@16)/bin/clang
360+ export CXX=$(brew --prefix llvm@16)/bin/clang++
361+ make wheel
362+ - name : Fix wheel platform tag
363+ run : |
364+ python3 -m wheel tags --platform-tag=macosx_10_15_x86_64 --remove dist/*.whl
365+ - name : Run tests
366+ run : |
367+ python3 -m pip install dist/*.whl
368+ python3 -m pip install pandas pyarrow psutil
369+ python3 -c "import chdb; res = chdb.query('select 1112222222,555', 'CSV'); print(res)"
370+ make test
371+ continue-on-error : false
365372 - name : Show files
366- run : ls -lh wheelhouse
373+ run : ls -lh dist
367374 shell : bash
368375 - uses : actions/upload-artifact@v3
369376 with :
370- path : ./wheelhouse /*.whl
377+ path : ./dist /*.whl
371378 - name : Upload pypi
372379 if : startsWith(github.ref, 'refs/tags/v')
373380 run : |
374381 python3 -m pip install twine
375- python3 -m twine upload wheelhouse /*.whl
382+ python3 -m twine upload dist /*.whl
376383 env :
377384 TWINE_USERNAME : __token__
378385 TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
0 commit comments