Skip to content

Commit aafdec8

Browse files
authored
Action: Update Windows wheel build (#541)
1 parent 6979a47 commit aafdec8

File tree

1 file changed

+10
-26
lines changed

1 file changed

+10
-26
lines changed

.github/workflows/windows.yaml

+10-26
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ on:
44
push:
55
branches:
66
- master
7+
- ci
78
workflow_dispatch:
89

910
jobs:
1011
build:
1112
runs-on: windows-latest
1213
env:
13-
CONNECTOR_VERSION: "3.2.4"
14+
CONNECTOR_VERSION: "3.3.1"
1415
steps:
1516

1617
- name: Cache Connector
@@ -57,36 +58,19 @@ jobs:
5758
EOF
5859
cat site.cfg
5960
61+
- uses: actions/setup-python@v2
62+
- name: Install cibuildwheel
63+
run: python -m pip install cibuildwheel==2.7.0
6064
- name: Build wheels
61-
shell: cmd
6265
working-directory: mysqlclient
63-
run: |
64-
py -3.10 -m pip install -U setuptools wheel pip
65-
py -3.10 setup.py bdist_wheel
66-
py -3.9 -m pip install -U setuptools wheel pip
67-
py -3.9 setup.py bdist_wheel
68-
py -3.8 -m pip install -U setuptools wheel pip
69-
py -3.8 setup.py bdist_wheel
70-
py -3.7 -m pip install -U setuptools wheel pip
71-
py -3.7 setup.py bdist_wheel
66+
env:
67+
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
68+
CIBW_ARCHS: "AMD64"
69+
CIBW_TEST_COMMAND: "python -c \"import MySQLdb; print(MySQLdb.version_info)\" "
70+
run: "python -m cibuildwheel --prerelease-pythons --output-dir dist"
7271

7372
- name: Upload Wheel
7473
uses: actions/upload-artifact@v2
7574
with:
7675
name: win-wheels
7776
path: mysqlclient/dist/*.whl
78-
79-
- name: Check wheels
80-
shell: bash
81-
working-directory: mysqlclient/dist
82-
run: |
83-
ls -la
84-
py -3.10 -m pip install --no-index --find-links . mysqlclient
85-
py -3.10 -c "import MySQLdb; print(MySQLdb.version_info)"
86-
py -3.9 -m pip install --no-index --find-links . mysqlclient
87-
py -3.9 -c "import MySQLdb; print(MySQLdb.version_info)"
88-
py -3.8 -m pip install --no-index --find-links . mysqlclient
89-
py -3.8 -c "import MySQLdb; print(MySQLdb.version_info)"
90-
py -3.7 -m pip install --no-index --find-links . mysqlclient
91-
py -3.7 -c "import MySQLdb; print(MySQLdb.version_info)"
92-

0 commit comments

Comments
 (0)