Skip to content

Commit 28cbab5

Browse files
committed
- update action
1 parent d58ff4d commit 28cbab5

2 files changed

Lines changed: 41 additions & 9 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/upload-artifact@v4
2424
with:
2525
path: dist/*.tar.gz
26-
name: sdist
26+
name: libSBML-sdist
2727

2828
build_wheels:
2929
name: Wheel on ${{ matrix.os }} for ${{ matrix.python_version }}
@@ -38,23 +38,54 @@ jobs:
3838
steps:
3939
- uses: actions/download-artifact@v4
4040
with:
41-
name: sdist
41+
name: libSBML-sdist
4242

4343
- name: Extract sdist into the current directory
4444
shell: bash
4545
run: |
4646
tar zxf *.tar.gz --strip-components=1
4747
48-
- name: install swig on macos
49-
if: matrix.os == 'macos-latest'
50-
run: brew install swig
48+
- name: Install cibuildwheel
49+
run: |
50+
python -m pip install cibuildwheel==2.23.2 swig==4.2.1 cmake==3.31.6
51+
52+
# print versions
53+
python --version
54+
cmake --version
55+
swig -version
5156

52-
- uses: pypa/cibuildwheel@v2.21.3
57+
58+
- name: Build Wheels
59+
run: |
60+
python -m cibuildwheel --output-dir wheelhouse
5361
env:
5462
CIBW_BUILD: ${{ matrix.python_version }}
5563
CIBW_ARCHS_MACOS: x86_64 arm64
5664

5765
- name: Upload wheels
58-
uses: actions/upload-artifact@v3
66+
uses: actions/upload-artifact@v4
5967
with:
60-
path: wheelhouse/*.whl
68+
path: wheelhouse/*.whl
69+
name: libSBML-${{ matrix.os }}-${{ matrix.python_version }}-${{ strategy.job-index }}
70+
71+
merge_wheels:
72+
needs: [build_wheels]
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/download-artifact@v4
76+
with:
77+
pattern: libSBML-*
78+
path: dist
79+
80+
- name: Move wheels from dist subfolder to dist folder
81+
run: |
82+
find dist -name "*.whl" -exec mv {} dist/ \;
83+
find dist -name "*.tar.gz" -exec mv {} dist/ \;
84+
find dist -type d -empty -delete
85+
86+
- uses: actions/upload-artifact@v4
87+
with:
88+
name: libSBML-combined
89+
path: dist
90+
91+

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ def build_cmake(self, extension):
354354
ext_modules=[CMakeExtension('_libsbml')],
355355
cmdclass={
356356
'build_ext': CMakeBuild,
357-
}
357+
},
358+
setup_requires=['cmake==3.31.6', 'swig==4.2.1']
358359
)
359360

0 commit comments

Comments
 (0)