Implement Windows MSVC and MinGW-w64 tests in GitHub Actions CI#514
Merged
jcflack merged 3 commits intoREL1_6_STABLEfrom Mar 9, 2025
Merged
Implement Windows MSVC and MinGW-w64 tests in GitHub Actions CI#514jcflack merged 3 commits intoREL1_6_STABLEfrom
jcflack merged 3 commits intoREL1_6_STABLEfrom
Conversation
The Windows runner comes with an MSVC-built PostgreSQL preinstalled (probably the Chocolatey one, which relies on the EnterpriseDB installer). The fussiest part of configuration is finding the Visual Studio .bat file that sets all the environment variables needed for the build to succeed, but there is an action ilammy/msvc-dev-cmd that takes care of finding and running that, capturing its changes to the environment, and replicating those in the environment of the subsequent steps. For some reason java.home on Windows has the JVM shared object under bin\server and not lib/server as on Linux.
MSYS2 is preinstalled on the runner but apparently not with gcc. Have pacman install that also, and prepend the c:\msys64\mingw64\bin directory to the PATH. Using msys2bash, it has to be prepended in the form /c/msys64/mingw64/bin, which gets transformed correctly into the Windows environment variable. The gcc that is installed on the runner is in /c/mingw64/bin rather than /c/msys64/mingw64/bin where pacman puts it. A lot of cycles and bandwidth would be saved if that one could be used. PL/Java can be successfully built that way, but on loading it into the backend, "server process (PID 2116) was terminated by exception 0xC0000005". So it seems that building to load into a pacman PostgreSQL backend must be done using the pacman gcc.
Use exclude: to test fewer Java versions on the Windows runners, which seem to be extra slow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starts were made back in 2020 on Windows tests in the GitHub Actions workflows, but they were not completed. Appveyor continued to be used for Windows CI, but at the cost of less parallelism among the matrix of tests and therefore slower results.
With this PR, the GitHub Actions workflow is now covering Linux (x64), Windows (x64, using MSVC or MinGW-w64), and Mac OS (x64 and arm64).