From 07826522a1bfac1b76d26cb1ebf9d7344186021e Mon Sep 17 00:00:00 2001 From: Tom Rankin Date: Fri, 5 Jun 2020 16:25:04 -0500 Subject: [PATCH 1/5] 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. --- .github/workflows/linux.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/windows.yml | 25 +++++++++++++++++++++++++ README.md | 5 +++++ 3 files changed, 61 insertions(+) create mode 100644 .github/workflows/linux.yml create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 00000000..97f9ccfe --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,31 @@ +name: Linux Builds + +on: [push] + +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 && cd .. + - 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 + - run: npm run build --if-present + - run: npm test + env: + CI: true diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000..a4b6d9ba --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,25 @@ +name: Windows Builds + +on: [push] + +jobs: + build: + + runs-on: windows-latest + + strategy: + matrix: + node-version: [12.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 -g node-gyp + - run: npm install + - run: npm run build --if-present + - run: npm test + env: + CI: true diff --git a/README.md b/README.md index 3de0973f..abe4bb00 100644 --- a/README.md +++ b/README.md @@ -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) From d83f39cbf161a2f3a37c20ed5879a089a9c045ba Mon Sep 17 00:00:00 2001 From: Tom Rankin Date: Mon, 8 Jun 2020 08:54:10 -0500 Subject: [PATCH 2/5] Adding pull_request trigger and reformatting the run action for linux to be more readable. --- .github/workflows/linux.yml | 12 +++++++++--- .github/workflows/windows.yml | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 97f9ccfe..3363eee7 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,6 +1,6 @@ name: Linux Builds -on: [push] +on: [push, pull_request] jobs: build: @@ -18,7 +18,13 @@ jobs: - 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 && cd .. + 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 + cd .. - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: @@ -28,4 +34,4 @@ jobs: - run: npm run build --if-present - run: npm test env: - CI: true + CI: true \ No newline at end of file diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index a4b6d9ba..688ff85e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,6 +1,6 @@ name: Windows Builds -on: [push] +on: [push, pull_request] jobs: build: From ddfdd64aaeaf3bc1756e6852e68184aebf486967 Mon Sep 17 00:00:00 2001 From: Tom Rankin Date: Mon, 8 Jun 2020 10:07:46 -0500 Subject: [PATCH 3/5] Removing unneeded commands and cleaning up --- .github/workflows/linux.yml | 5 ----- .github/workflows/windows.yml | 6 +----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3363eee7..30849ef9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -24,14 +24,9 @@ jobs: cd open-zwave-master sudo make install sudo ldconfig /usr/local/lib /usr/local/lib64 - cd .. - 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 - - run: npm run build --if-present - - run: npm test - env: - CI: true \ No newline at end of file diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 688ff85e..747d5a85 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -17,9 +17,5 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run: npm install -g node-gyp - run: npm install - - run: npm run build --if-present - - run: npm test - env: - CI: true + From a0c2c65edd4a417afac765d5f35581806305e999 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 10 Jun 2020 16:37:41 -0500 Subject: [PATCH 4/5] Update windows.yml Updating to use windows-2016 instead of windows-latest to build for node js 10.x and 11.x --- .github/workflows/windows.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 747d5a85..22f81951 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -5,12 +5,19 @@ on: [push, pull_request] jobs: build: - runs-on: windows-latest + runs-on: ${{matrix.os}} strategy: matrix: - node-version: [12.x] - + os: [windows-2016, windows-latest] + node-version: [10.x, 11.x, 12.x] + exclude: + - os: windows-2016 + node-version: 12.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 }} From c7f3b25c945d21ef3248e7ec65694867dbcc4cd4 Mon Sep 17 00:00:00 2001 From: Tom Rankin Date: Wed, 10 Jun 2020 16:53:04 -0500 Subject: [PATCH 5/5] making changes so nodejs 8.x will build with github actions --- .github/workflows/windows.yml | 4 +++- lib/install-ozw.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 22f81951..fa4b9a58 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -10,10 +10,12 @@ jobs: strategy: matrix: os: [windows-2016, windows-latest] - node-version: [10.x, 11.x, 12.x] + 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 diff --git a/lib/install-ozw.js b/lib/install-ozw.js index c8d8b46d..5ee3dd84 100644 --- a/lib/install-ozw.js +++ b/lib/install-ozw.js @@ -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')();