Skip to content

Commit 5a92ee5

Browse files
committed
Fix GitHub workflows
1 parent c608c17 commit 5a92ee5

File tree

6 files changed

+87
-10
lines changed

6 files changed

+87
-10
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ jobs:
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,16 +37,18 @@ 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
4447
- name: Store distribution
4548
uses: actions/upload-artifact@v6
4649
with:
4750
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
48-
path: dist/
51+
path: wheelhouse/
4952
retention-days: 1
5053

5154
pypi:
@@ -73,6 +76,8 @@ jobs:
7376

7477
- name: Publish distribution to PyPI
7578
uses: pypa/gh-action-pypi-publish@release/v1
79+
with:
80+
verbose: true
7681

7782
github-release:
7883
needs:

.github/workflows/test.yml

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
- macos-15-intel
2424
python-version:
2525
- '3.11'
26+
- '3.12'
27+
- '3.13'
2628

2729
runs-on: ${{ matrix.os }}
2830

@@ -41,15 +43,78 @@ jobs:
4143
run: |
4244
python -m pip install --upgrade pip
4345
python -m pip install setuptools wheel build cython
46+
python -m pip install auditwheel
4447
python -m pip install flake8 mypy pytest
4548
4649
- name: Build wheel and source tarball
4750
run: |
4851
python -m build
52+
auditwheel repair dist/softfloatpy-*.whl
4953
5054
- name: Install built wheel
5155
run: |
52-
python -m pip install dist/softfloatpy-*.whl
56+
python -m pip install wheelhouse/softfloatpy-*.whl
57+
58+
- name: Check coding style with flake8
59+
run: |
60+
python -m flake8 --doctests ./python
61+
62+
- name: Check data types with mypy
63+
run: |
64+
python -m mypy --strict ./python
65+
66+
- name: Test code with pytest
67+
run: |
68+
python -m pytest ./python --doctest-modules
69+
70+
test-on-windows:
71+
name: Test on Windows
72+
73+
strategy:
74+
matrix:
75+
os:
76+
- windows-2025
77+
python-version:
78+
- '3.11'
79+
- '3.12'
80+
- '3.13'
81+
82+
runs-on: ${{ matrix.os }}
83+
84+
steps:
85+
- name: Checkout code
86+
uses: actions/checkout@v6
87+
with:
88+
submodules: recursive
89+
90+
- name: Set up Python
91+
uses: actions/setup-python@v6
92+
with:
93+
python-version: ${{ matrix.python-version }}
94+
95+
- name: Install dependencies
96+
run: |
97+
python -m pip install --upgrade pip
98+
python -m pip install setuptools wheel build cython
99+
python -m pip install auditwheel
100+
python -m pip install flake8 mypy pytest
101+
102+
- name: Setup MSYS2 environment
103+
uses: msys2/setup-msys2@v2
104+
with:
105+
msystem: ucrt64
106+
update: true
107+
install: mingw-w64-ucrt-x86_64-gcc
108+
109+
- name: Build wheel and source tarball
110+
shell: msys2 {0}
111+
run: |
112+
python -m build
113+
auditwheel repair dist/softfloatpy-*.whl
114+
115+
- name: Install built wheel
116+
run: |
117+
python -m pip install wheelhouse/softfloatpy-*.whl
53118
54119
- name: Check coding style with flake8
55120
run: |

.github/workflows/testpypi.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ jobs:
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,16 +37,18 @@ 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
4447
- name: Store distribution
4548
uses: actions/upload-artifact@v6
4649
with:
4750
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
48-
path: dist/
51+
path: wheelhouse/
4952
retention-days: 1
5053

5154
testpypi:
@@ -75,3 +78,4 @@ jobs:
7578
uses: pypa/gh-action-pypi-publish@release/v1
7679
with:
7780
repository-url: https://test.pypi.org/legacy/
81+
verbose: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/dist/
2+
/wheelhouse/
23
__pycache__/
34
.pytest_cache/
45
.mypy_cache/

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,27 @@ all: lint type test dist doc
1111

1212
req:
1313
$(PYTHON) -m pip install --quiet --upgrade pip
14-
$(PYTHON) -m pip install --quiet setuptools wheel build cython pytest mypy flake8 sphinx sphinx-rtd-theme myst-parser
14+
$(PYTHON) -m pip install --quiet setuptools wheel build cython auditwheel pytest mypy flake8 sphinx sphinx-rtd-theme myst-parser
1515

1616
lint:
1717
$(PYTHON) -m flake8 --doctests $(PYROOTDIR)
1818

1919
type:
20-
$(PYTHON) -m pip install --quiet --force-reinstall ./dist/*.whl
20+
$(PYTHON) -m pip install --quiet --force-reinstall ./wheelhouse/softfloatpy-*.whl
2121
$(PYTHON) -m mypy --strict $(PYROOTDIR)
2222

2323
test:
24-
$(PYTHON) -m pip install --quiet --force-reinstall ./dist/*.whl
24+
$(PYTHON) -m pip install --quiet --force-reinstall ./wheelhouse/softfloatpy-*.whl
2525
$(PYTHON) -m pytest $(PYROOTDIR) -vv --doctest-modules
2626

2727
dist:
2828
$(PYTHON) -m build
29+
auditwheel repair dist/softfloatpy-*.whl
2930

3031
doc:
31-
$(PYTHON) -m pip install --quiet --force-reinstall ./dist/*.whl
32+
$(PYTHON) -m pip install --quiet --force-reinstall ./wheelhouse/softfloatpy-*.whl
3233
$(SPHINX_APIDOC) -T -f -o $(PYDOCSRCDIR)/apidoc $(PYROOTDIR)/src
3334
$(SPHINX_BUILD) -b html $(PYDOCSRCDIR) $(PYDOCOUTDIR)/html
3435

3536
clean:
36-
rm -rf $(PYDOCOUTDIR) $(PYROOTDIR)/src/softfloatpy.egg-info ./dist
37+
rm -rf $(PYDOCOUTDIR) $(PYROOTDIR)/src/softfloatpy.egg-info ./dist ./wheelhouse

cspell.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ dictionaries: []
55
words:
66
- apidoc
77
- Arihiro
8+
- auditwheel
89
- bfloat
910
- bint
1011
- bysource

0 commit comments

Comments
 (0)