66 upload :
77 description : ' Upload to PyPI'
88 type : boolean
9+ required : false
910 default : false
1011
1112 python-version :
1213 description : ' Python version to run on'
13- required : true
1414 type : string
15+ required : true
1516 default : " 3.13"
1617
1718 target :
18- type : string
1919 description : " target os to build for: linux,macos,windows"
20- default : " linux,macos,windows"
21-
22- cibw-skip :
2320 type : string
24- description : ' CIBUILDWHEEL builds pattern to skip, goes to CIBW_SKIP env'
2521 required : false
26- default : ' cp36* cp37* pp*i686 *musllinux*'
27-
28- env :
29- CIBW_TEST_COMMAND_LINUX : >
30- pytest {project}/tests/unit &&
31- EVENT_LOOP_MANAGER=gevent pytest {project}/tests/unit/io/test_geventreactor.py
32-
33- CIBW_TEST_COMMAND_MACOS : " pytest {project}/tests/unit -k 'not (test_multi_timer_validation or test_empty_connections or test_timer_cancellation)' "
34- CIBW_TEST_COMMAND_WINDOWS : " pytest {project}/tests/unit -k \" not (test_deserialize_date_range_year or test_datetype or test_libevreactor)\" "
35- CIBW_BEFORE_TEST : " pip install -r {project}/test-requirements.txt"
36- CIBW_BEFORE_BUILD_LINUX : " rm -rf ~/.pyxbld && rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux && yum install -y libffi-devel libev libev-devel openssl openssl-devel"
37- CIBW_ENVIRONMENT : " CASS_DRIVER_BUILD_CONCURRENCY=2 CASS_DRIVER_BUILD_EXTENSIONS_ARE_MUST=yes CFLAGS='-g0 -O3'"
38- CIBW_SKIP : cp36* cp37* pp*i686 *musllinux*
39- CIBW_MANYLINUX_X86_64_IMAGE : manylinux_2_28
40- CIBW_MANYLINUX_PYPY_X86_64_IMAGE : manylinux_2_28
41- CIBW_MANYLINUX_AARCH64_IMAGE : manylinux_2_28
42- CIBW_MANYLINUX_PYPY_AARCH64_IMAGE : manylinux_2_28
22+ default : " linux,macos,windows"
4323
4424jobs :
4525 prepare-matrix :
10989 if : runner.os == 'Windows'
11090 uses : turtlebrowser/get-conan@main
11191
112- - name : configure libev for Windows
92+ - name : Configure libev for Windows
11393 if : runner.os == 'Windows'
11494 run : |
11595 conan profile detect
@@ -120,58 +100,34 @@ jobs:
120100 run : |
121101 brew install libev
122102
123- - name : Overwrite for Linux 64
124- if : runner.os == 'Linux' && matrix.platform == 'x86_64'
125- run : |
126- echo "CIBW_BUILD=cp3*_x86_64" >> $GITHUB_ENV
127-
128- - name : Overwrite for Linux PyPy
129- if : runner.os == 'Linux' && matrix.platform == 'PyPy'
103+ - name : Overwrite for MacOS
104+ if : runner.os == 'MacOS'
130105 run : |
131- echo "CIBW_BUILD=pp*" >> $GITHUB_ENV
132- echo "CIBW_TEST_COMMAND_LINUX=" >> $GITHUB_ENV
133-
134- - name : Overwrite for Windows 64
135- if : runner.os == 'Windows' && matrix.platform == 'win64'
136- run : |
137- echo "CIBW_BUILD=cp*win_amd64" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
138- echo "CIBW_ENVIRONMENT_WINDOWS= CC=clang CXX=clang++" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
139-
140- - name : Overwrite for Windows PyPY
141- if : runner.os == 'Windows' && matrix.platform == 'PyPy'
142- run : |
143- echo "CIBW_BUILD=pp*" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
144- echo "CIBW_TEST_COMMAND_WINDOWS=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
145-
146- - name : Overwrite for MacOs
147- if : runner.os == 'MacOs' && matrix.platform == 'all'
148- run : |
149- echo "CIBW_BUILD=cp39* cp310* cp311* cp312* cp313*" >> $GITHUB_ENV
150- echo "CIBW_BEFORE_TEST_MACOS=pip install -r {project}/test-requirements.txt pytest" >> $GITHUB_ENV
106+ ##### Set MACOSX_DEPLOYMENT_TARGET
151107 if [ "${{ matrix.os }}" == "macos-13" ]; then
152108 echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV;
153109 echo "Enforcing target deployment for 13.0"
154110 elif [ "${{ matrix.os }}" == "macos-14" ]; then
155111 echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV;
156112 echo "Enforcing target deployment for 14.0"
157- else
158- echo "Unknown macos version" && false;
159113 fi
160114
161- - name : Overwrite for MacOs PyPy
162- if : runner.os == 'MacOs' && matrix.platform == 'PyPy'
115+ - name : Set build target
116+ shell : bash
163117 run : |
164- echo "CIBW_BUILD=pp*" >> $GITHUB_ENV
165- echo "CIBW_BEFORE_TEST_MACOS=pip install -r {project}/test-requirements.txt pytest" >> $GITHUB_ENV
166- echo "CIBW_TEST_COMMAND_MACOS=" >> $GITHUB_ENV
118+ if [[ "${{ matrix.platform }}" == "PyPy" ]]; then
119+ echo "CIBW_BUILD=pp*" >> $GITHUB_ENV;
120+ else
121+ echo "CIBW_BUILD=cp*" >> $GITHUB_ENV;
122+ fi
167123
168124 - name : Build wheels
169125 run : |
170126 python3 -m cibuildwheel --output-dir wheelhouse
171127
172128 - uses : actions/upload-artifact@v4
173129 with :
174- name : wheels-${{ matrix .os }}-${{ matrix.platform }}
130+ name : wheels-${{ runner .os }}-${{ matrix.platform }}
175131 path : ./wheelhouse/*.whl
176132
177133 build-sdist :
@@ -241,9 +197,6 @@ jobs:
241197 permissions :
242198 id-token : write
243199
244- # upload to PyPI on every tag starting with 'v'
245- # alternatively, to publish when a GitHub Release is created, use the following rule:
246- # if: github.event_name == 'release' && github.event.action == 'published'
247200 steps :
248201 - uses : actions/download-artifact@v4
249202 with :
0 commit comments