Skip to content

Commit bf63ac1

Browse files
committed
Fix GitHub workflows
1 parent 5301e67 commit bf63ac1

File tree

3 files changed

+295
-12
lines changed

3 files changed

+295
-12
lines changed

.github/workflows/release.yml

Lines changed: 95 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,104 @@ on:
66
- published
77

88
jobs:
9-
dist:
10-
name: Build distribution packages
9+
dist-on-linux:
10+
name: Build distribution packages for Linux
1111

1212
strategy:
1313
matrix:
1414
os:
1515
- ubuntu-24.04
1616
- ubuntu-24.04-arm
17+
- macos-15-intel
18+
python-version:
19+
- '3.11'
20+
- '3.12'
21+
- '3.13'
22+
23+
runs-on: ${{ matrix.os }}
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v6
28+
with:
29+
submodules: recursive
30+
31+
- name: Set up Python
32+
uses: actions/setup-python@v6
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install setuptools wheel build cython
40+
python -m pip install auditwheel
41+
42+
- name: Build wheel and source tarball
43+
run: |
44+
python -m build
45+
auditwheel repair dist/softfloatpy-*.whl
46+
47+
- name: Store built wheel
48+
uses: actions/upload-artifact@v6
49+
with:
50+
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
51+
path: wheelhouse/
52+
retention-days: 1
53+
54+
dist-on-macos:
55+
name: Build distribution packages for macOS
56+
57+
strategy:
58+
matrix:
59+
os:
1760
- macos-15
1861
- macos-15-intel
1962
python-version:
2063
- '3.11'
64+
- '3.12'
65+
- '3.13'
66+
67+
runs-on: ${{ matrix.os }}
68+
69+
steps:
70+
- name: Checkout code
71+
uses: actions/checkout@v6
72+
with:
73+
submodules: recursive
74+
75+
- name: Set up Python
76+
uses: actions/setup-python@v6
77+
with:
78+
python-version: ${{ matrix.python-version }}
79+
80+
- name: Install dependencies
81+
run: |
82+
python -m pip install --upgrade pip
83+
python -m pip install setuptools wheel build cython
84+
85+
- name: Build wheel and source tarball
86+
run: |
87+
python -m build
88+
89+
- name: Store built wheel
90+
uses: actions/upload-artifact@v6
91+
with:
92+
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
93+
path: dist/
94+
retention-days: 1
95+
96+
dist-on-windows:
97+
name: Build distribution packages for Windows
98+
99+
strategy:
100+
matrix:
101+
os:
102+
- windows-2025
103+
python-version:
104+
- '3.11'
105+
- '3.12'
106+
- '3.13'
21107

22108
runs-on: ${{ matrix.os }}
23109

@@ -41,7 +127,7 @@ jobs:
41127
run: |
42128
python -m build
43129
44-
- name: Store distribution
130+
- name: Store built wheel
45131
uses: actions/upload-artifact@v6
46132
with:
47133
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
@@ -52,7 +138,9 @@ jobs:
52138
name: Publish distribution
53139

54140
needs:
55-
- dist
141+
- dist-on-linux
142+
- dist-on-macos
143+
- dist-on-windows
56144

57145
runs-on: ubuntu-latest
58146

@@ -73,6 +161,8 @@ jobs:
73161

74162
- name: Publish distribution to PyPI
75163
uses: pypa/gh-action-pypi-publish@release/v1
164+
with:
165+
verbose: true
76166

77167
github-release:
78168
needs:
@@ -95,7 +185,7 @@ jobs:
95185
- name: Sign distribution with Sigstore
96186
uses: sigstore/[email protected]
97187
with:
98-
inputs: ./dist/*.tar.gz ./dist/*.whl
188+
inputs: ./dist/*.whl
99189

100190
- name: Upload artifact signatures to GitHub Release
101191
env:

.github/workflows/test.yml

Lines changed: 108 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,123 @@ on:
1111
- develop
1212

1313
jobs:
14-
test:
15-
name: Test
14+
test-on-linux:
15+
name: Test on Linux
1616

1717
strategy:
1818
matrix:
1919
os:
2020
- ubuntu-24.04
2121
- ubuntu-24.04-arm
22+
python-version:
23+
- '3.11'
24+
- '3.12'
25+
- '3.13'
26+
27+
runs-on: ${{ matrix.os }}
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v6
32+
with:
33+
submodules: recursive
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@v6
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
40+
- name: Install dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
python -m pip install setuptools wheel build cython
44+
python -m pip install auditwheel
45+
python -m pip install flake8 mypy pytest
46+
47+
- name: Build wheel and source tarball
48+
run: |
49+
python -m build
50+
auditwheel repair dist/softfloatpy-*.whl
51+
52+
- name: Install built wheel
53+
run: |
54+
python -m pip install --no-index --find-links=./wheelhouse softfloatpy
55+
56+
- name: Check coding style with flake8
57+
run: |
58+
python -m flake8 --doctests ./python
59+
60+
- name: Check data types with mypy
61+
run: |
62+
python -m mypy --strict ./python
63+
64+
- name: Test code with pytest
65+
run: |
66+
python -m pytest ./python --doctest-modules
67+
68+
test-on-macos:
69+
name: Test on macOS
70+
71+
strategy:
72+
matrix:
73+
os:
2274
- macos-15
2375
- macos-15-intel
2476
python-version:
2577
- '3.11'
78+
- '3.12'
79+
- '3.13'
80+
81+
runs-on: ${{ matrix.os }}
82+
83+
steps:
84+
- name: Checkout code
85+
uses: actions/checkout@v6
86+
with:
87+
submodules: recursive
88+
89+
- name: Set up Python
90+
uses: actions/setup-python@v6
91+
with:
92+
python-version: ${{ matrix.python-version }}
93+
94+
- name: Install dependencies
95+
run: |
96+
python -m pip install --upgrade pip
97+
python -m pip install setuptools wheel build cython
98+
python -m pip install flake8 mypy pytest
99+
100+
- name: Build wheel and source tarball
101+
run: |
102+
python -m build
103+
104+
- name: Install built wheel
105+
run: |
106+
python -m pip install --no-index --find-links=./dist softfloatpy
107+
108+
- name: Check coding style with flake8
109+
run: |
110+
python -m flake8 --doctests ./python
111+
112+
- name: Check data types with mypy
113+
run: |
114+
python -m mypy --strict ./python
115+
116+
- name: Test code with pytest
117+
run: |
118+
python -m pytest ./python --doctest-modules
119+
120+
test-on-windows:
121+
name: Test on Windows
122+
123+
strategy:
124+
matrix:
125+
os:
126+
- windows-2025
127+
python-version:
128+
- '3.11'
129+
- '3.12'
130+
- '3.13'
26131

27132
runs-on: ${{ matrix.os }}
28133

@@ -49,7 +154,7 @@ jobs:
49154
50155
- name: Install built wheel
51156
run: |
52-
python -m pip install dist/softfloatpy-*.whl
157+
python -m pip install --no-index --find-links=./dist softfloatpy
53158
54159
- name: Check coding style with flake8
55160
run: |

0 commit comments

Comments
 (0)