shibd opened a new pull request, #235:
URL: https://github.com/apache/pulsar-client-node/pull/235

   ### Motivation
   
   Currently, users using the `node js client` must first install the `C++ 
client`. And when the user executes `npm install`, it also needs to be 
compiled. This is not user-friendly.
   
   This PR is to provide pre-built packages for all the supported environments, 
using [GYP]() and rebuild. The pre-built package is then uploaded to [`Github 
Release`](https://github.com/shibd/pulsar-client-node/releases/tag/v1.7.0-rc.10),
 and when the user installs the client, the system version is matched and the 
pre-built package is downloaded.
   
   Currently tested `linux_x86` and `mac_x86`. I've built it in my [fork 
repository](https://github.com/shibd/pulsar-client-node/releases/tag/v1.7.0-rc.10)
 and can install it directly using the following command (without first 
installing the C++ client).
   
   ```
   npm intall shibaodi-pulsar-client
   ```
   
   ### Modifications
   
   #### New Github workflows
   
   - When trigger release: 
      1. Build the binary C++ static library first(use new c++ client 3.0 
source).
      2. And use [node-pre-gyp](https://github.com/mapbox/node-pre-gyp) 
pre-built `napi` packages.
      3. Use 
[node-pre-gyp-github](https://github.com/bchr02/node-pre-gyp-github) publish 
this package to `GitHub Release`.
   - When trigger unit test(use ubuntu GitHub runner):
      1. Install c++ lib(use new c++ client 3.0 version).
      2. Use this c++ lib build `napi`.
      3. Use pulsar image start broker(use pulsar latest).
      5. Run the unit test.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. Please attach the local 
preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR 
description, or else your PR might not get merged. -->
   - [x] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### TODO
   - [ ] Add pre-build windows binary package.
   - [ ] Change user docs.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to