Skip to content

Commit 3a9954a

Browse files
authored
feat: github actions for ci (#381)
* Adding in Github Actions for CI. Linux seems fine, Windows was failing on node_js versions 8.x, 10.x and 11.x. I've removed those in this pull request as I'm not sure if the problem is on the github side or the build code in the repository. * Adding pull_request trigger and reformatting the run action for linux to be more readable. * Removing unneeded commands and cleaning up * Update windows.yml Updating to use windows-2016 instead of windows-latest to build for node js 10.x and 11.x * making changes so nodejs 8.x will build with github actions
1 parent d87b204 commit 3a9954a

File tree

4 files changed

+68
-1
lines changed

4 files changed

+68
-1
lines changed

.github/workflows/linux.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Linux Builds
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [0.12, 4.x, 6.x, 8.x, 10.x, 11.x, 12.x]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Install ubuntu-toolchain-r/test
17+
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test
18+
- name: Install libudev-dev
19+
run: sudo apt install libudev-dev
20+
- name: Build open-zwave-latest
21+
run: |
22+
wget https://github.com/OpenZWave/open-zwave/archive/master.zip
23+
unzip master.zip
24+
cd open-zwave-master
25+
sudo make install
26+
sudo ldconfig /usr/local/lib /usr/local/lib64
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
- run: npm install -g node-gyp
32+
- run: npm install

.github/workflows/windows.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Windows Builds
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ${{matrix.os}}
9+
10+
strategy:
11+
matrix:
12+
os: [windows-2016, windows-latest]
13+
node-version: [8.x, 10.x, 11.x, 12.x]
14+
exclude:
15+
- os: windows-2016
16+
node-version: 12.x
17+
- os: windows-latest
18+
node-version: 8.x
19+
- os: windows-latest
20+
node-version: 10.x
21+
- os: windows-latest
22+
node-version: 11.x
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
- run: npm install
30+

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ node-openzwave-shared
22
=====================
33
[Linux![Linux Build Status](https://travis-ci.org/OpenZWave/node-openzwave-shared.svg?branch=master)](https://travis-ci.org/OpenZWave/node-openzwave-shared)
44
[Windows![Windows Build status](https://ci.appveyor.com/api/projects/status/txg360huomtpgc8o?svg=true)](https://ci.appveyor.com/project/ekarak/node-openzwave-shared)
5+
6+
![Linux Build status](https://github.com/OpenZWave/node-openzwave-shared/workflows/Linux%20Builds/badge.svg)
7+
8+
![Windows Build status](https://github.com/OpenZWave/node-openzwave-shared/workflows/Windows%20Builds/badge.svg)
9+
510
[![Join the chat at https://gitter.im/OpenZWave/node-openzwave-shared](https://badges.gitter.im/OpenZWave/node-openzwave-shared.svg)](https://gitter.im/OpenZWave/node-openzwave-shared?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
611
[![Google group](http://www.google.com/images/icons/product/groups-32.png)](https://groups.google.com/d/forum/node-openzwave-shared)
712

lib/install-ozw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ module.exports = function(opts) {
202202

203203
process.chdir(tempPath);
204204
console.log('Installing dependencies to ' + tempPath);
205-
ChildProcess.execSync('npm install request unzipper node-gyp fs-extra');
205+
ChildProcess.execSync('npm install request unzipper node-gyp fs-extra@8.1.0');
206206
request = require(tempPath + '/node_modules/request');
207207
unzip = require(tempPath + '/node_modules/unzipper');
208208
gyp = require(tempPath + '/node_modules/node-gyp')();

0 commit comments

Comments
 (0)