@@ -11,76 +11,113 @@ jobs:
1111 name : Make SDist
1212 runs-on : ubuntu-latest
1313 steps :
14- - uses : actions/checkout@v2
14+ - uses : actions/checkout@v4
1515 with :
16- fetch-depth : 0 # Optional, use if you use setuptools_scm
17- submodules : recursive # Optional, use if you have submodules
16+ fetch-depth : 0
17+
18+ - name : checkout needed submodules
19+ run : |
20+ ./.ci/checkout-submodules.sh
1821
1922 - name : Build SDist
2023 run : |
2124 cp src/bindings/python/setup.py .
2225 cp src/bindings/python/MANIFEST.in .
2326 pipx run build --sdist
2427
25- - uses : actions/upload-artifact@v2
28+ - uses : actions/upload-artifact@v4
2629 with :
2730 path : dist/*.tar.gz
2831 name : libSEDML-sdist
2932
3033 build_wheels :
3134 name : Wheel on ${{ matrix.os }} for ${{ matrix.python_version }}
3235 runs-on : ${{ matrix.os }}
36+ needs : [make_sdist]
3337 strategy :
3438 fail-fast : false
3539 matrix :
36- os : [ubuntu-20 .04, windows-2019 , macos-11 ]
37- python_version : ['cp37 -*', 'cp38 -*', 'cp39 -*', 'cp310 -*', 'cp311 -*']
40+ os : [ubuntu-latest, ubuntu-24 .04-arm , windows-latest , macos-13, macos-latest ]
41+ python_version : ['cp39 -*', 'cp310 -*', 'cp311 -*', 'cp312 -*', 'cp313 -*']
3842
3943 steps :
40- - uses : actions/checkout@v1
44+ - uses : seanmiddleditch/gha-setup-ninja@master
45+
46+ - name : Add msbuild to PATH (Windows)
47+ if : matrix.os == 'windows-latest'
48+ uses : ilammy/msvc-dev-cmd@v1
49+
50+ - name : Install cibuildwheel
51+ run : |
52+ python -m pip install cibuildwheel==2.23.2 swig==4.2.1 cmake==3.31.6
53+
54+ # print versions
55+ python --version
56+ cmake --version
57+ swig -version
58+
59+ - name : Download sdist
60+ uses : actions/download-artifact@v4
4161 with :
42- fetch-depth : 0 # Optional, use if you use setuptools_scm
43- submodules : recursive # Optional, use if you have submodules
62+ name : libSEDML-sdist
63+ path : .
4464
45- - name : Copy setup.py
65+ - name : Unpack sdist
66+ shell : bash
4667 run : |
47- cp src/bindings/python/setup.py .
68+ ls -la
69+ tar zxf python_libsedml-*.tar.gz
70+ mv python_libsedml-*/* .
71+ rm -rf python_libsedml-*
72+ ls -la
73+
4874
49- 75+ - name : Build wheels
5076 env :
51- CIBW_BUILD : ${{ matrix.python_version }}
52- CIBW_ARCHS_MACOS : x86_64 arm64
77+ CIBW_BUILD : ${{ matrix.python_version }}
78+ CIBW_SKIP : " *-musllinux* cp36-* cp37-* cp38-* *-win32"
79+ run : |
80+ python -m cibuildwheel --output-dir wheelhouse
5381
5482 - name : Upload wheels
55- uses : actions/upload-artifact@v2
83+ uses : actions/upload-artifact@v4
5684 with :
5785 path : wheelhouse/*.whl
58- name : libSEDML-${{ matrix.os }}
59-
60- upload_all :
61- needs : [build_wheels, make_sdist ]
86+ name : libSEDML-${{ matrix.os }}-${{ strategy.job-index }}
87+
88+ merge_wheels :
89+ needs : [build_wheels]
6290 runs-on : ubuntu-latest
63- if : github.event_name == 'release' && github.event.action == 'published'
6491 steps :
65- - uses : actions/download-artifact@v2
92+ - uses : actions/download-artifact@v4
6693 with :
67- name : libSEDML-sdist
68- path : dist
69- - uses : actions/download-artifact@v2
70- with :
71- name : libSEDML-ubuntu-20.04
94+ pattern : libSEDML-*
7295 path : dist
73- - uses : actions/download-artifact@v2
96+
97+ - name : Move wheels from dist subfolder to dist folder
98+ run : |
99+ find dist -name "*.whl" -exec mv {} dist/ \;
100+ find dist -name "*.tar.gz" -exec mv {} dist/ \;
101+ find dist -type d -empty -delete
102+
103+ - uses : actions/upload-artifact@v4
74104 with :
75- name : libSEDML-macos-10.15
105+ name : libSEDML-combined
76106 path : dist
77- - uses : actions/download-artifact@v2
107+
108+
109+ upload_all :
110+ needs : [merge_wheels]
111+ runs-on : ubuntu-latest
112+ if : github.event_name == 'release' && github.event.action == 'published'
113+ steps :
114+ - uses : actions/download-artifact@v4
78115 with :
79- name : libSEDML-windows-2019
116+ name : libSEDML-combined
80117 path : dist
81118
82- - uses : pypa/gh-action-pypi-publish@v1.4.2
119+ - uses : pypa/gh-action-pypi-publish@release/v1
83120 with :
84121 user : __token__
85122 password : ${{ secrets.PYPI_API_TOKEN }}
86- skip_existing : true
123+
0 commit comments