version: '{build}'
os: Windows Server 2012 R2
clone_folder: c:\gopath\src\github.com\go-delve\delve
environment:
  GOPATH: C:\gopath
install:
  - ps: |
      # Install MinGW.
      if (-Not (Test-Path "C:\mingw64")) {
              $file = "x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z"
              $url  = "https://bintray.com/artifact/download/drewwells/generic/"
              $url += $file
              Invoke-WebRequest -UserAgent wget -Uri $url -OutFile $file
              &7z x -oC:\ $file > $null
      }
      # Install Procdump
      if (-Not (Test-Path "C:\procdump")) {
              mkdir c:\procdump
              Invoke-WebRequest -UserAgent wget -Uri https://download.sysinternals.com/files/Procdump.zip -OutFile C:\procdump\procdump.zip
              &7z x -oC:\procdump\ C:\procdump\procdump.zip > $null
      }
  - set PATH=c:\procdump;c:\mingw64\bin;%GOPATH%\bin;%PATH%
  - echo %PATH%
  - echo %GOPATH%
  - go version
  - go env
cache:
  - C:\mingw64
  - C:\procdump
build_script:
- mingw32-make install
test_script:
- mingw32-make test
