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

Binaries on GitHub Releases? #237

Open
karlhorky opened this issue Jan 25, 2024 · 3 comments
Open

Binaries on GitHub Releases? #237

karlhorky opened this issue Jan 25, 2024 · 3 comments

Comments

@karlhorky
Copy link

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:

Screenshot 2024-01-25 at 12 33 18

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:

@lfittl
Copy link
Member

lfittl commented Jan 25, 2024

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?

@pyramation
Copy link
Contributor

pyramation commented Jan 25, 2024

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

  1. I would build it on mac (outputs osx/libpg_query.a)
  2. run docker, mount volume to same output dir, build on linux (outputs linux/libpg_query.a)
  3. Finally, npm publish after both libpg_query.a files are built in the output libpg_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!

@froque
Copy link
Contributor

froque commented Jan 26, 2024

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

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

No branches or pull requests

4 participants