mirror of
https://github.com/hanzoai/bufferutil.git
synced 2026-09-24 16:57:30 +00:00
[ci] Use GitHub Actions
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
node:
|
||||
- 10
|
||||
- 12
|
||||
- 14
|
||||
os:
|
||||
- macOS-latest
|
||||
- ubuntu-16.04
|
||||
- windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
- run: npm run prebuild
|
||||
if: matrix.node == 14 && startsWith(github.ref, 'refs/tags/')
|
||||
- run: npm run prebuild-ia32
|
||||
if:
|
||||
matrix.node == 14 && matrix.os == 'windows-latest' &&
|
||||
startsWith(github.ref, 'refs/tags/')
|
||||
- run: npm run prebuild-linux-arm
|
||||
if:
|
||||
matrix.node == 14 && matrix.os == 'ubuntu-16.04' &&
|
||||
startsWith(github.ref, 'refs/tags/')
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: matrix.node == 14 && startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
name: ${{ matrix.os }}
|
||||
path: prebuilds
|
||||
release:
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: test
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: prebuilds
|
||||
- run: echo ::set-output name=version::$(git describe --tags)
|
||||
id: get_version
|
||||
- run:
|
||||
tar -cvf "${{ steps.get_version.outputs.version }}-darwin-x64.tar" -C
|
||||
"prebuilds/macOS-latest" .
|
||||
- run:
|
||||
tar -cvf "${{ steps.get_version.outputs.version }}-linux-arm.tar" -C
|
||||
"prebuilds/ubuntu-16.04" linux-arm
|
||||
- run:
|
||||
tar -cvf "${{ steps.get_version.outputs.version }}-linux-arm64.tar" -C
|
||||
"prebuilds/ubuntu-16.04" linux-arm64
|
||||
- run:
|
||||
tar -cvf "${{ steps.get_version.outputs.version }}-linux-x64.tar" -C
|
||||
"prebuilds/ubuntu-16.04" linux-x64
|
||||
- run:
|
||||
tar -cvf "${{ steps.get_version.outputs.version }}-win32-ia32.tar" -C
|
||||
"prebuilds/windows-latest" win32-ia32
|
||||
- run:
|
||||
tar -cvf "${{ steps.get_version.outputs.version }}-win32-x64.tar" -C
|
||||
"prebuilds/windows-latest" win32-x64
|
||||
- uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: ${{ steps.get_version.outputs.version }}-*.tar
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
-66
@@ -1,66 +0,0 @@
|
||||
language: node_js
|
||||
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: 10
|
||||
arch: arm64
|
||||
env:
|
||||
- TEST=1
|
||||
- os: linux
|
||||
node_js: 12
|
||||
arch: arm64
|
||||
env:
|
||||
- TEST=1
|
||||
- os: linux
|
||||
node_js: 14
|
||||
arch: arm64
|
||||
env:
|
||||
- TEST=1
|
||||
- BUILD_NAME=linux-arm64
|
||||
- os: linux
|
||||
node_js: 14
|
||||
env:
|
||||
- BUILD_NAME=linux-arm
|
||||
- BUILD_SCRIPT=prebuild-linux-arm
|
||||
if: tag is present
|
||||
script:
|
||||
- if [ -n "$TEST" ]; then npm run test; fi
|
||||
before_deploy:
|
||||
- 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
|
||||
token:
|
||||
secure: UDF88rp7h735Yi37eAN3voHr5wtkuu1LQPj/8DqkAEBCPW6HSQS0jBVHUFBPIAnLNMzCs94/o3/beujc+x1npjPgFcG82oSTazgMy2SSETUHAYTfsffmlzCtuteadvoLheLF8/D6H+DOOnTrrV3B5DHXscfBTSiPBaUWyC3oKrQ=
|
||||
file: $ARCHIVE_NAME
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
condition: -n "$BUILD_NAME"
|
||||
@@ -1,8 +1,8 @@
|
||||
# bufferutil
|
||||
|
||||
[](https://www.npmjs.com/package/bufferutil)
|
||||
[](https://travis-ci.com/websockets/bufferutil)
|
||||
[](https://ci.appveyor.com/project/lpinca/bufferutil)
|
||||
[](https://github.com/websockets/bufferutil/actions?query=workflow%3ACI+branch%3Amaster)
|
||||
[](https://ci.appveyor.com/project/lpinca/bufferutil)
|
||||
|
||||
`bufferutil` is what makes `ws` fast. It provides some utilities to efficiently
|
||||
perform some operations such as masking and unmasking the data payload of
|
||||
|
||||
+3
-18
@@ -2,12 +2,11 @@ build: off
|
||||
configuration: Release
|
||||
environment:
|
||||
matrix:
|
||||
- nodejs_version: "14"
|
||||
- nodejs_version: "12"
|
||||
- nodejs_version: "10"
|
||||
- nodejs_version: '14'
|
||||
- nodejs_version: '12'
|
||||
- nodejs_version: '10'
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
matrix:
|
||||
fast_finish: true
|
||||
install:
|
||||
@@ -17,17 +16,3 @@ test_script:
|
||||
- node --version
|
||||
- npm --version
|
||||
- npm test
|
||||
after_test:
|
||||
- ps: If ($env:nodejs_version -eq "14") { npm run prebuild }
|
||||
- ps: $env:ARTIFACT_NAME_PREFIX = if (Test-Path env:APPVEYOR_REPO_TAG_NAME) { $env:APPVEYOR_REPO_TAG_NAME } else { 'latest' }
|
||||
artifacts:
|
||||
- path: prebuilds
|
||||
name: $(ARTIFACT_NAME_PREFIX)-win-$(PLATFORM)
|
||||
deploy:
|
||||
- provider: GitHub
|
||||
artifact: /.*\.zip/
|
||||
auth_token:
|
||||
secure: hU+EdxPa5CzNrTpFfcx3DoA8ja+xfRq56JD0sEpt5f0ctd3Az8WSI9h+MgRXjlms
|
||||
on:
|
||||
appveyor_repo_tag: true
|
||||
nodejs_version: "14"
|
||||
|
||||
+2
-1
@@ -6,7 +6,8 @@
|
||||
"scripts": {
|
||||
"install": "node-gyp-build",
|
||||
"prebuild": "prebuildify --napi --strip",
|
||||
"prebuild-linux-arm": "prebuildify-cross -i linux-armv6 -i linux-armv7 --napi --strip",
|
||||
"prebuild-ia32": "prebuildify --arch=ia32 --napi --strip",
|
||||
"prebuild-linux-arm": "prebuildify-cross -i linux-armv6 -i linux-armv7 -i linux-arm64 --napi --strip",
|
||||
"test": "mocha"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user