2121 required : false
2222 default : " linux,macos,windows"
2323
24- cibw-skip :
25- description : ' CIBUILDWHEEL builds pattern to skip, goes to CIBW_SKIP env'
26- type : string
27- required : false
28- default : ' cp2* cp35* cp36* cp37* *i686 *musllinux*'
29-
30- target-wheels-python-versions :
31- description : " List of python version to build wheels for, to be translated to CIBW_BUILD env"
32- type : string
33- required : false
34- default : 3.8 3.9 3.10 3.11 3.12 3.13
35-
36- cibw-manylinux-default-image :
37- description : " A manylinux image to be used by cibuildwheel"
38- type : string
39- required : false
40- default : " manylinux_2_28"
41-
42- env :
43- CIBW_TEST_COMMAND_LINUX : >
44- pytest {project}/tests/unit &&
45- EVENT_LOOP_MANAGER=gevent pytest {project}/tests/unit/io/test_geventreactor.py
46-
47- CIBW_TEST_COMMAND_MACOS : " pytest {project}/tests/unit -k 'not (test_multi_timer_validation or test_empty_connections or test_timer_cancellation)' "
48- CIBW_TEST_COMMAND_WINDOWS : " pytest {project}/tests/unit -k \" not (test_deserialize_date_range_year or test_datetype or test_libevreactor)\" "
49- CIBW_BEFORE_TEST : " pip install -r {project}/test-requirements.txt"
50- 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"
51- CIBW_ENVIRONMENT : " CASS_DRIVER_BUILD_CONCURRENCY=2 CASS_DRIVER_BUILD_EXTENSIONS_ARE_MUST=yes CFLAGS='-g0 -O3'"
52- CIBW_SKIP : ${{ inputs.cibw-skip }}
53- CIBW_MANYLINUX_X86_64_IMAGE : ${{ inputs.cibw-manylinux-default-image }}
54- CIBW_MANYLINUX_PYPY_X86_64_IMAGE : ${{ inputs.cibw-manylinux-default-image }}
55- CIBW_MANYLINUX_AARCH64_IMAGE : ${{ inputs.cibw-manylinux-default-image }}
56- CIBW_MANYLINUX_PYPY_AARCH64_IMAGE : ${{ inputs.cibw-manylinux-default-image }}
57- CIBW_ENVIRONMENT_WINDOWS : " CC=clang CXX=clang++"
58-
5924jobs :
6025 prepare-matrix :
6126 name : " Prepare matrix to run for ${{ inputs.python-version }} on `${{ inputs.target }}`"
@@ -138,35 +103,6 @@ jobs:
138103 - name : Overwrite for Linux and MacOS
139104 if : runner.os == 'Linux' || runner.os == 'MacOS'
140105 run : |
141-
142- ##### Set CIBW_BUILD
143- pre=""
144- post=""
145-
146- if [[ "${{ matrix.platform }}" == "PyPy" ]]; then
147- # Will convert `inputs.target-wheels-python-versions` (3.11 3.12 3.13) into `pp311* pp312* pp313*`
148- pre="pp"
149- post="*"
150- elif [[ "${{ matrix.platform }}" == "all" ]]; then
151- # Convert `inputs.target-wheels-python-versions` (3.11 3.12 3.13) into `cp311* cp312* cp313*`
152- pre="cp"
153- post="*"
154- elif [[ "${{ matrix.platform }}" == "x86_64" ]]; then
155- # Convert `inputs.target-wheels-python-versions` (3.11 3.12 3.13) into `cp311*x86_64 cp312*x86_64 cp313*x86_64`
156- pre="cp"
157- post="*x86_64"
158- else
159- echo "Unknown target platfor '${{ matrix.platform }}'"
160- exit 1
161- fi
162-
163- CIBW_BUILD=""
164- for item in `echo "${{ inputs.target-wheels-python-versions }}" | tr " " "\n"`; do
165- CIBW_BUILD="${CIBW_BUILD} ${pre}${item//.}${post}"
166- done
167- echo "Resulted CIBW_BUILD: $CIBW_BUILD"
168- echo "CIBW_BUILD=$CIBW_BUILD" >> $GITHUB_ENV
169-
170106 ##### Set MACOSX_DEPLOYMENT_TARGET
171107 if [ "${{ matrix.os }}" == "macos-13" ]; then
172108 echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV;
@@ -175,31 +111,6 @@ jobs:
175111 echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV;
176112 echo "Enforcing target deployment for 14.0"
177113 fi
178-
179- ##### Set CIBW_TEST_COMMAND_MACOS and CIBW_TEST_COMMAND_LINUX
180- if [[ "${{ matrix.platform }}" == "PyPy" ]]; then
181- echo "CIBW_TEST_COMMAND_MACOS=" >> $GITHUB_ENV
182- echo "CIBW_TEST_COMMAND_LINUX=" >> $GITHUB_ENV
183- fi
184-
185- - name : Overwrite for Windows
186- if : runner.os == 'Windows'
187- run : |
188- ##### Set CIBW_BUILD
189- if ("${{ matrix.platform }}" -match "PyPy") {
190- # Convert `inputs.target-wheels-python-versions` (3.11 3.12 3.13) into `pp311* pp312* pp313*`
191- $cibw_build_patterns = (("${{ inputs.target-wheels-python-versions }}" -replace '\.') -split " " | ForEach-Object { "pp${_}*" }) -join " "
192- echo "CIBW_BUILD=$cibw_build_patterns" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
193- } else {
194- # Convert `inputs.target-wheels-python-versions` (3.11 3.12 3.13) into `cp311*amd64 cp312*amd64 cp313*amd64`
195- $cibw_build_patterns = (("${{ inputs.target-wheels-python-versions }}" -replace '\.') -split " " | ForEach-Object { "cp${_}*amd64" }) -join " "
196- echo "CIBW_BUILD=$cibw_build_patterns" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
197- }
198-
199- ##### Set CIBW_TEST_COMMAND_WINDOWS
200- if ("${{ matrix.platform }}" -match "PyPy") {
201- echo "CIBW_TEST_COMMAND_WINDOWS=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
202- }
203114
204115 - name : Build wheels
205116 run : |
0 commit comments