Skip to content

CI: Use ubuntu-26.04 in the GMT Dev Tests workflow#4672

Open
weiji14 wants to merge 5 commits into
mainfrom
ci/ubuntu-2604
Open

CI: Use ubuntu-26.04 in the GMT Dev Tests workflow#4672
weiji14 wants to merge 5 commits into
mainfrom
ci/ubuntu-2604

Conversation

@weiji14

@weiji14 weiji14 commented Jun 11, 2026

Copy link
Copy Markdown
Member

Description of proposed changes

Xref https://github.blog/changelog/2026-06-11-new-runner-images-in-public-preview/

Also setting deployment: false for the environment to silence the deployment messages (e.g. that were seen in #4653)

Supersedes #3258

@weiji14 weiji14 added this to the 0.19.0 milestone Jun 11, 2026
@weiji14 weiji14 self-assigned this Jun 11, 2026
@weiji14 weiji14 added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Jun 11, 2026
@weiji14 weiji14 added the run/test-gmt-dev Trigger the GMT Dev Tests workflow in PR label Jun 11, 2026
@weiji14 weiji14 marked this pull request as ready for review June 11, 2026 22:40
@seisman

seisman commented Jun 14, 2026

Copy link
Copy Markdown
Member

There are two new failures with ubuntu-26.04:

_______________ test_x2sys_cross_region_interpolation_numpoints ________________

    @pytest.mark.usefixtures("mock_x2sys_home")
    def test_x2sys_cross_region_interpolation_numpoints():
        """
        Test that x2sys_cross's region (R), interpolation (l) and numpoints (W) arguments
        work.
        """
        with TemporaryDirectory(prefix="X2SYS", dir=Path.cwd()) as tmpdir:
            tag = Path(tmpdir).name
            x2sys_init(tag=tag, fmtfile="xyz", force=True)
            output = x2sys_cross(
                tracks=["@tut_ship.xyz"],
                tag=tag,
                coe="i",
                region=[245, 250, 20, 25],
                interpolation="a",  # Akima spline interpolation
                numpoints=5,  # Use up to 5 data points in interpolation
            )
    
            assert isinstance(output, pd.DataFrame)
            if platform.machine() in {"aarch64", "arm64"}:
                assert output.shape == (3894, 12)
                # Check crossover errors (z_X) and mean value of observables (z_M)
                npt.assert_allclose(output.z_X.mean(), -138.23215, rtol=1e-4)
                npt.assert_allclose(output.z_M.mean(), -2897.187545, rtol=1e-4)
            else:
>               assert output.shape == (3882, 12)
E               assert (3894, 12) == (3882, 12)
E                 
E                 At index 0 diff: 3894 != 3882
E                 
E                 Full diff:
E                   (
E                 -     3882,
E                 ?       ^^
E                 +     3894,
E                 ?       ^^
E                       12,
E                   )

../pygmt/tests/test_x2sys_cross.py:263: AssertionError
----------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
----------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
----------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
________________________ test_x2sys_cross_track_values _________________________

    @pytest.mark.usefixtures("mock_x2sys_home")
    def test_x2sys_cross_track_values():
        """
        Test that x2sys_cross's track_values (Z) argument work.
        """
        with TemporaryDirectory(prefix="X2SYS", dir=Path.cwd()) as tmpdir:
            tag = Path(tmpdir).name
            x2sys_init(tag=tag, fmtfile="xyz", force=True)
            output = x2sys_cross(tracks=["@tut_ship.xyz"], tag=tag, track_values=True)
    
            assert isinstance(output, pd.DataFrame)
            if platform.machine() in {"aarch64", "arm64"}:
                assert output.shape == (14374, 12)
                # Check mean of track 1 values (z_1) and track 2 values (z_2)
                npt.assert_allclose(output.z_1.mean(), -2422.973372, rtol=1e-4)
                npt.assert_allclose(output.z_2.mean(), -2402.87476, rtol=1e-4)
            else:
>               assert output.shape == (14338, 12)
E               assert (14374, 12) == (14338, 12)
E                 
E                 At index 0 diff: 14374 != 14338
E                 
E                 Full diff:
E                   (
E                 -     14338,
E                 ?        ^^
E                 +     14374,
E                 ?        ^^
E                       12,
E                   )

weiji14 added 2 commits June 15, 2026 09:30
Check platform difference between Ubuntu 24.04 and Ubuntu 26.04 causing different results on x2sys_cross.
Comment on lines +257 to 261
raise ValueError(
platform.uname(), platform.freedesktop_os_release(), platform.libc_ver()
)
if platform.machine() in {"aarch64", "arm64"}:
assert output.shape == (3894, 12)

@weiji14 weiji14 Jun 14, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two new failures with ubuntu-26.04:

Interesting, so the ubuntu-26.04 (specifically x86_64) results now match that of aarch64/arm64 before (#3778). I've debugged the CI matrix and found:

Ubuntu 26.04 (x86_64):

  • Uname: (uname_result(system='Linux', node='runnervmrd89b', release='7.0.0-1004-azure', version='#4-Ubuntu SMP PREEMPT Mon Apr 13 15:46:11 UTC 2026', machine='x86_64')
  • freedesktop_os_release: {'NAME': 'Ubuntu', 'ID': 'ubuntu', 'PRETTY_NAME': 'Ubuntu 26.04 LTS', 'VERSION_ID': '26.04', 'VERSION': '26.04 LTS (Resolute Raccoon)', 'VERSION_CODENAME': 'resolute', ...}
  • libc_ver: ('glibc', '2.43')

Ubuntu 26.04 (arm):

  • Uname: (uname_result(system='Linux', node='runnervm48rkm', release='7.0.0-1004-azure', version='#4-Ubuntu SMP PREEMPT Mon Apr 13 15:33:32 UTC 2026', machine='aarch64')
  • freedesktop_os_release: {'NAME': 'Ubuntu', 'ID': 'ubuntu', 'PRETTY_NAME': 'Ubuntu 26.04 LTS', 'VERSION_ID': '26.04', 'VERSION': '26.04 LTS (Resolute Raccoon)', 'VERSION_CODENAME': 'resolute', ...}
  • libc_ver: ('glibc', '2.43')

Ubuntu 24.04 (x86_64):

  • Uname: (uname_result(system='Linux', node='runnervm1li68', release='6.17.0-1018-azure', version='#18~24.04.1-Ubuntu SMP Thu May 28 16:39:11 UTC 2026', machine='x86_64')
  • freedesktop_os_release: {'NAME': 'Ubuntu', 'ID': 'ubuntu', 'PRETTY_NAME': 'Ubuntu 24.04.4 LTS', 'VERSION_ID': '24.04', 'VERSION': '24.04.4 LTS (Noble Numbat)', 'VERSION_CODENAME': 'noble', ...}
  • libc_ver: ('glibc', '2.39')

Ubuntu 24.04 (arm):

  • Uname: (uname_result(system='Linux', node='runnervm0667l', release='6.17.0-1018-azure', version='#18~24.04.1-Ubuntu SMP Thu May 28 16:41:33 UTC 2026', machine='aarch64')
  • freedesktop_os_release: {'NAME': 'Ubuntu', 'ID': 'ubuntu', 'PRETTY_NAME': 'Ubuntu 24.04.4 LTS', 'VERSION_ID': '24.04', 'VERSION': '24.04.4 LTS (Noble Numbat)', 'VERSION_CODENAME': 'noble', ...}
  • libc_ver: ('glibc', '2.39')

I'm aware that the glibc version changed from 2.39 -> 2.43 in Ubuntu 26.04, but not sure if that is whats causing the discrepancy. Does compiling GMT on a higher glibc version on x86_64 cause it to produce the 'correct'/same results as linux-aarch64 or osx-arm64? How should we modify the if-statement to handle this, considering Windows and Ubuntu-24.04 still produces the incorrect(?) result.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How should we modify the if-statement to handle this, considering Windows and Ubuntu-24.04 still produces the incorrect(?) result.

Maybe do the inverted checking, i.e., checking if the os is windows or Ubuntu 26.04 x86_64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs run/test-gmt-dev Trigger the GMT Dev Tests workflow in PR skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants