RobLoach / node-raylib

Node.js bindings for Raylib
https://robloach.github.io/node-raylib/
Other
237 stars 20 forks source link

CI Pre-build and download #115

Open konsumer opened 2 years ago

konsumer commented 2 years ago

We could speed up install with CI builds for lots of targets, and download on install, or just include many with the npm module.

I think some good targets would be:

and then, maybe as secondary targets:

On any targets not covered, it should work the same as it does now, so it's really just a way to speed it up (and not require cmake/c tools/build-time) on most the common platforms.

konsumer commented 2 years ago

Looks like we already have some CI in place. I am going to do some local testing with act to see if I can improve it, and get it building for more targets, then work on the entry-point to prefer a pre-built from CI over cmake-built.

konsumer commented 2 years ago

I started work on this with a fancier build-matrix. I also merged test & build to optimize cacheing, and set it to run on every push/PR, so we have a nice test indicator & build to play with on every platform.

Screen Shot 2022-02-23 at 10 08 32 AM

remaining issues

RobLoach commented 2 years ago

That's awesome! Nicely done.

konsumer commented 2 years ago

I added a stub setup in tools/postinstall.js. It will load very fast if you have build/Release/node-raylib.node and download a tagged release if we have one (from CI) or build it, if not. It only installs build-tools if you actually need to build, so people on a supported platform will be able to use it, even if they don't have cmake/etc.