Skip to content
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

Implement Windows MSVC and MinGW-w64 tests in GitHub Actions CI #514

Merged
merged 3 commits into from
Mar 9, 2025

Conversation

jcflack
Copy link
Contributor

@jcflack jcflack commented Mar 8, 2025

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).

jcflack added 3 commits March 7, 2025 21:08
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.
@jcflack jcflack merged commit 9561c13 into REL1_6_STABLE Mar 9, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant