@@ -13,101 +13,77 @@ concurrency:
1313 cancel-in-progress : true
1414
1515jobs :
16- build_wheels :
16+ build-wheels :
1717 name : Build wheels on ${{ matrix.os }}
1818 runs-on : ${{ matrix.os }}
1919 strategy :
2020 matrix :
21- os : [ubuntu-20 .04, macOS-11, macOS-12 ]
21+ os : [ubuntu-latest, ubuntu-24 .04-arm, macos-13, macos-latest ]
2222
2323 steps :
2424 - uses : actions/checkout@v4
2525
2626 # Used to host cibuildwheel
27- - uses : actions/setup-python@v2
28- - name : Install pkgconfig
29- run : python -m pip install pkgconfig
30- - name : Install packaging
31- run : python -m pip install packaging
32- - name : Get libsemigroups version
33- id : libsemigroups_version
34- run : echo "::set-output name=version::$(python etc/libsemigroups_version.py)"
35- - name : Install cibuildwheel
36- run : python -m pip install cibuildwheel==2.11.3
37-
38- - name : Build wheels
39- env :
40- CIBW_BEFORE_ALL : >
41- curl -L -O https://github.com/libsemigroups/libsemigroups/releases/download/v${{ steps.libsemigroups_version.outputs.version }}/libsemigroups-${{ steps.libsemigroups_version.outputs.version }}.tar.gz &&
42-
43- tar -xf libsemigroups-${{ steps.libsemigroups_version.outputs.version }}.tar.gz &&
44- rm -f libsemigroups-${{ steps.libsemigroups_version.outputs.version }}.tar.gz &&
45- cd libsemigroups-${{ steps.libsemigroups_version.outputs.version }} &&
46- ./configure --disable-hpcombi &&
47- make -j4 && make install
48- CIBW_ENVIRONMENT_LINUX : LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig
49- CIBW_ARCHS_MACOS : x86_64
50-
51- run : python -m cibuildwheel --output-dir wheelhouse
52-
53- - uses : actions/upload-artifact@v2
27+ - name : Build wheel
28+ uses : pypa/cibuildwheel@v3.0.1
5429 with :
55- name : wheels
56- path : wheelhouse/*.whl
30+ output-dir : wheelhouse
31+ - uses : actions/upload-artifact@v4
32+ with :
33+ name : cibw-wheels-${{ matrix.os }}
34+ path : ./wheelhouse/*.whl
5735
58- make_sdist :
36+ make-sdist :
5937 name : Make source distribution
6038 runs-on : ubuntu-latest
6139 steps :
6240 - uses : actions/checkout@v4
63- - uses : actions/setup-python@v2
64- - name : Install pkgconfig
65- run : python -m pip install pkgconfig
66- - name : Install packaging
67- run : python -m pip install packaging
68- - name : Get libsemigroups version
69- id : libsemigroups_version
70- run : echo "::set-output name=version::$(python etc/libsemigroups_version.py)"
7141 - name : Install libsemigroups
72- run : |
73- curl -L -O https://github.com/libsemigroups/libsemigroups/releases/download/v${{ steps.libsemigroups_version.outputs.version }}/libsemigroups-${{ steps.libsemigroups_version.outputs.version }}.tar.gz &&
74-
75- tar -xf libsemigroups-${{ steps.libsemigroups_version.outputs.version }}.tar.gz &&
76- rm -f libsemigroups-${{ steps.libsemigroups_version.outputs.version }}.tar.gz &&
77- cd libsemigroups-${{ steps.libsemigroups_version.outputs.version }} &&
78- ./configure --disable-hpcombi &&
79- make -j4 && sudo make install
80-
42+ run : source etc/make-libsemigroups.sh && sudo make install
8143 - name : Build SDist
8244 run : pipx run build --sdist
83-
84- - uses : actions/upload-artifact@v2
45+ - uses : actions/upload-artifact@v4
8546 with :
8647 name : sdist
8748 path : dist/*.tar.gz
8849
89- upload :
50+ # TODO(1): Add a TestPyPI step
51+
52+ publish-to-pypi :
9053 if : ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
91- needs : [build_wheels, make_sdist]
54+ name : Publish Python distribution to PyPI
55+ needs :
56+ - build-wheels
57+ - make-sdist
9258 runs-on : ubuntu-latest
59+ # TODO(1): Uncomment below and configure a publishing environment
60+ # See https://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/manage-environments
61+ # environment:
62+ # name: pypi
63+ # url: https://pypi.org/p/libsemigroups-pybind11/
64+ permissions :
65+ id-token : write
66+
9367 steps :
94- - name : Download wheels artifact
95- uses : actions/download-artifact@v2
68+ - name : Download wheels and sdist artifacts
69+ uses : actions/download-artifact@v4
9670 with :
97- name : wheels
98- path : dist
71+ # Here, we could specify a name of an artifact, or a pattern that
72+ # matches the names of artifacts. However, by not specifying these
73+ # values, all of the artifacts from this run are downloaded (which is
74+ # what we want).
9975
100- - name : Download sdist artifact
101- uses : actions/download-artifact@v2
102- with :
103- name : sdist
76+ # Destination path
10477 path : dist
10578
79+ # If true, the downloaded artifacts will be in the same directory
80+ # specified by path.
81+ # If false, the downloaded artifacts will be extracted into individual
82+ # named directories within the specified path.'
83+ merge-multiple : true
84+
10685 - name : List directory contents
10786 run : ls dist
10887
109- - name : Publish
110- uses : pypa/gh-action-pypi-publish@v1.4.2
111- with :
112- user : ${{ secrets.PYPI_USERNAME }}
113- password : ${{ secrets.PYPI_PASSWORD }}
88+ - name : Publish package distributions to PyPI
89+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments