From 7e3ef206fb269366a4bb0ab42b47f9a76c23c8c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=BCsel?= Date: Sun, 28 Jan 2018 13:06:44 +0100 Subject: [PATCH 1/4] adds appveyor config --- appveyor.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..89c0565 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,44 @@ +# http://www.appveyor.com/docs/appveyor-yml + +# Don't actually build +build: off + +# Skip tag builds +skip_tags: true + +# Set build version format +version: "{build}" + +# Set up build environment +environment: + # Test against these versions of Node.js + matrix: + - nodejs_version: "9" + - nodejs_version: "8" + - nodejs_version: "7" + - nodejs_version: "6" + - nodejs_version: "5" + - nodejs_version: "4" + +# Build on both platforms +platform: + - x86 + - x64 + +# Install scripts (runs after repo cloning) +install: + # Get the latest version of $env:nodejs_version + - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform + # Update to latest npm + - npm -g install npm 2>&1>nul + - SET PATH=%APPDATA%\npm;%PATH% + # Output useful info for debugging + - node --version + - npm --version + # Install modules + - npm install + +# Post-install test scripts +test_script: + # Run module tests + - npm test From 40c5bdf2b65dd4425359b868439e9a877c810eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=BCsel?= Date: Sun, 28 Jan 2018 14:48:45 +0100 Subject: [PATCH 2/4] add badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e86853a..6fb4cb4 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ $ npm install -g prebuild ``` [![build status](http://img.shields.io/travis/prebuild/prebuild.svg?style=flat)](http://travis-ci.org/prebuild/prebuild) +[![Build status](https://ci.appveyor.com/api/projects/status/oy1kk4fpy51net0v/branch/master?svg=true)](https://ci.appveyor.com/project/mathiask88/prebuild) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) ## Features From 5f2cb1b143eaac75b27a67f3bc99db188e8cb48a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=BCsel?= Date: Sun, 28 Jan 2018 19:12:48 +0100 Subject: [PATCH 3/4] remove EOL node versions and use bundled npm version --- appveyor.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 89c0565..e72937c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,9 +15,7 @@ environment: matrix: - nodejs_version: "9" - nodejs_version: "8" - - nodejs_version: "7" - nodejs_version: "6" - - nodejs_version: "5" - nodejs_version: "4" # Build on both platforms @@ -29,9 +27,6 @@ platform: install: # Get the latest version of $env:nodejs_version - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform - # Update to latest npm - - npm -g install npm 2>&1>nul - - SET PATH=%APPDATA%\npm;%PATH% # Output useful info for debugging - node --version - npm --version From a9324ee0ccf02eca0c00b6b8cf17087eb3421af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=BCsel?= Date: Mon, 29 Jan 2018 02:56:58 +0100 Subject: [PATCH 4/4] fix weird node bug --- test/integration-test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/integration-test.js b/test/integration-test.js index a6674e5..b33da7a 100644 --- a/test/integration-test.js +++ b/test/integration-test.js @@ -10,6 +10,8 @@ test('can prebuild a native module for electron', function (t) { rm.sync(path.join(cwd, 'prebuilds')) var file = 'native-v1.0.0-electron-v50-' + process.platform + '-' + process.arch + '.tar.gz' var prebuild = path.join(cwd, 'prebuilds', file) + // A quick, temporary fix for a node.js bug (https://github.com/prebuild/prebuild/pull/208#issuecomment-361108755) + console.log() exec('npm run prebuild', { cwd: cwd }, function (error, stdout, stderr) { t.equal(error, null) t.equal(fs.existsSync(prebuild), true) @@ -21,6 +23,8 @@ test('can prebuild a native module for node-webkit', function (t) { rm.sync(path.join(cwd, 'prebuilds')) var file = 'native-v1.0.0-node-webkit-v59-' + process.platform + '-' + process.arch + '.tar.gz' var prebuild = path.join(cwd, 'prebuilds', file) + // A quick, temporary fix for a node.js bug (https://github.com/prebuild/prebuild/pull/208#issuecomment-361108755) + console.log() exec('npm run prebuild-node-webkit', { cwd: cwd }, function (error, stdout, stderr) { t.equal(error, null) t.equal(fs.existsSync(prebuild), true)