serialport / node-serialport

Access serial ports with JavaScript. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!
https://serialport.io
MIT License
5.78k stars 1.01k forks source link

Prebuild for more environments #2292

Open GazHank opened 3 years ago

GazHank commented 3 years ago

💥 Proposal

What feature you'd like to see

Expand the number of prebuild environments, and increase compatability. (Perhaps using docker images rather than the GitHub machines directly, giving greater control of the build environment).

Suggested environments:

Motivation

At present it is necessary to build from source for several platforms, and in the case of Linux the environment is automatically upgraded by Github as part of their regular maintennance, therefore compatibility can vary from version to version with little prior notice. See https://github.com/serialport/node-serialport/issues/2266

Pitch

Many of the support requests relate to issues with the build process, which should be reduced if prebuilt binaries were available for these platforms.

GazHank commented 3 years ago

Prebuild for ARM has also been requested before: https://github.com/serialport/node-serialport/issues/2198

Prebuild for Apple M1 previously raised in https://github.com/serialport/node-serialport/issues/2243

GazHank commented 3 years ago

For ARM, my hypothesis (perhaps flawed) is that we could use a docker image such as those available from dockcross to build for ARM using the Linux x86_64 machine on Github actions.

I'm not sure if this docker based approach is the best solution to improving Linux compatability across distributions, or if we could achieve the same results by just configuring the github actions to use Ubuntu1804 rather than latest?

reconbot commented 3 years ago

I've tried the docker approach for arm but this was pre-actions and it was too difficult for me to figure out. I do believe it's the way to go!

thegecko commented 2 years ago

In node-usb we switched to prebuildify and prebuildify-cross on GH Actions to gain the broader architecture support.

Julusian commented 1 year ago

In a couple of projects, I have started using a matrix in github actions to build for all desired platforms. Im pretty happy with how it works there https://github.com/Julusian/node-freetype2/blob/master/.github/workflows/node.yaml. Similar principle to prebuildify-cross, but I feel like I have more control over the process

Let me know if you want a PR to do the same here or for node-usb, I found it pretty easy to copy to other repos

thegecko commented 1 year ago

ooh neat!