platform:
  - x86
  - x64
environment:
  matrix:
    - nodejs_version: '4'
    - nodejs_version: '5'
    - nodejs_version: '6'
    - nodejs_version: '7'
install:
  - ps: Install-Product node $env:nodejs_version $env:Platform
  - node --version && npm --version
  - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-http-proxy.ps1'))
  - IF DEFINED APPVEYOR_HTTP_PROXY_IP npm config set proxy http://%APPVEYOR_HTTP_PROXY_IP%:%APPVEYOR_HTTP_PROXY_PORT%
  - IF DEFINED APPVEYOR_HTTP_PROXY_IP npm config set https-proxy
  - npm config set -g msvs_version 2015
  - mkdir c:\yasm
  - set PATH=%APPDATA%\npm;c:\yasm;%PATH%
  - set CI=true
  - if "%PLATFORM%" == "x64" curl -o "c:\yasm\yasm.exe" http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe
  - if "%PLATFORM%" == "x86" curl -o "c:\yasm\yasm.exe" http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe
  - yasm --version
  - git submodule update --init
  - if "%PLATFORM%" == "x64" npm config set python C:\Python27-x64\python.exe
  - if "%PLATFORM%" == "x86" npm config set python C:\Python27\python.exe
  - if "%PLATFORM%" == "x86" if "%NODEJS_VERSION%" == "4" npm config set -g cafile=package.json
  - if "%PLATFORM%" == "x86" if "%NODEJS_VERSION%" == "4" npm config set -g strict-ssl=false
  - npm install
  - npm run prebuilt-bindings -- clean build pack
matrix:
  fast_finish: true
build: off
clone_depth: 1
