@@ -13,101 +13,78 @@ 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+ # macos-13 is an intel runner, macos-14 is apple silicon
22+ os : [ubuntu-latest, ubuntu-24.04-arm, macos-13, macos-14]
2223
2324 steps :
2425 - uses : actions/checkout@v4
2526
2627 # 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
28+ - name : Build wheel
29+ uses : pypa/cibuildwheel@v3.1.3
5430 with :
55- name : wheels
56- path : wheelhouse/*.whl
31+ output-dir : wheelhouse
32+ - uses : actions/upload-artifact@v4
33+ with :
34+ name : cibw-wheels-${{ matrix.os }}
35+ path : ./wheelhouse/*.whl
5736
58- make_sdist :
37+ make-sdist :
5938 name : Make source distribution
6039 runs-on : ubuntu-latest
6140 steps :
6241 - 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)"
7142 - 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-
43+ run : source etc/make-libsemigroups.sh && sudo make install
8144 - name : Build SDist
8245 run : pipx run build --sdist
83-
84- - uses : actions/upload-artifact@v2
46+ - uses : actions/upload-artifact@v4
8547 with :
8648 name : sdist
8749 path : dist/*.tar.gz
8850
89- upload :
51+ # TODO(1): Add a TestPyPI step
52+
53+ publish-to-pypi :
9054 if : ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
91- needs : [build_wheels, make_sdist]
55+ name : Publish Python distribution to PyPI
56+ needs :
57+ - build-wheels
58+ - make-sdist
9259 runs-on : ubuntu-latest
60+ # TODO(1): Uncomment below and configure a publishing environment
61+ # See https://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/manage-environments
62+ # environment:
63+ # name: pypi
64+ # url: https://pypi.org/p/libsemigroups-pybind11/
65+ permissions :
66+ id-token : write
67+
9368 steps :
94- - name : Download wheels artifact
95- uses : actions/download-artifact@v2
69+ - name : Download wheels and sdist artifacts
70+ uses : actions/download-artifact@v4
9671 with :
97- name : wheels
98- path : dist
72+ # Here, we could specify a name of an artifact, or a pattern that
73+ # matches the names of artifacts. However, by not specifying these
74+ # values, all of the artifacts from this run are downloaded (which is
75+ # what we want).
9976
100- - name : Download sdist artifact
101- uses : actions/download-artifact@v2
102- with :
103- name : sdist
77+ # Destination path
10478 path : dist
10579
80+ # If true, the downloaded artifacts will be in the same directory
81+ # specified by path.
82+ # If false, the downloaded artifacts will be extracted into individual
83+ # named directories within the specified path.'
84+ merge-multiple : true
85+
10686 - name : List directory contents
10787 run : ls dist
10888
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 }}
89+ - name : Publish package distributions to PyPI
90+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments