Skip to content

Commit dd2666a

Browse files
Daniel-Robbinsauxten
authored andcommitted
Build py38 py39 py310 on macOS 12
1 parent 6d0dc68 commit dd2666a

File tree

1 file changed

+2
-122
lines changed

1 file changed

+2
-122
lines changed

.github/workflows/build_wheels.yml

Lines changed: 2 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ jobs:
148148
fail-fast: false
149149
matrix:
150150
os: [ macos-12 ]
151-
# python-version: [ "3.8", "3.9", "3.10", "3.11"]
152-
python-version: [ "3.11", "3.12" ]
151+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12" ]
153152
env:
154153
RUNNER_OS: ${{ matrix.os }}
155154
PYTHON_VERSION: ${{ matrix.python-version }}
@@ -265,125 +264,6 @@ jobs:
265264
TWINE_USERNAME: __token__
266265
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
267266

268-
build_wheels_macos:
269-
name: ${{ matrix.os }} py${{ matrix.python-version }}
270-
runs-on: ${{ matrix.os }}
271-
strategy:
272-
fail-fast: false
273-
matrix:
274-
os: [ macos-11 ]
275-
# python-version: [ "3.8", "3.9", "3.10"]
276-
python-version: [ "3.8", "3.9", "3.10" ]
277-
env:
278-
RUNNER_OS: ${{ matrix.os }}
279-
PYTHON_VERSION: ${{ matrix.python-version }}
280-
steps:
281-
- name: Install Offical Python
282-
uses: actions/setup-python@v4
283-
with:
284-
python-version: ${{ matrix.python-version }}
285-
- name: Check Python version
286-
run: |
287-
python3 -VV
288-
python3-config --includes
289-
- name: Install clang++ for macOS
290-
if: matrix.os == 'macos-11'
291-
run: |
292-
pwd
293-
uname -a
294-
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
295-
brew update
296-
brew install ca-certificates lz4 mpdecimal openssl@3 readline sqlite xz z3 zstd
297-
brew install --ignore-dependencies llvm@16
298-
brew install git ccache ninja libtool gettext gcc binutils grep findutils nasm
299-
cd /usr/local/opt/ && sudo rm -f llvm && sudo ln -sf llvm@16 llvm
300-
export PATH=$(brew --prefix llvm@16)/bin:$PATH
301-
which clang++
302-
clang++ --version
303-
ccache -s
304-
- uses: actions/checkout@v3
305-
with:
306-
fetch-depth: 0
307-
- name: Restore submodules cache
308-
uses: actions/cache/restore@v3
309-
id: cache
310-
with:
311-
path: |
312-
contrib/**
313-
key: |
314-
submodule-${{ hashFiles('.gitmodules') }}
315-
- name: Update submodules if cache miss
316-
if: steps.cache.outputs.cache-hit != 'true'
317-
run: |
318-
git submodule update --init --recursive --jobs 4
319-
- name: ccache
320-
uses: hendrikmuhs/[email protected]
321-
with:
322-
key: ${{ matrix.os }}
323-
max-size: 5G
324-
append-timestamp: true
325-
- name: Run chdb/build.sh
326-
timeout-minutes: 300
327-
run: |
328-
python3 -m pip install pybind11
329-
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
330-
export CC=$(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
336-
continue-on-error: false
337-
- name: Check ccache statistics
338-
run: |
339-
ccache -s
340-
ls -lh chdb
341-
df -h
342-
env:
343-
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++"
344-
- name: Keep killall ccache and wait for ccache to finish
345-
if: always()
346-
run: |
347-
sleep 60
348-
while ps -ef | grep ccache | grep -v grep; do \
349-
killall ccache; \
350-
sleep 10; \
351-
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
372-
- name: Show files
373-
run: ls -lh dist
374-
shell: bash
375-
- uses: actions/upload-artifact@v3
376-
with:
377-
path: ./dist/*.whl
378-
- name: Upload pypi
379-
if: startsWith(github.ref, 'refs/tags/v')
380-
run: |
381-
python3 -m pip install twine
382-
python3 -m twine upload dist/*.whl
383-
env:
384-
TWINE_USERNAME: __token__
385-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
386-
387267
# #build for macos12 arm64(Apple Silicon)
388268
# build_wheels_macos_arm64:
389269

@@ -395,7 +275,7 @@ jobs:
395275
name: Retry Expired Builds
396276
runs-on: ubuntu-latest
397277
if: github.event_name == 'push' && cancelled()
398-
needs: [ build_wheels_linux, build_wheels_macos, build_wheels_macos_12 ]
278+
needs: [ build_wheels_linux, build_wheels_macos_12 ]
399279
steps:
400280
- name: Sleep for 20 seconds
401281
run: sleep 20s

0 commit comments

Comments
 (0)