steamworks4j icon indicating copy to clipboard operation
steamworks4j copied to clipboard

Created Github Action for automating generation of prebuilt libraries.

Open Retzinsky opened this issue 2 years ago • 3 comments

Github Actions to automate creation of prebuilt libraries. The action triggers on any change to the source of java-wrapper or server. First job runs JNICodeGenerator to generate the C++ sources. Next, three jobs in parallel to build on the respective platforms. Last job creates a pull request to merge the new prebuilt libraries back into the project. Runs as-is, no changes to project setup required - it's essentially just the build instructions page in Action form using the existing build-natives scripts.

I added a couple of extra functions to my personal build (namely requestUserStats() and getUserStats()) and verified them as functional using this process in my own game, on Windows at least.

There's probably more fun stuff that could be added, perhaps caching of intermediate products etc but it only takes a couple of minutes to run as it is. Sure beats doing everything by hand!

Retzinsky avatar Nov 09 '23 16:11 Retzinsky

I've added build actions myself a while back, but kept them in a separate and private repository, fetching steamworks4j as a submodule. I just wasn't sure about sharing binaries (premake) and Steamworks SDK files in a public repository.

code-disaster avatar Feb 20 '24 17:02 code-disaster

I've added build actions myself a while back, but kept them in a separate and private repository, fetching steamworks4j as a submodule. I just wasn't sure about sharing binaries (premake) and Steamworks SDK files in a public repository.

What's the issue with premake exactly? The premake used in this action is either installed with apt-get in the case of the linux build or pulled from premake's own repository in the case of windows/osx. Forgive me if I'm ignorant of something here, this isn't my area of expertise by any means.

As for the SDK I was definitely concerned about that too, but it turns out the guy who maintains Steamworks.NET already uploaded the whole thing publicly so I just pull that.

Retzinsky avatar Feb 20 '24 20:02 Retzinsky

Oh, nothing wrong with premake. Just personal preferences. And I didn't know there's a GH actions recipe to get that one, too. :)

code-disaster avatar Feb 21 '24 16:02 code-disaster