-
Notifications
You must be signed in to change notification settings - Fork 235
CI: Combine the steps for building GMT source code in the 'GMT Dev Tests' workflow #4353
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
Conversation
.github/workflows/ci_tests_dev.yaml
Outdated
| - name: Build GMT on Windows | ||
| shell: bash | ||
| - name: Build GMT from source | ||
| shell: bash -l {0} |
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.
Can probably remove this since already set in defaults above. Should have done this in #4329 (comment)
| shell: bash -l {0} |
| cd ../../ | ||
| rm -rf gmt | ||
| env: | ||
| GMT_INSTALL_DIR: ${{ runner.temp }}/gmt-install-dir |
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.
See if this would work, based on https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#example
| GMT_INSTALL_DIR: ${{ runner.temp }}/gmt-install-dir | |
| CMAKE_PREFIX_PATH: ${{ startsWith(matrix.os, 'windows') && '' || '-DCMAKE_PREFIX_PATH=$MAMBA_ROOT_PREFIX/envs/pygmt/Library' }} | |
| GMT_INSTALL_DIR: ${{ runner.temp }}/gmt-install-dir |
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.
I didn't try this, because now we need to set CMAKE_PREFIX_PATH to different values based on the OS.
.github/workflows/ci_tests_dev.yaml
Outdated
| CMAKE_PREFIX_PATH="-DCMAKE_PREFIX_PATH=$MAMBA_ROOT_PREFIX/envs/pygmt/Library" | ||
| else | ||
| CMAKE_PREFIX_PATH="" |
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.
| CMAKE_PREFIX_PATH="-DCMAKE_PREFIX_PATH=$MAMBA_ROOT_PREFIX/envs/pygmt/Library" | |
| else | |
| CMAKE_PREFIX_PATH="" |
Co-authored-by: Wei Ji <[email protected]>
|
Still not lucky. It seems that we need |
I still don’t fully understand the underlying cause, but the observation appears reliable. On Windows, the login shell seems to interfere with the Visual Studio activation script ( On Linux/macOS, a login shell automatically activates the environment, and CMake locates the libraries without help; with a non-login shell, we need to set Now building source codes succeeds on all platforms. The failing test is unrelated. CI Runs: https://github.com/GenericMappingTools/pygmt/actions/runs/20982948742 |
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.
Looks good. Just curious though, you know what's up with the skipped job at https://github.com/GenericMappingTools/pygmt/actions/runs/20982938310/job/60311514437?
With changes in #4329, now it's possible to have a single step for building GMT source code on all platforms.