@@ -70,47 +70,110 @@ jobs:
7070 - name : Check matrix job result
7171 run : test "$DEPS_RESULT" = "success"
7272
73- build :
74- name : Build distribution packages
73+ build-linux :
74+ runs-on : ${{ matrix.platform.runner }}
7575 strategy :
76- fail-fast : false
7776 matrix :
78- target :
79- - ubuntu-24.04
80- - ubuntu-24.04-arm
81- - windows-latest
82- - macos-15-intel
83- - macos-15
84- python :
85- - " 3.11"
86- - " 3.12"
87- - " 3.13"
88- - " 3.14"
89- runs-on : ${{ matrix.target }}
77+ platform :
78+ - runner : ubuntu-22.04
79+ target : x86_64
80+ - runner : ubuntu-22.04
81+ target : aarch64
9082 steps :
91- - name : Setup Git
92- uses :
frequenz-floss/[email protected] 93-
94- - name : Fetch sources
95- uses : actions/checkout@v5
83+ - uses : actions/checkout@v5
84+ - uses : actions/setup-python@v5
9685 with :
97- submodules : true
86+ python-version : 3.x
87+ - name : Build wheels
88+ uses : PyO3/maturin-action@v1
89+ with :
90+ target : ${{ matrix.platform.target }}
91+ args : --release --out dist --find-interpreter
92+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
93+ manylinux : auto
94+ - name : Upload wheels
95+ uses : actions/upload-artifact@v5
96+ with :
97+ name : wheels-linux-${{ matrix.platform.target }}
98+ path : dist
9899
99- - name : Setup Python
100- uses :
frequenz-floss/[email protected] 100+ build-musllinux :
101+ runs-on : ${{ matrix.platform.runner }}
102+ strategy :
103+ matrix :
104+ platform :
105+ - runner : ubuntu-22.04
106+ target : x86_64
107+ - runner : ubuntu-22.04
108+ target : aarch64
109+ steps :
110+ - uses : actions/checkout@v5
111+ - uses : actions/setup-python@v5
101112 with :
102- python-version : ${{ matrix.python }}
103- dependencies : build
113+ python-version : 3.x
114+ - name : Build wheels
115+ uses : PyO3/maturin-action@v1
116+ with :
117+ target : ${{ matrix.platform.target }}
118+ args : --release --out dist --find-interpreter
119+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
120+ manylinux : musllinux_1_2
121+ - name : Upload wheels
122+ uses : actions/upload-artifact@v5
123+ with :
124+ name : wheels-musllinux-${{ matrix.platform.target }}
125+ path : dist
104126
105- - name : Build the source and binary distribution
106- run : python -m build
127+ build-windows :
128+ runs-on : ${{ matrix.platform.runner }}
129+ strategy :
130+ matrix :
131+ platform :
132+ - runner : windows-latest
133+ target : x64
134+ steps :
135+ - uses : actions/checkout@v5
136+ - uses : actions/setup-python@v5
137+ with :
138+ python-version : 3.x
139+ architecture : ${{ matrix.platform.target }}
140+ - name : Build wheels
141+ uses : PyO3/maturin-action@v1
142+ with :
143+ target : ${{ matrix.platform.target }}
144+ args : --release --out dist --find-interpreter
145+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
146+ - name : Upload wheels
147+ uses : actions/upload-artifact@v5
148+ with :
149+ name : wheels-windows-${{ matrix.platform.target }}
150+ path : dist
107151
108- - name : Upload distribution files
152+ build-macos :
153+ runs-on : ${{ matrix.platform.runner }}
154+ strategy :
155+ matrix :
156+ platform :
157+ - runner : macos-15-intel
158+ target : x86_64
159+ - runner : macos-15
160+ target : aarch64
161+ steps :
162+ - uses : actions/checkout@v5
163+ - uses : actions/setup-python@v5
164+ with :
165+ python-version : 3.x
166+ - name : Build wheels
167+ uses : PyO3/maturin-action@v1
168+ with :
169+ target : ${{ matrix.platform.target }}
170+ args : --release --out dist --find-interpreter
171+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
172+ - name : Upload wheels
109173 uses : actions/upload-artifact@v5
110174 with :
111- name : dist-packages-${{ matrix.target }}-${{ matrix.python }}
112- path : dist/*.whl
113- if-no-files-found : error
175+ name : wheels-macos-${{ matrix.platform.target }}
176+ path : dist
114177
115178 build-sdist :
116179 name : Build source distribution packages
@@ -123,29 +186,44 @@ jobs:
123186 command : sdist
124187 args : --out dist
125188 - name : Upload sdist
126- uses : actions/upload-artifact@v4
189+ uses : actions/upload-artifact@v5
127190 with :
128- name : dist-packages -sdist
191+ name : wheels -sdist
129192 path : dist/*.tar.gz
130193
131194 test-installation :
132195 name : Test package installation
133- needs : ["build", "build-sdist"]
196+ needs :
197+ - " build-linux"
198+ - " build-musllinux"
199+ - " build-windows"
200+ - " build-macos"
201+ - " build-sdist"
134202 strategy :
135203 fail-fast : false
136204 matrix :
137- target :
138- - ubuntu-24.04
139- - ubuntu-24.04-arm
140- - windows-latest
141- - macos-15-intel
142- - macos-15
205+ platform :
206+ - runner : ubuntu-24.04
207+ image : linux
208+ target : x86_64
209+ - runner : ubuntu-24.04-arm
210+ image : linux
211+ target : aarch64
212+ - runner : windows-latest
213+ image : windows
214+ target : x64
215+ - runner : macos-15-intel
216+ image : macos
217+ target : x86_64
218+ - runner : macos-15
219+ image : macos
220+ target : aarch64
143221 python :
144222 - " 3.11"
145223 - " 3.12"
146224 - " 3.13"
147225 - " 3.14"
148- runs-on : ${{ matrix.target }}
226+ runs-on : ${{ matrix.platform.runner }}
149227
150228 steps :
151229 - name : Setup Git
@@ -157,7 +235,7 @@ jobs:
157235 - name : Download package
158236 uses : actions/download-artifact@v6
159237 with :
160- name : dist-packages- ${{ matrix.target }}-${{ matrix.python }}
238+ name : wheels- ${{ matrix.platform.image }}-${{ matrix.platform.target }}
161239 path : dist
162240
163241 # This is necessary for the `pip` caching in the setup-python action to work
@@ -341,7 +419,7 @@ jobs:
341419 --generate-notes \
342420 $extra_opts \
343421 $REF_NAME \
344- dist/dist-packages- */*.whl dist/dist-packages -sdist/*.tar.gz
422+ dist/wheels- */*.whl dist/wheels -sdist/*.tar.gz
345423 env :
346424 REF_NAME : ${{ github.ref_name }}
347425 REPOSITORY : ${{ github.repository }}
0 commit comments