libpg_query
libpg_query copied to clipboard
Binaries on GitHub Releases?
The GitHub releases, eg the 16-5.1.0 release seen below, do not currently have binaries for common platforms like win32-x64, darwin-x64, darwin-arm64, linux-x64, linux-arm64:
Would @pganalyze be open to publishing binaries with releases (eg. as a part of a CI action)?
This would be helpful for projects based on libpg_query, such as the libpg-query npm package by @pyramation and others:
- https://github.com/launchql/libpg-query-node/issues/22#issuecomment-1909812739
Would @pganalyze be open to publishing binaries with releases (eg. as a part of a CI action)?
We probably could, since we're already running the test infrastructure on Linux and Windows anyway, and I think we just need to do this conditionally when its a release tag.
That said, the current Windows MSVC makefile generates a static object (.lib), instead of a shared library (.dll). I'm not sure if a downstream user like @pyramation's npm package can use a static object, or requires a DLL?
That said, the current Windows MSVC makefile generates a static object (
.lib), instead of a shared library (.dll). I'm not sure if a downstream user like @pyramation's npm package can use a static object, or requires a DLL?
Before publishing, I have linux and mac covered with .a files:
libpg_query
libpg_query/osx
libpg_query/osx/libpg_query.a
libpg_query/osx/.gitkeep
libpg_query/include
libpg_query/include/.gitkeep
libpg_query/include/pg_query.h
libpg_query/linux
libpg_query/linux/libpg_query.a
libpg_query/linux/.gitkeep
libpg_query/windows
libpg_query/windows/.gitkeep
My process for managing this was
- I would build it on mac (outputs
osx/libpg_query.a) - run docker, mount volume to same output dir, build on linux (outputs
linux/libpg_query.a) - Finally,
npm publishafter bothlibpg_query.afiles are built in the outputlibpg_query/folder
So my guess is, which is a wild guess since I don't use windows, that the build would stick the new file (.lib or other) in the libpg_query/windows folder, and it would hopefully "just work" for windows users
Perhaps if we do this with a CI, my question would be — is there a way to build all three operating systems somehow? My process was doing all three builds then publish. Not sure how to map this properly, but I'm sure we can figure it out!
Having the (shared) binaries compiled upstream would be great for us.
I am currently doing a manual cross compilation and persisting the objects to git: https://github.com/premium-minds/sonar-postgres-plugin/blob/master/generate_libpg_query.sh