Skip to content

Commit 71f9164

Browse files
committed
GHA: Use Linux ARM runners for build and test
1 parent f4a6ff2 commit 71f9164

File tree

3 files changed

+29
-17
lines changed

3 files changed

+29
-17
lines changed

.cibw/setup-build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def pp3(y_min=7, y_max=10):
6161

6262
GHA_RUNNER = {
6363
"Linux": {
64-
"aarch64": "ubuntu-latest",
64+
"aarch64": "ubuntu-24.04-arm",
6565
"ppc64le": "ubuntu-latest",
6666
"x86_64": "ubuntu-latest",
6767
None: "ubuntu-latest"

.cibw/setup-test.py

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@
7676
"macOS": mpimap_macos,
7777
"Windows": mpimap_windows,
7878
}
79-
pymap = {
80-
"cp": "",
81-
"pp": " pypy",
82-
}
8379

8480
builds = []
8581
for whl in sorted(glob.glob(os.path.join(wheelhouse, "*.whl"))):
@@ -90,26 +86,30 @@
9086
assert match is not None
9187
std, mpi, py, x, y, ostag, archtag = match.groups()
9288
osname, mpiabi, x, y = osmap[ostag], f"{std}-{mpi}", int(x), int(y)
93-
for arch in ("x86_64", "AMD64", "arm64"):
89+
for arch in ("x86_64", "AMD64", "arm64", "aarch64"):
9490
if arch.lower() in archtag.lower():
9591
builds.append((osname, arch, mpiabi, py, (x, y)))
9692
builds = sorted(builds, key=lambda r: (r[0].lower(), *r[1:]))
9793

9894

9995
runners = {
100-
"Linux-x86_64": "ubuntu-22.04",
96+
"Linux-aarch64": "ubuntu-24.04-arm",
97+
"Linux-x86_64": "ubuntu-24.04",
10198
"macOS-arm64": "macos-14",
10299
"macOS-x86_64": "macos-13",
103100
"Windows-AMD64": "windows-2022",
104101
}
105102
matrix = []
106103
for entry in builds:
107104
osname, arch, mpiabi, py, (x, y) = entry
108-
runner = runners[f"{osname}-{arch}"]
109105
if py == "pp":
110106
continue
107+
runner = runners[f"{osname}-{arch}"]
111108
for mpiname, mpiversions in mpimap[osname][mpiabi]:
112109
for mpiversion in mpiversions:
110+
if f"{osname}-{arch}" == "Linux-aarch64":
111+
if mpiname == "impi_rt":
112+
continue
113113
if f"{osname}-{arch}" == "macOS-arm64":
114114
if f"{mpiname}-{mpiversion}" == "mpich-3.2":
115115
continue
@@ -122,17 +122,21 @@
122122
"runner": runner,
123123
"mpi": mpiname,
124124
"mpi-version": mpiversion,
125-
"py": f"{x}.{y}{pymap[py]}",
125+
"py": f"{x}.{y}",
126126
"arch": arch,
127127
}
128128
matrix.append(row)
129129
print(f"matrix-test-cf={json.dumps(matrix)}")
130130

131131

132132
runners = {
133+
"Linux-aarch64": [
134+
"ubuntu-22.04-arm",
135+
"ubuntu-24.04-arm",
136+
],
133137
"Linux-x86_64": [
134-
"ubuntu-20.04",
135138
"ubuntu-22.04",
139+
"ubuntu-24.04",
136140
],
137141
"macOS-arm64": [
138142
"macos-14",
@@ -148,14 +152,15 @@
148152
matrix = []
149153
for entry in builds:
150154
osname, arch, mpiabi, py, (x, y) = entry
155+
if py == "pp":
156+
continue
151157
std, _, mpi = mpiabi.partition("-")
152158
mpispeclist = [mpi]
153-
if osname == "Linux" and mpi == "mpich":
159+
if f"{osname}-{arch}" == "Linux-x86_64" and mpi == "mpich":
154160
mpispeclist.append("impi")
155-
pyspec = f"{x}.{y}" if py == "cp" else f"pypy-{x}.{y}"
156161
for runner in runners[f"{osname}-{arch}"]:
157-
if runner == "ubuntu-22.04":
158-
if py == "cp" and (x, y) < (3, 7):
162+
if runner.startswith("ubuntu-"):
163+
if py == "cp" and (x, y) < (3, 8):
159164
continue
160165
if runner == "macos-14":
161166
if py == "cp" and (x, y) < (3, 10):
@@ -167,7 +172,7 @@
167172
row = {
168173
"runner": runner,
169174
"mpi": mpispec,
170-
"py": pyspec,
175+
"py": f"{x}.{y}",
171176
"arch": arch,
172177
}
173178
if row not in matrix:

.github/workflows/cd-wheel.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
working-directory: mpi4py.git
131131

132132
- id: setup-qemu
133-
if: ${{ runner.os == 'Linux' }}
133+
if: ${{ runner.os == 'Linux' && matrix.arch == 'ppc64le' }}
134134
uses: docker/setup-qemu-action@v3
135135
with:
136136
platforms: all
@@ -265,6 +265,12 @@ jobs:
265265
matrix-test-gh: ${{ steps.setup.outputs.matrix-test-gh }}
266266
steps:
267267
- uses: actions/checkout@v4
268+
- if: ${{ contains(needs.setup.outputs.os-arch-list, '"Linux-aarch64"') }}
269+
uses: actions/download-artifact@v4
270+
with:
271+
path: wheelhouse
272+
pattern: build-Linux-aarch64-*
273+
merge-multiple: true
268274
- if: ${{ contains(needs.setup.outputs.os-arch-list, '"Linux-x86_64"') }}
269275
uses: actions/download-artifact@v4
270276
with:
@@ -478,7 +484,8 @@ jobs:
478484
with:
479485
mpi: ${{ matrix.mpi }}
480486

481-
- if: ${{ matrix.mpi == 'mpich' && runner.os == 'Linux' }}
487+
- if: ${{ matrix.mpi == 'mpich' &&
488+
startsWith(matrix.runner, 'ubuntu-22.04') }}
482489
run: sudo ln -sr /usr/lib/$(arch)-linux-gnu/libmpi{ch,}.so.12
483490

484491
- uses: ./.github/actions/mpi4py-test-basic

0 commit comments

Comments
 (0)