Skip to content

Commit 333f196

Browse files
committed
improve 2nd workflow readability
1 parent 64d6c57 commit 333f196

1 file changed

Lines changed: 32 additions & 15 deletions

File tree

.github/workflows/build_secondary_wheels.yml

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ on:
1111

1212
jobs:
1313
build_wheels:
14-
name: Build secondary wheels for py ${{ matrix.py }}, os ${{ matrix.cbw_os }}, arch ${{ matrix.arch }}
14+
name: >
15+
Build secondary wheels for py ${{ matrix.py }},
16+
os ${{ matrix.cbw_os }}, arch ${{ matrix.arch }}
1517
if: >
1618
${{
1719
(matrix.cbw_os == 'manylinux_' && matrix.arch != 'x86_64')
@@ -45,21 +47,26 @@ jobs:
4547
- name: Build wheels
4648
uses: pypa/cibuildwheel@v3.2.1
4749
env:
48-
CIBW_BUILD: cp${{ matrix.py }}-${{ matrix.cbw_os }}${{ matrix.arch }}
49-
CIBW_BUILD_FRONTEND: ${{ matrix.os == 'macos-latest' && 'build' || 'build[uv]' }}
50+
CIBW_BUILD: >
51+
cp${{ matrix.py }}-${{ matrix.cbw_os }}${{ matrix.arch }}
52+
CIBW_BUILD_FRONTEND: >
53+
${{ matrix.os == 'macos-latest' && 'build' || 'build[uv]' }}
5054
CIBW_ARCHS: ${{ matrix.arch }}
5155
CIBW_TEST_REQUIRES: pytest
5256
CIBW_TEST_COMMAND: >
53-
python -X faulthandler {package}/test/debug.py &&
54-
python -X faulthandler -m pytest -p no:faulthandler -s {package}
57+
python -X faulthandler {package}/test/debug.py
58+
&& python -X faulthandler -m pytest -p no:faulthandler
59+
-s {package}
5560
5661
- uses: actions/upload-artifact@v4
5762
with:
5863
name: secondary_wheel_artifact
5964
path: ./wheelhouse/*.whl
6065

6166
build_wheels_qemu:
62-
name: Build secondary wheels with QEMU for py ${{ matrix.py }}, os ${{ matrix.cbw_os }}, arch ${{ matrix.arch }}
67+
name: >
68+
Build secondary wheels with QEMU for py ${{ matrix.py }},
69+
os ${{ matrix.cbw_os }}, arch ${{ matrix.arch }}
6370
runs-on: ubuntu-latest
6471
strategy:
6572
matrix:
@@ -78,17 +85,25 @@ jobs:
7885
- name: Build wheels
7986
uses: pypa/cibuildwheel@v3.2.1
8087
env:
81-
CIBW_BUILD: cp${{ matrix.py }}-${{ matrix.cbw_os }}${{ matrix.arch }}
82-
CIBW_BUILD_FRONTEND: ${{ matrix.cbw_os == 'manylinux_' && 'build[uv]' || 'build' }}
88+
CIBW_BUILD: >
89+
cp${{ matrix.py }}-${{ matrix.cbw_os }}${{ matrix.arch }}
90+
CIBW_BUILD_FRONTEND: >
91+
${{
92+
matrix.cbw_os == 'manylinux_'
93+
&& 'build[uv]'
94+
|| 'build'
95+
}}
8396
CIBW_ARCHS: ${{ matrix.arch }}
8497
CIBW_TEST_REQUIRES: pytest
8598
CIBW_TEST_COMMAND: >
86-
python -X faulthandler {package}/test/debug.py &&
87-
python -X faulthandler -m pytest -p no:faulthandler -s {package}
99+
python -X faulthandler {package}/test/debug.py
100+
&& python -X faulthandler -m pytest -p no:faulthandler
101+
-s {package}
88102
89103
- uses: actions/upload-artifact@v4
90104
with:
91-
name: secondary_wheel_qemu_artifact_${{ matrix.py }}_${{ matrix.cbw_os }}_${{ matrix.arch }}
105+
name: >
106+
secondary_wheel_qemu_artifact_${{ matrix.py }}_${{ matrix.cbw_os }}_${{ matrix.arch }}
92107
path: ./wheelhouse/*.whl
93108

94109
build_old_wheels:
@@ -120,8 +135,9 @@ jobs:
120135
CIBW_BUILD_FRONTEND: build[uv]
121136
CIBW_TEST_REQUIRES: pytest
122137
CIBW_TEST_COMMAND: >
123-
python -X faulthandler {package}/test/debug.py &&
124-
python -X faulthandler -m pytest -p no:faulthandler -s {package}
138+
python -X faulthandler {package}/test/debug.py
139+
&& python -X faulthandler -m pytest -p no:faulthandler
140+
-s {package}
125141
126142
- uses: actions/upload-artifact@v4
127143
with:
@@ -151,8 +167,9 @@ jobs:
151167
CIBW_BUILD_FRONTEND: build[uv]
152168
CIBW_TEST_REQUIRES: pytest
153169
CIBW_TEST_COMMAND: >
154-
python -X faulthandler {package}/test/debug.py &&
155-
python -X faulthandler -m pytest -p no:faulthandler -s {package}
170+
python -X faulthandler {package}/test/debug.py
171+
&& python -X faulthandler -m pytest -p no:faulthandler
172+
-s {package}
156173
157174
- uses: actions/upload-artifact@v4
158175
with:

0 commit comments

Comments
 (0)