Skip to content

Commit 58dfe4e

Browse files
Wheels
1 parent e12aa31 commit 58dfe4e

File tree

2 files changed

+79
-1
lines changed

2 files changed

+79
-1
lines changed

.github/workflows/wheels.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Build wheels and publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build_wheels:
9+
name: Build wheels
10+
runs-on: ubuntu-20.04
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.11'
18+
19+
- name: Build wheel
20+
run: |
21+
python -m pip install build
22+
python -m build --wheel --sdist --outdir wheelhouse
23+
24+
- name: Store wheels
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: wheels
28+
path: wheelhouse/*
29+
30+
test_unix_wheels:
31+
needs: build_wheels
32+
name: Test wheels on ${{ matrix.os }} with ${{ matrix.python-version }}
33+
runs-on: ${{ matrix.os }}
34+
strategy:
35+
fail-fast: false # to not fail all combinations if just one fail
36+
matrix:
37+
os: [ubuntu-latest, macos-latest]
38+
python-version: ['3.11', '3.12']
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: actions/setup-python@v5
43+
with:
44+
python-version: ${{ matrix.python-version }}
45+
46+
- uses: actions/download-artifact@v4
47+
with:
48+
name: wheels
49+
path: wheelhouse
50+
51+
- name: Get wheel filename
52+
run: echo "WHEELNAME=$(ls ./wheelhouse/python-fold-*none-any.whl)" >> $GITHUB_ENV
53+
54+
- name: Install wheel and extras
55+
run: python -m pip install "${{ env.WHEELNAME }}[all_extras,dev]"
56+
57+
- name: Run tests
58+
run: |
59+
pip install -r requirements.txt
60+
pip install pytest
61+
python -m pytest
62+
63+
upload_wheels:
64+
name: Upload wheels to PyPI
65+
runs-on: ubuntu-latest
66+
needs: [build_wheels,test_unix_wheels]
67+
68+
steps:
69+
- uses: actions/download-artifact@v4
70+
with:
71+
name: wheels
72+
path: wheelhouse
73+
74+
- name: Publish package to PyPI
75+
uses: pypa/gh-action-pypi-publish@release/v1
76+
with:
77+
password: ${{ secrets.PYPI_API_TOKEN }}
78+
packages_dir: wheelhouse/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| Overview | |
88
|---|---|
99
| **Open Source** | [![BSD 3-clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/ActurialCapital/fold/blob/main/LICENSE) |
10-
| **CI/CD** | [![github-actions](https://img.shields.io/github/actions/workflow/status/ActurialCapital/fold/codecove.yml?logo=github)](https://github.com/ActurialCapital/fold/actions/workflows/codecov.yml) [![!codecov](https://img.shields.io/codecov/c/github/ActurialCapital/fold?label=codecov&logo=codecov)](https://codecov.io/gh/ActurialCapital/fold) |
10+
| **CI/CD** | [![github-actions](https://img.shields.io/github/actions/workflow/status/ActurialCapital/fold/wheels.yml?logo=github)](https://github.com/ActurialCapital/fold/actions/workflows/wheels.yml) [![!codecov](https://img.shields.io/codecov/c/github/ActurialCapital/fold?label=codecov&logo=codecov)](https://codecov.io/gh/ActurialCapital/fold) |
1111
| **Code** | [![!pypi](https://img.shields.io/pypi/v/python-fold?color=orange)](https://pypi.org/project/python-fold/) [![!python-versions](https://img.shields.io/pypi/pyversions/python-fold)](https://www.python.org/) |
1212
| **Downloads** | ![PyPI - Downloads](https://img.shields.io/pypi/dw/python-fold) ![PyPI - Downloads](https://img.shields.io/pypi/dm/python-fold) [![Downloads](https://static.pepy.tech/personalized-badge/python-fold?period=total&units=international_system&left_color=grey&right_color=blue&left_text=cumulative%20(pypi))](https://pepy.tech/project/python-fold) |
1313
| **Citation** | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.12514531.svg)](https://doi.org/10.5281/zenodo.12514531) |

0 commit comments

Comments
 (0)