From 80b8778b3141b41c9a7197a2219d3ecf4290ac05 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Mar 2026 15:28:47 +0800 Subject: [PATCH 1/2] Force static data server for tests --- ci/config-gmt-unix.sh | 3 --- ci/config-gmt-windows.sh | 3 --- cmake/ConfigUserAdvancedTemplate.cmake | 5 +++-- cmake/modules/ConfigCMake.cmake | 7 +++++++ 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ci/config-gmt-unix.sh b/ci/config-gmt-unix.sh index 70a9645ae30..d9105166795 100755 --- a/ci/config-gmt-unix.sh +++ b/ci/config-gmt-unix.sh @@ -11,9 +11,6 @@ set (DCW_ROOT "$ENV{COASTLINEDIR}/dcw") set (GMT_ENABLE_OPENMP TRUE) -# Always use the 'static' data server in CI. -set (GMT_DATA_SERVER static) - # recommended even for release build set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement ${CMAKE_C_FLAGS}") # extra warnings diff --git a/ci/config-gmt-windows.sh b/ci/config-gmt-windows.sh index a93e5bd6360..464aeb17815 100755 --- a/ci/config-gmt-windows.sh +++ b/ci/config-gmt-windows.sh @@ -10,9 +10,6 @@ set (GSHHG_ROOT "$ENV{COASTLINEDIR}/gshhg") set (DCW_ROOT "$ENV{COASTLINEDIR}/dcw") set (GMT_ENABLE_OPENMP TRUE) - -# Always use the 'static' data server in CI. -set (GMT_DATA_SERVER static) EOF if [[ "$RUN_TESTS" == "true" ]]; then diff --git a/cmake/ConfigUserAdvancedTemplate.cmake b/cmake/ConfigUserAdvancedTemplate.cmake index 078510519de..94f41a040ca 100644 --- a/cmake/ConfigUserAdvancedTemplate.cmake +++ b/cmake/ConfigUserAdvancedTemplate.cmake @@ -207,8 +207,9 @@ set (GMT_ENABLE_OPENMP TRUE) # Uncomment the following line to enable running tests of the GMT supplements #set (DO_SUPPLEMENT_TESTS ON) -# Uncomment the following line if you need to run the full tests suite using -# the gmtserver "static" distribution instead of the default server. +# Uncomment the following line if you need to override the default data server +# for tests. When DO_TESTS is ON, the default "oceania" server is changed to +# "static" automatically unless you set GMT_DATA_SERVER explicitly. # set (GMT_DATA_SERVER "static") # List extra sub-dirs of 'src' with a CMakeLists.txt to build custom modules diff --git a/cmake/modules/ConfigCMake.cmake b/cmake/modules/ConfigCMake.cmake index b9b573f7df9..e52e40ac7ab 100644 --- a/cmake/modules/ConfigCMake.cmake +++ b/cmake/modules/ConfigCMake.cmake @@ -231,6 +231,13 @@ if (DO_EXAMPLES OR DO_TESTS AND NOT SUPPORT_EXEC_IN_BINARY_DIR) set (SUPPORT_EXEC_IN_BINARY_DIR ON) endif (DO_EXAMPLES OR DO_TESTS AND NOT SUPPORT_EXEC_IN_BINARY_DIR) +# Tests should use the static data server by default unless the user explicitly set +# GMT_DATA_SERVER to something else. +if (DO_TESTS AND GMT_DATA_SERVER STREQUAL "oceania") + message (STATUS "Setting GMT_DATA_SERVER to 'static' for tests") + set (GMT_DATA_SERVER "static") +endif (DO_TESTS AND GMT_DATA_SERVER STREQUAL "oceania") + # Some tests are known to fail, and can be excluded from the test by adding # the comment "# GMT_KNOWN_FAILURE". if (NOT DEFINED GMT_ENABLE_KNOWN2FAIL) From 1a7b6b51256e67670ec0bf9fdd403ba57dc85edd Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 18 Mar 2026 15:40:38 +0800 Subject: [PATCH 2/2] Add workflow_dispatch so that we can trigger tests manually --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 341842572ea..9c7e1247edb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,6 +21,7 @@ on: - 'doc/examples/**' - 'doc/scripts/**' - '.github/workflows/tests.yml' + workflow_dispatch: defaults: run: