Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supply pre-compiled binaries #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cognitivim
Copy link

resolved #10

note: before publish set NODE_PRE_GYP_GITHUB_TOKEN environment variable (https://github.com/bchr02/node-pre-gyp-github)

@cognitivim cognitivim force-pushed the master branch 4 times, most recently from b3731bb to 84daae2 Compare December 18, 2018 19:00
@cognitivim
Copy link
Author

cognitivim commented Dec 18, 2018

hi @asfernandes, any ideas on how to fix this?

FAIL src/test/test.ts
  ● Test suite failed to run
    TypeError: require(...) is not a function
      18 | 
      19 | const bindingPath = binary.find(path.resolve(path.join(__dirname, '../../package.json')));
    > 20 | const native = require(bindingPath)('addon'); // require('bindings')('addon')
         |                                    ^
      21 | 
      22 | export const getMaster: (library: string) => Master = native.getMaster;
      23 | export const disposeMaster: (master: Master) => boolean = native.disposeMaster;
      at Object.<anonymous> (src/lib/index.ts:20:36)
      at Object.<anonymous> (src/test/test.ts:4:1)

source: https://github.com/punkusha/node-firebird-drivers/blob/84daae2dababd1a6de8989b24ae3720587f80750/packages/node-firebird-native-api/src/lib/index.ts#L20

@cognitivim cognitivim force-pushed the master branch 2 times, most recently from 64b4c1d to aef6d23 Compare December 18, 2018 19:58
@sywka
Copy link
Contributor

sywka commented Dec 19, 2018

@punkusha
I think you don't need ('addon') at all

@cognitivim
Copy link
Author

cognitivim commented Dec 19, 2018

I think you don't need ('addon') at all

@sywka, thx!

"gyp:configure": "node-pre-gyp configure",
"lint": "tslint --project .",
"pre-gyp:prebuild": "yarn run gyp:clean && node-pre-gyp configure",
"pre-gyp:publish": "yarn run pre-gyp:publish-darwin && yarn run pre-gyp:publish-linux && yarn run pre-gyp:publish-linux-ia32 && yarn run pre-gyp:publish-win32 && yarn run pre-gyp:publish-win32-ia32",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@punkusha how can pre-gyp:publish work? How it will build multiple architectures in a single run?

Copy link
Author

@cognitivim cognitivim Dec 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node-pre-gyp doesn't support parallel builds. so, we can publish only 1 binary at once.
node-pre-gyp-github publish --release publish binary to github release, if github release is already created then update it.

run pre-gyp:publish to build and publish all the binaries (result: https://github.com/punkusha/node-firebird-drivers/releases/tag/node-firebird-native-api%400.1.1)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that command calls the code to build every arch. How can, for example, when working in Linux the Windows build will work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supply pre-compiled binaries
3 participants