forked from noble/node-bluetooth-hci-socket
-
-
Notifications
You must be signed in to change notification settings - Fork 47
40 lines (38 loc) · 1.06 KB
/
nodepackage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Node.js package
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-2019]
node_version: [12, 14, 16, 18]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies
if: startsWith(runner.OS, 'windows') == false
run: |
sudo apt -qq update
sudo apt install -y libudev-dev
- name: Build Linux
if: startsWith(runner.OS, 'windows') == false
run: |
export PATH=./node_modules/.bin:${PATH}
npm install --build-from-source --node-gyp=$(which pangyp)
./node_modules/.bin/node-pre-gyp package
- name: Build Windows
if: startsWith(runner.OS, 'windows') == true
run: |
npm install --build-from-source
./node_modules/.bin/node-pre-gyp package
- name: Test
run: npm test