-
Notifications
You must be signed in to change notification settings - Fork 224
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: Test GMT dev version on Windows by building from source #2773
Conversation
5b20c5e
to
000ca3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! The compilation on Windows worked at https://github.com/GenericMappingTools/pygmt/actions/runs/6680586107/job/18153844748#step:8:405. I'll approve this since the build works, but I have one comment about setting more build flags (which can be done separately if needed).
.github/workflows/ci_tests_dev.yaml
Outdated
mkdir build | ||
cd build | ||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | ||
cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=${{ env.GMT_INSTALL_DIR }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{ env.MAMBA_ROOT_PREFIX }}\envs\pygmt\Library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not using many of the build flags in https://github.com/conda-forge/gmt-feedstock/blob/8cf880960420215125ee43b1cbd24b3fc6d03291/recipe/bld.bat#L10-L28. Is that ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We set the CMAKE_PREFIX_PATH
flag to tell CMake where to find these libraries, so these flags are not necessary:
-D FFTW3_ROOT=%LIBRARY_PREFIX% ^
-D GDAL_ROOT=%LIBRARY_PREFIX% ^
-D NETCDF_ROOT=%LIBRARY_PREFIX% ^
-D PCRE_ROOT=%LIBRARY_PREFIX% ^
-D ZLIB_ROOT=%LIBRARY_PREFIX% ^
-D CURL_ROOT=%LIBRARY_PREFIX% ^
Parallelization support. Can be enable if necessary.
-D GMT_ENABLE_OPENMP=TRUE ^
-D GMT_USE_THREADS=TRUE ^
Not necessary:
-D GMT_LIBDIR=lib ^
GSHHG and DCW data are not installed, but they can be automatically downloaded when needed.
-D DCW_ROOT=%DCW_DIR% ^
-D GSHHG_ROOT=%GSHHG_DIR% ^
-D COPY_GSHHG=TRUE ^
-D COPY_DCW=TRUE ^
Unnecessary flags for our "GMT Dev Tests":
-D GMT_INSTALL_TRADITIONAL_FOLDERNAMES=FALSE ^
-D GMT_INSTALL_MODULE_LINKS=FALSE ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parallelization support. Can be enable if necessary.
Adding this would be good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in c6b1baa.
It's unclear to me why we have a dvc error in this branch, which lead to ~200 failures
The scheduled runs two days ago don't have the issue https://github.com/GenericMappingTools/pygmt/actions/runs/6661401871/job/18104207392. |
/test-gmt-dev |
Description of proposed changes
In the "GMT Dev Tests" workflow, the way we get the GMT dev version is different on Linux/macOS and Windows. We build the GMT master branch source code on Linux/macOS, but on Windows, we install the dev version from the conda-forge/dev channel. The conda-forge/dev channel is updated every few weeks to months, so it's not always update-to-date. We choose to use the conda-forge/dev channel for Windows because building GMT on Windows is difficult.
However, it turns out that building GMT on Windows is much easier than I initially though, as long as we install all GMT dependencies via conda.
In this PR, I update the workflow to build GMT from source code on Windows, so that we're always using the same GMT dev version on all three platforms.
Supersedes #756
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version