Skip to content

Commit 8caf6cd

Browse files
authored
Update python-package.yml
1 parent b7972bd commit 8caf6cd

File tree

1 file changed

+38
-14
lines changed

1 file changed

+38
-14
lines changed

.github/workflows/python-package.yml

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Install dependencies
4242
run: |
4343
python -m pip install --upgrade pip
44-
pip install toml
44+
python -m pip install toml
4545
- name: Get version from pyproject.toml
4646
id: get_version
4747
run: |
@@ -92,35 +92,59 @@ jobs:
9292
python: "cp313t"
9393
- buildplat: [ windows-2019, win32, "" ]
9494
python: "cp313t"
95-
- buildplat: [ macos-13, macosx_x86_64, openblas ]
95+
- buildplat: [ macos-13, macosx_x86_64, openblas]
9696
python: "cp313t"
9797

9898
steps:
9999
- uses: actions/checkout@v4
100-
100+
101+
- name: Setup MSVC (32-bit)
102+
if: ${{ matrix.buildplat[1] == 'win32' }}
103+
uses: bus1/cabuild/action/msdevshell@e22aba57d6e74891d059d66501b6b5aed8123c4d # v1
104+
with:
105+
architecture: 'x86'
106+
101107
- name: Set up Python
102108
uses: actions/setup-python@v3
103109
with:
104-
python-version: '3.11'
110+
python-version: '3.x'
105111

106112

107113
- name: Install cibuildwheel
108114
run: |
109115
python -m pip install --upgrade pip
110116
python -m pip install cibuildwheel==2.22.0
111-
112-
- name: Build wheels
113-
run: |
114-
python -m cibuildwheel --output-dir wheelhouse
117+
118+
- name: Build wheel
119+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # 2.22
115120
env:
116-
CIBW_SKIP: cp36-* pp*
117-
CIBW_BEFORE_BUILD: >
118-
pip install cmake setuptools setuptools_scm[toml] wheel pybind11 cython numpy
119-
121+
CIBW_PRERELEASE_PYTHONS: True
122+
CIBW_FREE_THREADED_SUPPORT: True
123+
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
124+
125+
- name: install wheel
126+
shell: bash
127+
run: |
128+
python -m pip install ./wheelhouse/*-${{ matrix.python }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}.whl
129+
130+
- name: Test package import and basic functionality
131+
shell: python
132+
run: |
133+
import sudio
134+
from sudio import Master
135+
136+
# Example basic tests
137+
print("Sudio version:", sudio.__version__)
138+
139+
# Attempt to create a Master instance
140+
master = Master()
141+
print("Master instance created successfully")
142+
120143
- uses: actions/upload-artifact@v3
121144
with:
145+
name: ${{ matrix.python }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}
122146
path: ./wheelhouse/*.whl
123-
147+
124148
build_sdist:
125149
name: Build sdist
126150
runs-on: ubuntu-latest
@@ -142,7 +166,7 @@ jobs:
142166
143167
- name: Check README rendering for PyPI
144168
run: |
145-
python -mpip install twine
169+
python -m pip install twine
146170
twine check dist/*
147171
148172
- uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)