Skip to content

Commit

Permalink
Update prebuildify and node-gyp-build (#625)
Browse files Browse the repository at this point in the history
* Upgrade node-gyp-build from ~3.8.0 to ~4.1.0

* Upgrade prebuildify devDependency from prebuild/prebuildify#override-platform to ^3.0.0

* Skip npm scripts in Travis arm job

* Skip npm install in arm containers

* Add armv tag to arm prebuilds

* Add test-prebuild npm script

* Add alpine (musl) prebuild
  • Loading branch information
vweevers committed Apr 28, 2019
1 parent 5e497b7 commit a9ef6f4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ jobs:
- name: arm
os: linux
node_js: node
env: [BUILD_CMD=prebuild-arm, BUILD_GROUP=arm]
env: [BUILD_CMD=prebuild-arm, BUILD_GROUP=arm, NPM_CONFIG_IGNORE_SCRIPTS=1]
if: tag is present
- name: alpine
os: linux
node_js: node
env: [BUILD_CMD=prebuild-alpine, BUILD_GROUP=alpine, NPM_CONFIG_IGNORE_SCRIPTS=1]
if: tag is present

script:
Expand All @@ -42,7 +47,7 @@ after_success:

before_deploy:
- export ARCHIVE_NAME="${TRAVIS_TAG:-latest}-$BUILD_GROUP.tar.gz"
- npm run $BUILD_CMD
- NPM_CONFIG_IGNORE_SCRIPTS= npm run $BUILD_CMD
- file prebuilds/*/*
- tar -zcvf "$ARCHIVE_NAME" -C prebuilds .

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ $ git submodule update --init --recursive
2. Push to GitHub: `git push --follow-tags`
3. Wait for Travis and AppVeyor builds to complete
4. Download prebuilds into `./prebuilds`: `npm run download-prebuilds`
5. Optionally verify loading a prebuild: `rimraf build && npm t`
5. Optionally verify loading a prebuild: `npm run test-prebuild`
6. Optionally verify which files npm will include: `irish-pub`
7. Add changelog to the GitHub release
8. Finally: `npm publish`
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"test": "standard && nyc tape test/*-test.js",
"test-gc": "npx -n=--expose-gc tape test/{cleanup,iterator-gc,chained-batch-gc}*-test.js",
"test-electron": "electron test/electron.js",
"test-prebuild": "cross-env PREBUILDS_ONLY=1 npm t",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"rebuild": "node-gyp rebuild",
"prebuild": "prebuildify -t 8.14.0 --napi --strip",
Expand All @@ -17,20 +18,22 @@
"dependency-check": "dependency-check . test/*.js bench/*.js",
"prepublishOnly": "npm run dependency-check",
"prebuild-arm": "npm run prebuild-linux-armv7 && npm run prebuild-linux-arm64 && npm run prebuild-android-armv7 && npm run prebuild-android-arm64",
"prebuild-linux-armv7": "IMAGE=linux-armv7 ./scripts/cross-compile",
"prebuild-linux-arm64": "IMAGE=linux-arm64 ./scripts/cross-compile",
"prebuild-android-armv7": "IMAGE=android-armv7 ./scripts/cross-compile",
"prebuild-android-arm64": "IMAGE=android-arm64 ./scripts/cross-compile"
"prebuild-linux-armv7": "IMAGE=linux-armv7 ./scripts/cross-compile --tag-armv",
"prebuild-linux-arm64": "IMAGE=linux-arm64 ./scripts/cross-compile --tag-armv",
"prebuild-android-armv7": "IMAGE=android-armv7 ./scripts/cross-compile --tag-armv",
"prebuild-android-arm64": "IMAGE=android-arm64 ./scripts/cross-compile --tag-armv",
"prebuild-alpine": "IMAGE=alpine ./scripts/cross-compile --tag-libc"
},
"dependencies": {
"abstract-leveldown": "~6.0.3",
"fast-future": "~1.0.2",
"napi-macros": "~1.8.1",
"node-gyp-build": "~3.8.0"
"node-gyp-build": "~4.1.0"
},
"devDependencies": {
"async": "^2.0.1",
"coveralls": "^3.0.2",
"cross-env": "^5.2.0",
"delayed": "^1.0.1",
"dependency-check": "^3.3.0",
"du": "~0.1.0",
Expand All @@ -44,7 +47,7 @@
"node-gyp": "^4.0.0",
"nyc": "^14.0.0",
"optimist": "~0.6.1",
"prebuildify": "prebuild/prebuildify#override-platform",
"prebuildify": "^3.0.0",
"prebuildify-ci": "^1.0.4",
"readfiletree": "~0.0.1",
"rimraf": "^2.6.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/cross-compile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ DOCKER_USER="node"
if [[ "$TRAVIS" == "true" ]]; then DOCKER_USER="travis"; fi

exec docker run -u ${DOCKER_USER} --rm -v $(pwd):/app prebuild/${IMAGE} \
bash -c "npm i --ignore-scripts && npx prebuildify -t 8.14.0 --napi --strip"
npm run prebuild -- $@

0 comments on commit a9ef6f4

Please sign in to comment.