Skip to content

Commit 3c01728

Browse files
committed
Update github actions
1 parent 4f5a1ff commit 3c01728

File tree

4 files changed

+108
-63
lines changed

4 files changed

+108
-63
lines changed

.github/workflows/cmake.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
python-version: [3.8]
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2323

2424
- name: Set up Python ${{ matrix.python-version }}
2525
uses: actions/setup-python@v2
@@ -30,7 +30,7 @@ jobs:
3030
shell: bash
3131
run: |
3232
python -m pip install wheel
33-
python -m pip install --upgrade pip "conan<2"
33+
python -m pip install --upgrade pip "conan"
3434
cmake -E make_directory ${{runner.workspace}}/build
3535
3636
- name: Configure CMake
@@ -40,7 +40,7 @@ jobs:
4040
-DCMAKE_C_COMPILER=gcc
4141
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
4242
-Dpython=False
43-
-Dconan_deps=True
43+
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./cmake/conan_provider.cmake
4444
4545
- name: Build
4646
working-directory: ${{runner.workspace}}/build

.github/workflows/python.yml

+26-60
Original file line numberDiff line numberDiff line change
@@ -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 }}"

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ readme = "src/pyssht/SSHT_Python_Documentation.md"
1313
license = "GPL-3.0-or-later"
1414
keywords = ["numerical transforms", "signal processing", "science"]
1515
dependencies = [ "numpy" ]
16+
requires-python = ">= 3.8"
1617

1718
[project.urls]
1819
Homepage = "http://astro-informatics.github.io/ssht/"

uv.lock

+78
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)