Skip to content

Commit 99bbf4e

Browse files
committed
Fix GitHub workflows
1 parent 5301e67 commit 99bbf4e

File tree

3 files changed

+301
-17
lines changed

3 files changed

+301
-17
lines changed

.github/workflows/release.yml

Lines changed: 99 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,62 @@ 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
17+
python-version:
18+
- '3.11'
19+
- '3.12'
20+
- '3.13'
21+
22+
runs-on: ${{ matrix.os }}
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v6
27+
with:
28+
submodules: recursive
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v6
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
python -m pip install setuptools wheel build cython
39+
python -m pip install auditwheel
40+
41+
- name: Build wheel and source tarball
42+
run: |
43+
python -m build
44+
auditwheel repair dist/softfloatpy-*.whl
45+
46+
- name: Store built wheel
47+
uses: actions/upload-artifact@v6
48+
with:
49+
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
50+
path: wheelhouse/softfloatpy-*.whl
51+
retention-days: 1
52+
53+
dist-on-macos:
54+
name: Build distribution packages for macOS
55+
56+
strategy:
57+
matrix:
58+
os:
59+
# - macos-15
1860
- macos-15-intel
1961
python-version:
2062
- '3.11'
63+
- '3.12'
64+
- '3.13'
2165

2266
runs-on: ${{ matrix.os }}
2367

@@ -41,18 +85,61 @@ jobs:
4185
run: |
4286
python -m build
4387
44-
- name: Store distribution
88+
- name: Store built wheel
4589
uses: actions/upload-artifact@v6
4690
with:
4791
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
48-
path: dist/
92+
path: dist/softfloatpy-*.whl
93+
retention-days: 1
94+
95+
dist-on-windows:
96+
name: Build distribution packages for Windows
97+
98+
strategy:
99+
matrix:
100+
os:
101+
- windows-2025
102+
python-version:
103+
- '3.11'
104+
- '3.12'
105+
- '3.13'
106+
107+
runs-on: ${{ matrix.os }}
108+
109+
steps:
110+
- name: Checkout code
111+
uses: actions/checkout@v6
112+
with:
113+
submodules: recursive
114+
115+
- name: Set up Python
116+
uses: actions/setup-python@v6
117+
with:
118+
python-version: ${{ matrix.python-version }}
119+
120+
- name: Install dependencies
121+
run: |
122+
python -m pip install --upgrade pip
123+
python -m pip install setuptools wheel build cython
124+
125+
- name: Build wheel and source tarball
126+
run: |
127+
python -m build
128+
129+
- name: Store built wheel
130+
uses: actions/upload-artifact@v6
131+
with:
132+
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
133+
path: dist/softfloatpy-*.whl
49134
retention-days: 1
50135

51136
pypi:
52137
name: Publish distribution
53138

54139
needs:
55-
- dist
140+
- dist-on-linux
141+
- dist-on-macos
142+
- dist-on-windows
56143

57144
runs-on: ubuntu-latest
58145

@@ -73,10 +160,14 @@ jobs:
73160

74161
- name: Publish distribution to PyPI
75162
uses: pypa/gh-action-pypi-publish@release/v1
163+
with:
164+
verbose: true
76165

77166
github-release:
78167
needs:
79-
- dist
168+
- dist-on-linux
169+
- dist-on-macos
170+
- dist-on-windows
80171

81172
runs-on: ubuntu-latest
82173

@@ -95,7 +186,7 @@ jobs:
95186
- name: Sign distribution with Sigstore
96187
uses: sigstore/[email protected]
97188
with:
98-
inputs: ./dist/*.tar.gz ./dist/*.whl
189+
inputs: ./dist/*.whl
99190

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