Skip to content

Github actions: Fix Windows Install GMT step in build.yml#9097

Open
Esteban82 wants to merge 5 commits into
masterfrom
fix_windows_build_workflow
Open

Github actions: Fix Windows Install GMT step in build.yml#9097
Esteban82 wants to merge 5 commits into
masterfrom
fix_windows_build_workflow

Conversation

@Esteban82

Copy link
Copy Markdown
Member

Done by Claude Sonnet 5.

This fixes "Install GMT" step on Windows (https://github.com/GenericMappingTools/gmt/actions/runs/29061283206/job/86263495049).

Cause: It was failing on Windows because it used bash without the Visual Studio environment variables.

Fix:
The step has been split into two:

  • Linux/macOS: uses bash as before
  • Windows: uses cmd with vcvars64.bat configured

@Esteban82 Esteban82 requested review from a team, joa-quim and seisman July 10, 2026 12:47
@Esteban82 Esteban82 added the AI-assisted All (or most) of the code was written by Artificial Intelligence. label Jul 10, 2026
@Esteban82

Copy link
Copy Markdown
Member Author

It didn't work. I will set this as WIP.

@Esteban82 Esteban82 changed the title Github actions: Fix Windows Install GMT step in build.yml WIP. Github actions: Fix Windows Install GMT step in build.yml Jul 10, 2026
@Esteban82 Esteban82 changed the title WIP. Github actions: Fix Windows Install GMT step in build.yml Github actions: Fix Windows Install GMT step in build.yml Jul 10, 2026
@Esteban82

Copy link
Copy Markdown
Member Author

Now it can be review.

@seisman

seisman commented Jul 11, 2026

Copy link
Copy Markdown
Member

@Esteban82 I have a few comments but I'm on a trip now. I will comment tonight

Comment on lines +128 to +138
- name: Install GMT (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
cd build
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --target install
setlocal enabledelayedexpansion
set "WININSTALLDIR=%INSTALLDIR:/=\%"
echo !WININSTALLDIR!\bin>> %GITHUB_PATH%
endlocal

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.

I think merging the "Compile GMT" and "Install GMT" steps into one step can simplify the workflow a little bit.


- name: Check a few simple commands
run: bash ci/simple-gmt-tests.sh
if: runner.os == 'Windows'

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.

I don't think this change is correct. After this change, only Windows CI runs the test simple-gmt-tests.sh

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

Labels

AI-assisted All (or most) of the code was written by Artificial Intelligence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants