Skip to content

Commit e9792fe

Browse files
authored
CI: Test on Linux arm64 runners (#3778)
1 parent c9155d7 commit e9792fe

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

.github/workflows/ci_tests.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ jobs:
5757
fail-fast: false
5858
matrix:
5959
python-version: ['3.11', '3.13']
60-
os: [ubuntu-latest, macos-latest, windows-latest]
60+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
6161
# Is it a draft Pull Request (true or false)?
6262
isDraft:
6363
- ${{ github.event.pull_request.draft }}
64-
# Only run three jobs on Ubuntu for draft PRs
64+
# Only run jobs on Ubuntu for draft PRs
6565
exclude:
66+
- os: ubuntu-24.04-arm
67+
isDraft: true
6668
- os: macos-latest
6769
isDraft: true
6870
- os: windows-latest

.github/workflows/ci_tests_dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
os: [ubuntu-24.04, macos-15, windows-2025]
39+
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, windows-2025]
4040
gmt_git_ref: [master]
4141
timeout-minutes: 30
4242
defaults:

.github/workflows/ci_tests_legacy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
strategy:
3535
fail-fast: false
3636
matrix:
37-
os: [ubuntu-22.04, macos-13, windows-2019]
37+
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-13, windows-2019]
3838
gmt_version: ['6.4']
3939
timeout-minutes: 30
4040
defaults:

pygmt/tests/test_contour.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test Figure.contour.
33
"""
44

5+
import platform
56
from pathlib import Path
67

78
import numpy as np
@@ -30,6 +31,7 @@ def fixture_region():
3031

3132

3233
@pytest.mark.mpl_image_compare
34+
@pytest.mark.xfail(platform.machine() == "aarch64", reason="Fails on Linux ARM64")
3335
def test_contour_vec(region):
3436
"""
3537
Plot an x-centered gaussian kernel with different y scale.
@@ -130,6 +132,7 @@ def test_contour_multiple_levels(region):
130132

131133

132134
@pytest.mark.mpl_image_compare(filename="test_contour_vec.png")
135+
@pytest.mark.xfail(platform.machine() == "aarch64", reason="Fails on Linux ARM64")
133136
def test_contour_incols_transposed_data(region):
134137
"""
135138
Make sure that transposing the data matrix still produces a correct result with

pygmt/tests/test_x2sys_cross.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44

55
import copy
6+
import platform
67
import sys
78
from pathlib import Path
89
from tempfile import TemporaryDirectory
@@ -270,7 +271,7 @@ def test_x2sys_cross_region_interpolation_numpoints():
270271
)
271272

272273
assert isinstance(output, pd.DataFrame)
273-
if sys.platform == "darwin":
274+
if platform.machine() in {"aarch64", "arm64"}:
274275
assert output.shape == (3894, 12)
275276
# Check crossover errors (z_X) and mean value of observables (z_M)
276277
npt.assert_allclose(output.z_X.mean(), -138.23215, rtol=1e-4)
@@ -298,7 +299,7 @@ def test_x2sys_cross_trackvalues():
298299
output = x2sys_cross(tracks=["@tut_ship.xyz"], tag=tag, trackvalues=True)
299300

300301
assert isinstance(output, pd.DataFrame)
301-
if sys.platform == "darwin":
302+
if platform.machine() in {"aarch64", "arm64"}:
302303
assert output.shape == (14374, 12)
303304
# Check mean of track 1 values (z_1) and track 2 values (z_2)
304305
npt.assert_allclose(output.z_1.mean(), -2422.973372, rtol=1e-4)

0 commit comments

Comments
 (0)