Skip to content

Commit 2aaab6d

Browse files
committed
Fix GitHub workflows
1 parent c608c17 commit 2aaab6d

File tree

9 files changed

+184
-17
lines changed

9 files changed

+184
-17
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: 107 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,72 @@ 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 wheelhouse/softfloatpy-*.whl
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'
2680

2781
runs-on: ${{ matrix.os }}
2882

@@ -62,3 +116,54 @@ jobs:
62116
- name: Test code with pytest
63117
run: |
64118
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'
131+
132+
runs-on: ${{ matrix.os }}
133+
134+
steps:
135+
- name: Checkout code
136+
uses: actions/checkout@v6
137+
with:
138+
submodules: recursive
139+
140+
- name: Set up Python
141+
uses: actions/setup-python@v6
142+
with:
143+
python-version: ${{ matrix.python-version }}
144+
145+
- name: Install dependencies
146+
run: |
147+
python -m pip install --upgrade pip
148+
python -m pip install setuptools wheel build cython
149+
python -m pip install flake8 mypy pytest
150+
151+
- name: Build wheel and source tarball
152+
run: |
153+
python -m build --outdir ./dist
154+
155+
- name: Install built wheel
156+
run: |
157+
python -m pip install dist/softfloatpy-*.whl
158+
159+
- name: Check coding style with flake8
160+
run: |
161+
python -m flake8 --doctests ./python
162+
163+
- name: Check data types with mypy
164+
run: |
165+
python -m mypy --strict ./python
166+
167+
- name: Test code with pytest
168+
run: |
169+
python -m pytest ./python --doctest-modules

.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/

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include python/src/softfloatpy.pyx
22
include python/src/_softfloat.pxd
33
include python/src/_version.py
4-
include extern/berkeley-softfloat-3/build/Linux-RISCV64-GCC/platform.h
4+
include c/berkeley-softfloat-3/build/General/platform.h
55
include extern/berkeley-softfloat-3/source/RISCV/specialize.h
66
include extern/berkeley-softfloat-3/source/include/opts-GCC.h
77
include extern/berkeley-softfloat-3/source/include/primitives.h

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
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
/*============================================================================
3+
4+
This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
5+
Package, Release 3e, by John R. Hauser.
6+
7+
Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8+
University of California. All rights reserved.
9+
10+
Redistribution and use in source and binary forms, with or without
11+
modification, are permitted provided that the following conditions are met:
12+
13+
1. Redistributions of source code must retain the above copyright notice,
14+
this list of conditions, and the following disclaimer.
15+
16+
2. Redistributions in binary form must reproduce the above copyright notice,
17+
this list of conditions, and the following disclaimer in the documentation
18+
and/or other materials provided with the distribution.
19+
20+
3. Neither the name of the University nor the names of its contributors may
21+
be used to endorse or promote products derived from this software without
22+
specific prior written permission.
23+
24+
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25+
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27+
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34+
35+
=============================================================================*/
36+
37+
/*----------------------------------------------------------------------------
38+
*----------------------------------------------------------------------------*/
39+
#define LITTLEENDIAN 1
40+
41+
/*----------------------------------------------------------------------------
42+
*----------------------------------------------------------------------------*/
43+
#ifdef __GNUC_STDC_INLINE__
44+
#define INLINE inline
45+
#else
46+
#define INLINE extern inline
47+
#endif
48+
49+
/*----------------------------------------------------------------------------
50+
*----------------------------------------------------------------------------*/
51+
#include "opts-GCC.h"
52+

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

setup.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33

44

55
_SOFTFLOAT_SRCDIR: str = 'extern/berkeley-softfloat-3/source'
6-
_SOFTFLOAT_BUILDDIR: str = 'extern/berkeley-softfloat-3/build'
6+
_SOFTFLOAT_BUILDDIR: str = 'c/berkeley-softfloat-3/build'
77

8-
# RISC-V option is selected because it is the most general.
9-
_SOFTFLOAT_PLATFORM: str = 'Linux-RISCV64-GCC'
10-
_SOFTFLOAT_SPECIALIZE: str = 'RISCV'
8+
_SOFTFLOAT_SPECIALIZE: str = 'RISCV' # RISC-V option is selected because it is the most general.
9+
_SOFTFLOAT_PLATFORM: str = 'General'
1110

1211

1312
setup(
@@ -203,7 +202,6 @@
203202
's_commonNaNToF64UI.c',
204203
's_propagateNaNF64UI.c',
205204
's_f128UIToCommonNaN.c',
206-
's_commonNaNToF128UI.c',
207205
's_propagateNaNF128UI.c',
208206
'softfloat_raiseFlags.c'
209207
]

0 commit comments

Comments
 (0)