node-lz4 icon indicating copy to clipboard operation
node-lz4 copied to clipboard

Adding the ability to set up Automated Builds

Open zeroshade opened this issue 7 years ago • 2 comments

We built a module that depends on this lz4 module, but due to the utilities used by our consumers several do not easily have access to install windows-build-tools and build the package themselves locally. As a result, it makes more sense to publish pre-built binaries (as referred to in #67, I work with Mike who posted that issue).

In here I've added an appveyor.yml file which can be used to set up an appveyor job that pre-builds windows versions of the library, and set up the package.json to utilize node-pre-gyp to check and download assets from releases in github.

I've also updated the usage of the lz4 library to fix warnings of deprecated functions, and updated a couple of the dependencies. In my testing this works and the resulting tar.gz file is able to be downloaded and installed by node-pre-gyp. In order to use this, an appveyor.yml project would need to be created and connected to this repo, along with putting a github token (encrypted via appveyor similar to the way travis works) into the yml file in order to allow it to deploy and publish the binaries. Would these be things you'd be willing to do after merging this?

I've also condensed the compiled binary into a single lz4.node file since that was easier for specifying the artifacts and telling node-pre-gyp how to package things.

zeroshade avatar Oct 04 '18 19:10 zeroshade

Hello,

I need to look at this as I am not familiar with appveyor. I do agree though that this would be very useful. This may take a bit of time on my side as this is a hobby project.

Thanks.

pierrec avatar Oct 12 '18 15:10 pierrec

I'd also like to see support for prebuilt binaries in lz4. However, I don't think appveyor is needed either. I believe the standard practice for doing prebuilt binaries for Node packages is to use https://www.npmjs.com/package/prebuild-install (for downloading the binaries when a user installs)+ https://www.npmjs.com/package/prebuild (for creating the binaries and uploading them). Here is an example of how I added it another package: https://github.com/Venemo/node-lmdb/pull/148/files

kriszyp avatar May 16 '19 18:05 kriszyp