1+ name : Build pre release python versions
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ python-version :
7+ description : ' Python version to run against'
8+ required : true
9+ type : string
10+
11+ cibw-skip :
12+ type : string
13+ description : ' CIBUILDWHEEL builds pattern to skip, goes to CIBW_SKIP env'
14+ required : false
15+ default : ' cp35* cp36* *musllinux*'
16+
17+ cibw-build :
18+ type : string
19+ description : ' CIBUILDWHEEL builds pattern to build, goes to CIBW_BUILD env'
20+ required : false
21+ default : ' *_x86_64'
22+
23+ matrix :
24+ type : string
25+ description : ' job matrix json definition'
26+ required : false
27+ default : ' [{"os":"ubuntu-20.04","platform":"x86_64"},{"os":"ubuntu-20.04","platform":"PyPy"},{"os":"windows-latest","platform":"win64"},{"os":"windows-latest","platform":"PyPy"},{"os":"macos-latest","platform":"all"},{"os":"macos-13","platform":"all"},{"os":"macos-latest","platform":"PyPy"}]'
28+
29+ env :
30+ CIBW_TEST_COMMAND_LINUX : " pytest {project}/tests/unit"
31+ CIBW_BEFORE_TEST : " pip install -r {project}/test-requirements.txt"
32+ 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"
33+ CIBW_ENVIRONMENT : " CASS_DRIVER_BUILD_CONCURRENCY=2 CFLAGS='-g0 -O3'"
34+ CIBW_PRERELEASE_PYTHONS : True
35+ CIBW_SKIP : ${{ inputs.cibw-skip }}
36+ CIBW_MANYLINUX_X86_64_IMAGE : manylinux_2_28
37+ CIBW_BUILD : ${{ inputs.cibw-build }}
38+
39+ jobs :
40+ build_wheels :
41+ name : Build wheels ${{ matrix.os }} (${{ matrix.platform }})
42+ runs-on : ${{ matrix.os }}
43+ strategy :
44+ fail-fast : false
45+ matrix :
46+ include : ${{ fromJson(needs.prepare.outputs.matrix) }}
47+ steps :
48+ - uses : actions/checkout@v4
49+
50+ - uses : actions/setup-python@v5
51+ name : Install Python
52+ with :
53+ python-version : ' 3.13'
54+ - name : Enable pip installing globally
55+ if : runner.os == 'MacOs' || runner.os == 'Windows'
56+ run : |
57+ echo "PIP_BREAK_SYSTEM_PACKAGES=1" >> $GITHUB_ENV
58+
59+ - name : Install cibuildwheel
60+ run : |
61+ python3 -m pip install cibuildwheel==2.22.0
62+
63+ - name : Install OpenSSL for Windows
64+ if : runner.os == 'Windows'
65+ run : |
66+ choco install openssl --version=3.3.2 -f -y
67+
68+ - name : Install Conan
69+ if : runner.os == 'Windows'
70+ uses : turtlebrowser/get-conan@main
71+
72+ - name : configure libev for Windows
73+ if : runner.os == 'Windows'
74+ run : |
75+ conan profile detect
76+ conan install conanfile.py
77+
78+ - name : Install OpenSSL for MacOS
79+ if : runner.os == 'MacOs'
80+ run : |
81+ brew install libev
82+
83+ - name : Overwrite for Linux 64
84+ if : runner.os == 'Linux' && matrix.platform == 'x86_64'
85+ run : |
86+ echo "CIBW_BUILD=cp3*_x86_64" >> $GITHUB_ENV
87+
88+ - name : Overwrite for Linux PyPy
89+ if : runner.os == 'Linux' && matrix.platform == 'PyPy'
90+ run : |
91+ echo "CIBW_BUILD=pp*" >> $GITHUB_ENV
92+ echo "CIBW_TEST_COMMAND_LINUX=" >> $GITHUB_ENV
93+
94+ - name : Overwrite for Windows 64
95+ if : runner.os == 'Windows' && matrix.platform == 'win64'
96+ run : |
97+ echo "CIBW_BUILD=cp*win_amd64" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
98+
99+ - name : Overwrite for Windows PyPY
100+ if : runner.os == 'Windows' && matrix.platform == 'PyPy'
101+ run : |
102+ echo "CIBW_BUILD=pp*" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
103+ echo "CIBW_TEST_COMMAND_WINDOWS=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
104+
105+ - name : Overwrite for MacOs
106+ if : runner.os == 'MacOs' && matrix.platform == 'all'
107+ run : |
108+ echo "CIBW_BUILD=cp39* cp310* cp311* cp312* cp313*" >> $GITHUB_ENV
109+ echo "CIBW_BEFORE_TEST_MACOS=pip install -r {project}/test-requirements.txt pytest" >> $GITHUB_ENV
110+ echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV
111+
112+ - name : Overwrite for MacOs PyPy
113+ if : runner.os == 'MacOs' && matrix.platform == 'PyPy'
114+ run : |
115+ echo "CIBW_BUILD=pp*" >> $GITHUB_ENV
116+ echo "CIBW_BEFORE_TEST_MACOS=pip install -r {project}/test-requirements.txt pytest" >> $GITHUB_ENV
117+ echo "CIBW_TEST_COMMAND_MACOS=" >> $GITHUB_ENV
118+
119+ - name : Build wheels
120+ run : |
121+ python3 -m cibuildwheel --output-dir wheelhouse
0 commit comments