1111
1212jobs :
1313 build_wheels :
14- name : cibuildwheel ${{ matrix.os }}/${{ matrix.arch }}/${{ matrix. flavor }}/${{ matrix.target }}
14+ name : cibuildwheel ${{ matrix.os }}/${{ matrix.flavor }}/${{ matrix.target }}
1515 runs-on : ${{ matrix.os }}
1616 strategy :
1717 fail-fast : false
1818 matrix :
19- os : [ubuntu-22.04, macos-13]
20- # separate archs, so they use individual caches
21- arch : [ 'x86_64', 'arm64' ]
19+ # macos-13: x86, macos-14: Arm64
20+ os : [ubuntu-22.04, ubuntu-24.04-arm, macos-13, macos-14]
2221 # skip pypy, https://github.com/pypa/distutils/issues/283
2322 flavor : ['cpython']
2423 # separate musl and many on linux, for mac we just skip one of those
@@ -31,31 +30,13 @@ jobs:
3130 # target: musl
3231 # flavor: pypy
3332 # - os: macos-13
34- # arch: arm64
3533 # flavor: pypy
3634 steps :
3735 - uses : actions/checkout@v4
38- - name : Set up QEMU
39- if : ${{ (runner.os == 'Linux') && (matrix.arch == 'arm64') }}
40- uses : docker/setup-qemu-action@v3
41- with :
42- platforms : all
4336 - name : ccache
4437 uses :
hendrikmuhs/[email protected] 4538 with :
46- key : ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.target }}-${{ matrix.flavor }}-python
47-
48- - name : Sets env for x86_64
49- run : |
50- echo "CIBW_ARCHS_LINUX=auto64" >> $GITHUB_ENV
51- echo "CIBW_ARCHS_MACOS=x86_64" >> $GITHUB_ENV
52- if : matrix.arch == 'x86_64'
53-
54- - name : Sets env for arm64
55- run : |
56- echo "CIBW_ARCHS_LINUX=aarch64" >> $GITHUB_ENV
57- echo "CIBW_ARCHS_MACOS=arm64" >> $GITHUB_ENV
58- if : matrix.arch == 'arm64'
39+ key : ${{ matrix.os }}-${{ matrix.target }}-${{ matrix.flavor }}-python
5940
6041 - name : Skip manylinux for musllinux target
6142 if : ${{ (runner.os == 'Linux') && (matrix.target == 'musl') }}
@@ -83,45 +64,29 @@ jobs:
8364 run : |
8465 brew update && \
8566 brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done && \
86- brew install ccache
67+ brew install ccache zlib snappy boost
8768
88- - name : install mac dependencies X86_64
89- if : ${{ ( runner.os == 'macOS') && (matrix .arch == 'x86_64') }}
69+ - name : set mac deployment target X64
70+ if : runner.os == 'macOS' && runner .arch == 'X64'
9071 run : |
91- echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV && \
92- brew update && \
93- brew install zlib snappy boost
72+ echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV
9473
95- - name : install mac dependencies arm64
96- if : ${{ (runner.os == 'macOS') && (matrix.arch == 'arm64') }}
97- # explicitly install icu4c@76 and [email protected] , not icu4c/boost to avoid unsupported combinations 98- # Note: when brew reinstall finds unsolved deps, it downloads and installs using the wrong arch(x86_64 instead of arm64)
74+ - name : set mac deployment target arm64
75+ if : runner.os == 'macOS' && runner.arch == 'ARM64'
9976 run : |
100- set -e
101- echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV
102- echo "_CMAKE_PREFIX_PATH=${{ github.workspace }}/arm64-homebrew" >> $GITHUB_ENV
103- echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=DYLD_LIBRARY_PATH=${{ github.workspace }}/arm64-homebrew delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}" >> $GITHUB_ENV
104- mkdir arm64-homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm64-homebrew
105- PACKAGES=( icu4c@76 xz lz4 zstd zlib snappy [email protected] ) 106- for PACKAGE in "${PACKAGES[@]}"
107- do
108- arm64-homebrew/bin/brew info $PACKAGE
109- response=$(arm64-homebrew/bin/brew fetch --force --bottle-tag=arm64_ventura $PACKAGE | grep Downloaded )
110- download_path=$(echo $response | xargs -n 1 | tail -1)
111- arm64-homebrew/bin/brew reinstall -vd $download_path
112- done
113- arm64-homebrew/bin/brew config
114- ls /Users/runner/work/keyvi/keyvi/arm64-homebrew
115-
116- - name : Build python wheels for ${{ matrix.os }} on ${{ matrix.arch }}
117- 77+ echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV
78+
79+ - name : Build python wheels for ${{ matrix.os }}
80+ 11881 env :
119- # Skip CPython 3.6 and CPython 3.7
120- CIBW_SKIP : ${{ env.CIBW_SKIP }} cp36-* cp37-*
82+ # Skip CPython 3.{6, 7, 8}
83+ CIBW_SKIP : ${{ env.CIBW_SKIP }} cp36-* cp37-* cp38-*
84+
85+ # only build native packages
86+ CIBW_ARCHS : native
12187
122- # skip testing all python versions on linux arm, only test 3.12
12388 # skip tests on pypy, currently fails for indexer tests
124- CIBW_TEST_SKIP : " *p{38,39,310,311}-m*linux_aarch64 pp*"
89+ CIBW_TEST_SKIP : " pp*"
12590
12691 # (many)linux custom docker images
12792 CIBW_MANYLINUX_X86_64_IMAGE : ' keyvidev/manylinux-builder-x86_64'
@@ -149,7 +114,7 @@ jobs:
149114
150115 - uses : actions/upload-artifact@v4
151116 with :
152- name : artifact-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix. flavor }}-${{ matrix.target }}
117+ name : artifact-${{ matrix.os }}-${{ matrix.flavor }}-${{ matrix.target }}
153118 path : ./wheelhouse/*.whl
154119
155120 build_sdist :
@@ -164,7 +129,7 @@ jobs:
164129 - name : ccache
165130 uses :
hendrikmuhs/[email protected] 166131 with :
167- key : ${{ matrix.os }} -sdist-python
132+ key : ubuntu -sdist-python
168133
169134 - name : Build SDist
170135 run : |
0 commit comments