@@ -13,92 +13,58 @@ jobs:
13
13
name : python source distribution
14
14
runs-on : ubuntu-latest
15
15
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
19
22
with :
20
23
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"
29
25
30
26
- name : Install pyssht
31
- run : " pip install dist/pyssht-*.tar.gz "
27
+ run : uv sync --all-extras --dev
32
28
33
29
- 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
41
31
42
32
build_wheels :
43
33
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
49
35
50
36
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
55
39
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
63
45
64
46
- name : Build wheels
65
- run : pip wheel . --use-pep517 --no-deps -w dist
47
+ run : uv build --wheel
66
48
67
49
- name : install wheel
68
50
run : " pip install dist/*.whl"
69
51
70
52
- 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
78
54
79
55
publication :
80
56
name : publish to pypi
81
57
if : ${{ startsWith(github.ref, 'refs/tags') }}
82
- runs-on : ubuntu-latest
83
- needs : [build_wheels, from-sdist]
58
+ runs-on : macos-latest
84
59
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"
93
64
- name : Publish distribution 📦 to Test PyPI
94
65
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 }}"
99
67
100
68
- name : Publish distribution 📦 to PyPI
101
69
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