@@ -13,92 +13,58 @@ jobs:
1313 name : python source distribution
1414 runs-on : ubuntu-latest
1515 steps :
16- - uses : actions/checkout@v2
17- - name : Set up Python 3.8
18- uses : actions/setup-python@v2
16+ - name : Install uv
17+ uses : astral-sh/setup-uv@v5
18+ with :
19+ version : " 0.6.5"
20+ - name : " Set up Python"
21+ uses : actions/setup-python@v5
1922 with :
2023 python-version : 3.8
21-
22- - name : Install build packages and pytest
23- run : |
24- python -m pip install --upgrade pip wheel setuptools
25- python -m pip install "conan<2" scikit-build pytest cython numpy>=2
26-
27- - name : Create sdist
28- run : python setup.py sdist
24+ python-version-file : " pyproject.toml"
2925
3026 - name : Install pyssht
31- run : " pip install dist/pyssht-*.tar.gz "
27+ run : uv sync --all-extras --dev
3228
3329 - name : run pytest
34- run : pytest tests/test_pyssht.py
35-
36- - uses : actions/upload-artifact@v2
37- if : ${{ startsWith(github.ref, 'refs/tags') }}
38- with :
39- path : ./dist/*.tar.gz
40- name : source-distribution
30+ run : uv run pytest tests/test_pyssht.py
4131
4232 build_wheels :
4333 name : Build wheels on ${{ matrix.os }}
44- runs-on : ${{ matrix.os }}
45- strategy :
46- matrix :
47- os : [macos-latest]
48- python-version : [3.8]
34+ runs-on : macos-latest
4935
5036 steps :
51- - uses : actions/checkout@v2
52-
53- - uses : actions/setup-python@v2
54- name : Install Python
37+ - name : Install uv
38+ uses : astral-sh/setup-uv@v5
5539 with :
56- python-version : ${{ matrix.python-version }}
57-
58- - name : Setup environment
59- run : |
60- python -m pip install --upgrade pip wheel
61- python -m pip install "conan<2" pytest ducc0
62- conan profile new default --detect
40+ version : " 0.6.5"
41+ - name : " Set up Python"
42+ uses : actions/setup-python@v5
43+ with :
44+ python-version : 3.8
6345
6446 - name : Build wheels
65- run : pip wheel . --use-pep517 --no-deps -w dist
47+ run : uv build --wheel
6648
6749 - name : install wheel
6850 run : " pip install dist/*.whl"
6951
7052 - name : run pytests
71- run : pytest tests
72-
73- - uses : actions/upload-artifact@v2
74- if : ${{ startsWith(github.ref, 'refs/tags') }}
75- with :
76- path : ./dist/*.whl
77- name : wheel-${{matrix.os}}-${{matrix.python-version}}
53+ run : uv pip install pytest && pytest tests
7854
7955 publication :
8056 name : publish to pypi
8157 if : ${{ startsWith(github.ref, 'refs/tags') }}
82- runs-on : ubuntu-latest
83- needs : [build_wheels, from-sdist]
58+ runs-on : macos-latest
8459 steps :
85- - name : Download wheels and sdist
86- uses : actions/download-artifact@v2
87-
88- - name : Move wheels and source distribution to dist/
89- run : |
90- mkdir -p dist
91- mv source-distribution/*.tar.gz wheel-*/*.whl dist
92-
60+ - name : Install uv
61+ uses : astral-sh/setup-uv@v5
62+ with :
63+ version : " 0.6.5"
9364 - name : Publish distribution 📦 to Test PyPI
9465 if : ${{ github.ref != 'refs/tags/v1.5.2' }}
95- uses : pypa/gh-action-pypi-publish@master
96- with :
97- password : ${{ secrets.TEST_PYPI_TOKEN }}
98- repository_url : https://test.pypi.org/legacy/
66+ run : " uv publish --publish-url https://test.pypi.org/legacy --token ${{ secrets.TEST_PYPI_TOKEN }}"
9967
10068 - name : Publish distribution 📦 to PyPI
10169 if : ${{ github.ref == 'refs/tags/v1.5.2' }}
102- uses : pypa/gh-action-pypi-publish@master
103- with :
104- password : ${{ secrets.PYPI_TOKEN }}
70+ run : " uv publish --token ${{ secrets.TEST_PYPI_TOKEN }}"
0 commit comments