Skip to content

Commit

Permalink
Merge pull request #208 from prebuild/appveyor
Browse files Browse the repository at this point in the history
adds appveyor config
  • Loading branch information
ralphtheninja committed Jan 29, 2018
2 parents d820ab5 + a9324ee commit 2cee8c1
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions appveyor.yml
@@ -0,0 +1,39 @@
# 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: "6"
- 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
# Output useful info for debugging
- node --version
- npm --version
# Install modules
- npm install

# Post-install test scripts
test_script:
# Run module tests
- npm test
4 changes: 4 additions & 0 deletions test/integration-test.js
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 2cee8c1

Please sign in to comment.