version: "{build}"

# Source Config
clone_folder: c:\gopath\src\github.com\docker\docker-credential-helpers

# Build host

os: Windows Server 2012 R2

environment:
  GOPATH: c:\gopath
  CGO_ENABLED: 1
  GOVERSION: 1.6

init:
  - git config --global core.autocrlf input

# Build

install:
  # Install Go 1.6.
  - rmdir c:\go /s /q
  - appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.msi
  - msiexec /i go%GOVERSION%.windows-amd64.msi /q
  # Install MinGW.
  - ps: |
      $url = "https://bintray.com/artifact/download/drewwells/generic/x86_64-5.1.0-release-win32-seh-rt_v4-rev0.7z"
      $strFileName="C:\mingw64\bin\mingw32-make.exe"
      If (Test-Path $strFileName){
        Write-Host "Using cached mingw64"
      }Else{
        Write-Host "Fetching mingw64"
        Invoke-WebRequest -UserAgent wget -Uri $url -OutFile ming32-64.7z
        &7z x -oC:\ ming32-64.7z > $null
      }
  - set Path=c:\mingw64\bin;c:\go\bin;%Path%
  - go version
  - go env

build_script:
  - go vet ./wincred
  - go test -v github.com/docker/docker-credential-helpers/wincred

# Disable automatic tests
test: off

# Disable deployment
deploy: off

version: "{build}"

# Source Config
clone_folder: c:\gopath\src\github.com\docker\docker-credential-helpers

# Build host

environment:
    global:
      GOPATH: c:\gopath
      CGO_ENABLED: 1
      GOVERSION: 1.6
    matrix:
      - platform: x86
        GOARCH: 386
        MSYS2_BITS: 32
      - platform: x64
        GOARCH: amd64
        MSYS2_BITS: 64

init:
  - git config --global core.autocrlf input

# Build

install:
  # Install Go 1.6.
  - rmdir c:\go /s /q
  - appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-%GOARCH%.msi
  - msiexec /i go%GOVERSION%.windows-%GOARCH%.msi /q
  - set Path=c:\msys64\mingw%MSYS2_BITS%\bin;c:\go\bin;%Path%
  - go version
  - go env

build_script:
  - go vet ./wincred
  - go test -v github.com/docker/docker-credential-helpers/wincred

# Disable automatic tests
test: off

# Disable deployment
deploy: off

Add matrix to build in different windows platforms.
Add matrix to build in different windows platforms.

Signed-off-by: David Calavera <b9b0c8e7f90ecf337f6797c4d2e0f1dd0dbc0324@gmail.com>
