Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Install DCW and GSHHG data in the "GMT Dev Tests" workflow #3486

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

seisman
Copy link
Member

@seisman seisman commented Oct 6, 2024

Description of proposed changes

Sometimes the "GMT Dev Tests workflow" fails with errors like:

Error:  GMTCLibError("Module 'coast' failed with status code 74:\ncoast [ERROR]: Cannot open file /Users/runner/.gmt/geography/dcw/dcw-gmt.nc!\ncoast [ERROR]: South is outside -90 to +90 degree range\ncoast [ERROR]: General map projection error")
Traceback (most recent call last):
  File "/Users/runner/micromamba/envs/pygmt/lib/python3.12/doctest.py", line 1368, in __run
    exec(compile(example.source, filename, "single",
  File "<doctest pygmt.clib.session.Session.extract_region[6]>", line 1, in <module>
  File "/Users/runner/work/pygmt/pygmt/pygmt/helpers/decorators.py", line 609, in new_module
    return module_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/pygmt/pygmt/pygmt/helpers/decorators.py", line 773, in new_module
    return module_func(*bound.args, **bound.kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/pygmt/pygmt/pygmt/src/coast.py", line 203, in coast
    lib.call_module(module="coast", args=build_arg_list(kwargs))
  File "/Users/runner/work/pygmt/pygmt/pygmt/clib/session.py", line 655, in call_module
    raise GMTCLibError(
pygmt.exceptions.GMTCLibError: Module 'coast' failed with status code 74:
Error: ERROR]: Cannot open file /Users/runner/.gmt/geography/dcw/dcw-gmt.nc!
Error: ERROR]: South is outside -90 to +90 degree range
Error: ERROR]: General map projection error

GMT will download the DCW and GSHHG datasets if they are not installed. The download may fail and cause errors like above.

@seisman seisman added the run/test-gmt-dev Trigger the GMT Dev Tests workflow in PR label Oct 6, 2024
@seisman seisman added this to the 0.14.0 milestone Oct 6, 2024
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels Oct 6, 2024
@seisman seisman changed the title CI: Install DCW and GSHHG data from conda-forge CI: Install DCW and GSHHG data in the "GMT Dev Tests" workflow Oct 6, 2024
@seisman seisman removed the needs review This PR has higher priority and needs review. label Oct 6, 2024
@seisman
Copy link
Member Author

seisman commented Oct 7, 2024

This doesn't work on Windows.

@seisman
Copy link
Member Author

seisman commented Oct 7, 2024

It seems compiling gshhg_version fails on Windows:

CMake Error at cmake/modules/FindGSHHG.cmake:70 (message):
  Cannot determine GSHHG version:


  			Change Dir: 'D:/a/pygmt/pygmt/gmt/build/CMakeTmp/CMakeFiles/CMakeTmp'


  Run Build Command(s):
  C:/Users/runneradmin/micromamba/envs/pygmt/Library/bin/ninja.exe -v
  cmTC_165d0

  [1/2]
  C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe
  /nologo -DSTANDALONE
  -IC:\Users\runneradmin\micromamba\envs\pygmt\Library\include
  /D_CRT_NONSTDC_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE
  /D_CRT_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_DEPRECATE /DWIN32 /D_WINDOWS
  -openmp /Zi /Ob0 /Od /RTC1 -MDd /showIncludes
  /FoCMakeFiles\cmTC_165d0.dir\gshhg_version.c.obj
  /FdCMakeFiles\cmTC_165d0.dir\ /FS -c
  D:\a\pygmt\pygmt\gmt\src\gshhg_version.c

  [2/2] C:\Windows\system32\cmd.exe /C "cd .  && "C:\Program
  Files\CMake\bin\cmake.exe" -E vs_link_exe
  --intdir=CMakeFiles\cmTC_165d0.dir
  --rc=C:\PROGRA~2\WI3CF2~1\10\bin\[100](https://github.com/GenericMappingTools/pygmt/actions/runs/11201088253/job/31135709376?pr=3486#step:7:101)226~1.0\x64\rc.exe
  --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests --
  C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\link.exe
  /nologo CMakeFiles\cmTC_165d0.dir\gshhg_version.c.obj /out:cmTC_165d0.exe
  /implib:cmTC_165d0.lib /pdb:cmTC_165d0.pdb /version:0.0 /machine:x64
  /MANIFEST:NO setargv.obj /debug /INCREMENTAL /subsystem:console
  C:\Users\runneradmin\micromamba\envs\pygmt\Library\lib\netcdf.lib
  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
  oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."







  			Exit code 0xc0000135

Call Stack (most recent call first):
  src/CMakeLists.txt:325 (find_package)

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