Skip to content

Commit

Permalink
feat: github actions for ci (#381)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
trankin authored Jun 11, 2020
1 parent d87b204 commit 3a9954a
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Linux Builds

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [0.12, 4.x, 6.x, 8.x, 10.x, 11.x, 12.x]

steps:
- uses: actions/checkout@v2
- name: Install ubuntu-toolchain-r/test
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test
- name: Install libudev-dev
run: sudo apt install libudev-dev
- name: Build open-zwave-latest
run: |
wget https://github.com/OpenZWave/open-zwave/archive/master.zip
unzip master.zip
cd open-zwave-master
sudo make install
sudo ldconfig /usr/local/lib /usr/local/lib64
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g node-gyp
- run: npm install
30 changes: 30 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Windows Builds

on: [push, pull_request]

jobs:
build:

runs-on: ${{matrix.os}}

strategy:
matrix:
os: [windows-2016, windows-latest]
node-version: [8.x, 10.x, 11.x, 12.x]
exclude:
- os: windows-2016
node-version: 12.x
- os: windows-latest
node-version: 8.x
- os: windows-latest
node-version: 10.x
- os: windows-latest
node-version: 11.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ node-openzwave-shared
=====================
[Linux![Linux Build Status](https://travis-ci.org/OpenZWave/node-openzwave-shared.svg?branch=master)](https://travis-ci.org/OpenZWave/node-openzwave-shared)
[Windows![Windows Build status](https://ci.appveyor.com/api/projects/status/txg360huomtpgc8o?svg=true)](https://ci.appveyor.com/project/ekarak/node-openzwave-shared)

![Linux Build status](https://github.com/OpenZWave/node-openzwave-shared/workflows/Linux%20Builds/badge.svg)

![Windows Build status](https://github.com/OpenZWave/node-openzwave-shared/workflows/Windows%20Builds/badge.svg)

[![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)
[![Google group](http://www.google.com/images/icons/product/groups-32.png)](https://groups.google.com/d/forum/node-openzwave-shared)

Expand Down
2 changes: 1 addition & 1 deletion lib/install-ozw.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ module.exports = function(opts) {

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

0 comments on commit 3a9954a

Please sign in to comment.