Skip to content

Commit c2e3637

Browse files
committed
rafacto matrix
1 parent 74047d2 commit c2e3637

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

.github/workflows/python-packages.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,31 @@ jobs:
4444

4545
build_wheels:
4646

47-
name: "Build wheels on ${{ matrix.os }}"
48-
runs-on: ${{ matrix.os }}
47+
name: "Build ${{ matrix.target.name }} wheels"
48+
runs-on: ${{ matrix.target.os }}
4949

5050
strategy:
5151
fail-fast: false
5252
matrix:
53-
os:
54-
#- ubuntu-24.04
55-
#- windows-2022
56-
- macos-14
53+
target:
54+
- name: "Linux Intel 32bits"
55+
os: ubuntu-24.04
56+
arch: i686
57+
- name: "Linux Intel 64bits"
58+
os: ubuntu-24.04
59+
arch: x86_64
60+
- name: "Linux ARM 64bits"
61+
os: ubuntu-24.04
62+
arch: aarch64
63+
- name: "macOS Intel 64bits"
64+
os: macos-13
65+
arch: x86_64
66+
- name: "macOS Apple Silicon (ARM 64bits)"
67+
os: macos-14
68+
arch: arm64
69+
- name: "Windows Intel 64bit"
70+
os: windows-2022
71+
arch: AMD64
5772

5873
steps:
5974

@@ -62,32 +77,17 @@ jobs:
6277
with:
6378
submodules: true
6479

65-
#- name: "Set up QEMU"
66-
# if: runner.os == 'Linux'
67-
# uses: docker/setup-qemu-action@v3
80+
- name: "Set up QEMU"
81+
if: runner.os == 'Linux' && matrix.target.arch == 'aarch64'
82+
uses: docker/setup-qemu-action@v3
6883

69-
- name: "Build Linux or Windows wheels"
84+
- name: "Build wheels"
7085
uses: pypa/cibuildwheel@v3.0.0
71-
if: runner.os != 'macOS'
7286
env:
73-
CIBW_ARCHS_LINUX: auto aarch64
74-
CIBW_ARCHS_WINDOWS: AMD64
75-
PIP_USE_PEP517: 1
76-
77-
- name: "Build macOS arm64 wheels"
78-
uses: pypa/cibuildwheel@v3.0.0
79-
if: runner.os == 'macOS'
80-
env:
81-
CMAKE_OSX_ARCHITECTURES: arm64
82-
CIBW_ARCHS_MACOS: arm64
83-
PIP_USE_PEP517: 1
84-
85-
- name: "Build macOS x86_64 wheels"
86-
uses: pypa/cibuildwheel@v3.0.0
87-
if: runner.os == 'macOS'
88-
env:
89-
CMAKE_OSX_ARCHITECTURES: x86_64
90-
CIBW_ARCHS_MACOS: x86_64
87+
CIBW_ARCHS_LINUX: ${{ matrix.target.arch }}
88+
CIBW_ARCHS_WINDOWS: ${{ matrix.target.arch }}
89+
CIBW_ARCHS_MACOS: ${{ matrix.target.arch }}
90+
CMAKE_OSX_ARCHITECTURES: ${{ matrix.target.arch }}
9191
PIP_USE_PEP517: 1
9292

9393
- name: "DEBUG"
@@ -101,7 +101,7 @@ jobs:
101101
- name: "Upload artifacts"
102102
uses: actions/upload-artifact@v4
103103
with:
104-
name: wheels-${{ matrix.os }}
104+
name: wheels-${{ matrix.target.os }}-${{ matrix.target.arch }}
105105
path: ./wheelhouse/*.whl
106106
retention-days: 1
107107

0 commit comments

Comments
 (0)