Skip to content

Commit

Permalink
Prebuild support (#19)
Browse files Browse the repository at this point in the history
* Modify .travis.yml and appveyor.yml to support prebuild

* Add custom install script to support prebuilt binaries via prebuild-install

* Move prebuild/upload to CI deploy stage

* Remove explicit test script in CI configs
  • Loading branch information
wingrunr21 authored and Max Brunsfeld committed Jul 21, 2018
1 parent db7fdee commit cdaa1fb
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@ language: node_js
node_js:
- "node"

os:
- linux
- osx

before_install:
- git submodule update --init --recursive

branches:
only:
- master
- /^v.*$/

deploy:
provider: script
script: npm run prebuild && npm run prebuild:upload -u ${PREBUILD_UPLOAD}
skip_cleanup: true
on:
all_branches: true
tags: true
5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
environment:
nodejs_version: "6"
nodejs_version: "10"

platform:
- x64
Expand All @@ -15,3 +15,6 @@ build: off
branches:
only:
- master
- /^v.*$/

deploy_script: IF "%APPVEYOR_REPO_TAG%" == "true" (npm run prebuild && npm run prebuild:upload -u %PREBUILD_UPLOAD%)
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
"main": "index.js",
"types": "tree-sitter.d.ts",
"dependencies": {
"nan": "^2.10.0"
"nan": "^2.10.0",
"prebuild-install": "^5.0.0"
},
"devDependencies": {
"prebuild": "^7.6.0"
},
"scripts": {
"install": "prebuild-install || node-gyp rebuild",
"prebuild": "prebuild --all --strip --verbose",
"prebuild:upload": "prebuild --upload-all",
"test": "echo 'node-tree-sitter'"
}
}

0 comments on commit cdaa1fb

Please sign in to comment.