# http://www.appveyor.com/docs/appveyor-yml


environment:
  AWS_ACCESS_KEY_ID:
    secure: GOBrUyHVMfZSrmsS4I63fC+E3qploEcIuQc/ofuTK5U=

  AWS_SECRET_ACCESS_KEY:
    secure: QBSKf6NBLUrjkk7ft4H8LyxATdcJ8PmQObKqDgl1qQmT0ju7r3l/D6t8MN2joQqk

  matrix:
    - nodejs_version: 10
    - nodejs_version: 11
    - nodejs_version: 12
    - nodejs_version: 13
    - nodejs_version: 14
    - nodejs_version: 15
    - nodejs_version: 16

platform:
    - x64
    - x86

shallow_clone: true

install:
  - ps: Install-Product node $env:nodejs_version $env:Platform
  # npm 6.x is the latest version bundled with Node LTS 14.x
  - npm install -g npm@6
  - ps: $env:path = $env:appdata + "\npm;" + $env:path

  # work around an issue with node-gyp v3.3.1 and node 4x
  # package.json has no certificates in it so we're cool
  # https://github.com/nodejs/node-gyp/issues/921
  - ps: npm config set -g cafile=package.json | Write-Host;
  - ps: npm config set -g strict-ssl=false | Write-Host;

  # Add local node-pre-gyp dir to path
  - SET PATH=node_modules\.bin;%PATH%
  # Use 64-bit Python if platform is 64-bit
  - IF "%platform%" == "x64" SET "PATH=C:\Python27-x64;%PATH%"
  - IF "%platform%" == "x64" CALL "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" amd64
  - IF "%platform%" == "x86" CALL "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
  # Print some information
  - node -v
  - npm -v
  # Build
  - npm install --build-from-source --msvs_version=2015
  - npm test
  - npm ls
  - SET PATH=node_modules\.bin;%PATH%
  - ps: >-
      if ($env:APPVEYOR_REPO_COMMIT_MESSAGE.ToLower().Contains("[publish binary]")) {
        cmd /c 'node_modules\.bin\node-pre-gyp --msvs_version=2015 package unpublish publish info 2>&1'
      }



build: off
test: off
deploy: off
