Skip to content

Commit

Permalink
[ci] Deploy binaries for Linux ARMv6, ARMv7, and ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Jan 3, 2021
1 parent de8c3eb commit 90ab2ff
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 15 deletions.
61 changes: 48 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,56 @@
language: node_js
node_js:
- "12"
- "10"
- "14"
os:
- linux
- osx
jobs:
include:
- os: linux
node_js: 10
env:
- TEST=1
- os: linux
node_js: 12
env:
- TEST=1
- os: linux
node_js: 14
env:
- TEST=1
- BUILD_NAME=linux-x64
- os: osx
node_js: 10
env:
- TEST=1
- os: osx
node_js: 12
env:
- TEST=1
- os: osx
node_js: 14
env:
- TEST=1
- BUILD_NAME=darwin-x64
- os: linux
node_js: 14
env:
- BUILD_NAME=linux-arm
- BUILD_SCRIPT=prebuild-linux-arm
if: tag is present
- os: linux
node_js: 14
arch: arm64
env:
- BUILD_NAME=linux-arm64
if: tag is present
script:
- if [ -n "$TEST" ]; then npm run test; fi
before_deploy:
- ARCHIVE_NAME="${TRAVIS_TAG:-latest}-$TRAVIS_OS_NAME-$(uname -m).tar"
- npm run prebuild
- tar --create --verbose --file="$ARCHIVE_NAME" --directory "$TRAVIS_BUILD_DIR/prebuilds" .
- ARCHIVE_NAME="${TRAVIS_TAG:-latest}-$BUILD_NAME.tar"
- if [ -n "$BUILD_SCRIPT" ]; then npm run $BUILD_SCRIPT; else npm run prebuild; fi
- tar -cvf "$ARCHIVE_NAME" -C prebuilds .
deploy:
provider: releases
api_key:
token:
secure: FzxCOALZjPUUCE0pdV6xoeUwcpUG92A6cgeZjUrU8iSsneCLSBfj3i1Zpsz+1A8pPCy4FmWRSqCxkEwMVluYXsUpqT54nvX0yQZHeXTDnVYg1EIvEuKgkysEVUQJ6VplTilE6lrRWYEkOOoQPeIEe4kW8EyGzpV9zeHrpdYsdc0=
file: "$ARCHIVE_NAME"
file: $ARCHIVE_NAME
skip_cleanup: true
on:
tags: true
node: "14"
condition: -n "$BUILD_NAME"
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"install": "node-gyp-build",
"prebuild": "prebuildify --napi",
"prebuild": "prebuildify --napi --strip",
"prebuild-linux-arm": "prebuildify-cross -i linux-armv6 -i linux-armv7 --napi --strip",
"test": "mocha"
},
"repository": {
Expand All @@ -26,6 +27,8 @@
},
"devDependencies": {
"mocha": "^8.0.1",
"prebuildify": "^4.0.0"
"node-gyp": "^7.1.2",
"prebuildify": "^4.0.0",
"prebuildify-cross": "^4.0.0"
}
}

0 comments on commit 90ab2ff

Please sign in to comment.