Skip to content

Commit f4b3f0d

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

File tree

3 files changed

+300
-15
lines changed

3 files changed

+300
-15
lines changed

.github/workflows/release.yml

Lines changed: 99 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ 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
1817
- macos-15-intel
1918
python-version:
2019
- '3.11'
20+
- '3.12'
21+
- '3.13'
2122

2223
runs-on: ${{ matrix.os }}
2324

@@ -36,12 +37,97 @@ jobs:
3637
run: |
3738
python -m pip install --upgrade pip
3839
python -m pip install setuptools wheel build cython
40+
python -m pip install auditwheel
3941
4042
- name: Build wheel and source tarball
4143
run: |
4244
python -m build
45+
auditwheel repair dist/softfloatpy-*.whl
4346
44-
- name: Store distribution
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:
60+
# - macos-15
61+
- macos-15-intel
62+
python-version:
63+
- '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'
107+
108+
runs-on: ${{ matrix.os }}
109+
110+
steps:
111+
- name: Checkout code
112+
uses: actions/checkout@v6
113+
with:
114+
submodules: recursive
115+
116+
- name: Set up Python
117+
uses: actions/setup-python@v6
118+
with:
119+
python-version: ${{ matrix.python-version }}
120+
121+
- name: Install dependencies
122+
run: |
123+
python -m pip install --upgrade pip
124+
python -m pip install setuptools wheel build cython
125+
126+
- name: Build wheel and source tarball
127+
run: |
128+
python -m build
129+
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,10 +161,14 @@ 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:
79-
- dist
169+
- dist-on-linux
170+
- dist-on-macos
171+
- dist-on-windows
80172

81173
runs-on: ubuntu-latest
82174

@@ -95,7 +187,7 @@ jobs:
95187
- name: Sign distribution with Sigstore
96188
uses: sigstore/[email protected]
97189
with:
98-
inputs: ./dist/*.tar.gz ./dist/*.whl
190+
inputs: ./dist/*.whl
99191

100192
- name: Upload artifact signatures to GitHub Release
101193
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)