Skip to content

Commit 0bf0180

Browse files
committed
Fix GitHub workflows
1 parent fe9d66e commit 0bf0180

File tree

5 files changed

+170
-9
lines changed

5 files changed

+170
-9
lines changed

.github/workflows/document.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
steps:
1818
- name: Checkout code
1919
uses: actions/checkout@v6
20+
with:
21+
submodules: recursive
2022

2123
- name: Set up Python
2224
uses: actions/setup-python@v6

.github/workflows/release.yml

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
dist:
10-
name: Release distribution packages
10+
name: Build distribution packages
1111

1212
strategy:
1313
matrix:
@@ -16,8 +16,6 @@ jobs:
1616
- ubuntu-24.04-arm
1717
- macos-15
1818
- macos-15-intel
19-
- windows-2025
20-
- windows-11-arm
2119
python-version:
2220
- '3.11'
2321
- '3.12'
@@ -28,6 +26,8 @@ jobs:
2826
steps:
2927
- name: Checkout code
3028
uses: actions/checkout@v6
29+
with:
30+
submodules: recursive
3131

3232
- name: Set up Python
3333
uses: actions/setup-python@v6
@@ -49,11 +49,59 @@ jobs:
4949
name: python-package-distributions
5050
path: dist/
5151

52+
dist-on-windows:
53+
name: Build distribution packages on Windows
54+
55+
strategy:
56+
matrix:
57+
os:
58+
- windows-2025
59+
60+
runs-on: ${{ matrix.os }}
61+
62+
defaults:
63+
run:
64+
shell: msys2 {0}
65+
66+
steps:
67+
- name: Setup MSYS2 environment
68+
uses: msys2/setup-msys2@v2
69+
with:
70+
msystem: UCRT64
71+
update: true
72+
install: git mingw-w64-ucrt-x86_64-gcc
73+
74+
- name: Checkout code
75+
uses: actions/checkout@v6
76+
with:
77+
submodules: recursive
78+
79+
- name: Set up Python
80+
run: |
81+
pacman -Syu --noconfirm
82+
pacman -S --noconfirm mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-python-pip
83+
84+
- name: Install dependencies
85+
run: |
86+
python -m pip install --upgrade pip
87+
python -m pip install setuptools wheel build cython
88+
89+
- name: Build wheel and source tarball
90+
run: |
91+
python -m build
92+
93+
- name: Store distribution
94+
uses: actions/upload-artifact@v6
95+
with:
96+
name: python-package-distributions
97+
path: dist/
98+
5299
pypi:
53100
name: Publish distribution
54101

55102
needs:
56103
- dist
104+
- dist-on-windows
57105

58106
runs-on: ubuntu-latest
59107

.github/workflows/test.yml

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
- ubuntu-24.04-arm
2222
- macos-15
2323
- macos-15-intel
24-
- windows-2025
25-
- windows-11-arm
2624
python-version:
2725
- '3.11'
2826
- '3.12'
@@ -33,6 +31,8 @@ jobs:
3331
steps:
3432
- name: Checkout code
3533
uses: actions/checkout@v6
34+
with:
35+
submodules: recursive
3636

3737
- name: Set up Python
3838
uses: actions/setup-python@v6
@@ -43,7 +43,65 @@ jobs:
4343
run: |
4444
python -m pip install --upgrade pip
4545
python -m pip install setuptools wheel build cython
46-
python -m pip install flake8, mypy, pytest
46+
python -m pip install flake8 mypy pytest
47+
48+
- name: Build wheel and source tarball
49+
run: |
50+
python -m build
51+
52+
- name: Install built wheel
53+
run: |
54+
python -m pip install dist/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-windows:
69+
name: Test on Windows
70+
71+
strategy:
72+
matrix:
73+
os:
74+
- windows-2025
75+
76+
runs-on: ${{ matrix.os }}
77+
78+
defaults:
79+
run:
80+
shell: msys2 {0}
81+
82+
steps:
83+
- name: Setup MSYS2 environment
84+
uses: msys2/setup-msys2@v2
85+
with:
86+
msystem: UCRT64
87+
update: true
88+
install: git mingw-w64-ucrt-x86_64-gcc
89+
90+
- name: Checkout code
91+
uses: actions/checkout@v6
92+
with:
93+
submodules: recursive
94+
95+
- name: Set up Python
96+
run: |
97+
pacman -Syu --noconfirm
98+
pacman -S --noconfirm mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-python-pip
99+
100+
- name: Install dependencies
101+
run: |
102+
python -m pip install --upgrade pip
103+
python -m pip install setuptools wheel build cython
104+
python -m pip install flake8 mypy pytest
47105
48106
- name: Build wheel and source tarball
49107
run: |

.github/workflows/testpypi.yml

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
dist:
10-
name: Release distribution packages
10+
name: Build distribution packages
1111

1212
strategy:
1313
matrix:
@@ -16,8 +16,6 @@ jobs:
1616
- ubuntu-24.04-arm
1717
- macos-15
1818
- macos-15-intel
19-
- windows-2025
20-
- windows-11-arm
2119
python-version:
2220
- '3.11'
2321
- '3.12'
@@ -28,6 +26,8 @@ jobs:
2826
steps:
2927
- name: Checkout code
3028
uses: actions/checkout@v6
29+
with:
30+
submodules: recursive
3131

3232
- name: Set up Python
3333
uses: actions/setup-python@v6
@@ -49,11 +49,59 @@ jobs:
4949
name: python-package-distributions
5050
path: dist/
5151

52+
dist-on-windows:
53+
name: Build distribution packages on Windows
54+
55+
strategy:
56+
matrix:
57+
os:
58+
- windows-2025
59+
60+
runs-on: ${{ matrix.os }}
61+
62+
defaults:
63+
run:
64+
shell: msys2 {0}
65+
66+
steps:
67+
- name: Setup MSYS2 environment
68+
uses: msys2/setup-msys2@v2
69+
with:
70+
msystem: UCRT64
71+
update: true
72+
install: git mingw-w64-ucrt-x86_64-gcc
73+
74+
- name: Checkout code
75+
uses: actions/checkout@v6
76+
with:
77+
submodules: recursive
78+
79+
- name: Set up Python
80+
run: |
81+
pacman -Syu --noconfirm
82+
pacman -S --noconfirm mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-python-pip
83+
84+
- name: Install dependencies
85+
run: |
86+
python -m pip install --upgrade pip
87+
python -m pip install setuptools wheel build cython
88+
89+
- name: Build wheel and source tarball
90+
run: |
91+
python -m build
92+
93+
- name: Store distribution
94+
uses: actions/upload-artifact@v6
95+
with:
96+
name: python-package-distributions
97+
path: dist/
98+
5299
testpypi:
53100
name: Publish test distribution
54101

55102
needs:
56103
- dist
104+
- dist-on-windows
57105

58106
runs-on: ubuntu-latest
59107

cspell.config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ words:
3737
- ixor
3838
- libc
3939
- lshift
40+
- msys
41+
- msystem
4042
- mypy
4143
- ndim
44+
- noconfirm
45+
- pacman
4246
- popd
4347
- pushd
4448
- pycache
@@ -62,6 +66,7 @@ words:
6266
- testpypi
6367
- toctree
6468
- truediv
69+
- ucrt
6570
- undoc
6671
- warningiserror
6772
- Yoshida

0 commit comments

Comments
 (0)