You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB

  1. # version format
  2. version: "{build}"
  3. # Operating system (build VM template)
  4. os: Windows Server 2012 R2
  5. # Platform.
  6. platform: x64
  7. clone_folder: c:\gopath\src\github.com\minio\minio
  8. # Environment variables
  9. environment:
  10. GOROOT: c:\go17
  11. GOPATH: c:\gopath
  12. # scripts that run after cloning repository
  13. install:
  14. - set PATH=%GOPATH%\bin;c:\go17\bin;%PATH%
  15. - go version
  16. - go env
  17. - python --version
  18. # To run your custom scripts instead of automatic MSBuild
  19. build_script:
  20. # Compile
  21. - appveyor AddCompilationMessage "Starting Compile"
  22. - cd c:\gopath\src\github.com\minio\minio
  23. - go run buildscripts/gen-ldflags.go > temp.txt
  24. - set /p BUILD_LDFLAGS=<temp.txt
  25. - go build -ldflags="%BUILD_LDFLAGS%" -o %GOPATH%\bin\minio.exe
  26. - appveyor AddCompilationMessage "Compile Success"
  27. # To run your custom scripts instead of automatic tests
  28. test_script:
  29. # Unit tests
  30. - ps: Add-AppveyorTest "Unit Tests" -Outcome Running
  31. - mkdir build\coverage
  32. - go test -timeout 17m -race github.com/minio/minio/cmd...
  33. - go test -race github.com/minio/minio/pkg...
  34. - go test -coverprofile=build\coverage\coverage.txt -covermode=atomic github.com/minio/minio/cmd
  35. - ps: Update-AppveyorTest "Unit Tests" -Outcome Passed
  36. after_test:
  37. - go tool cover -html=build\coverage\coverage.txt -o build\coverage\coverage.html
  38. - ps: Push-AppveyorArtifact build\coverage\coverage.txt
  39. - ps: Push-AppveyorArtifact build\coverage\coverage.html
  40. # Upload coverage report.
  41. - "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
  42. - pip install codecov
  43. - codecov -X gcov -f "build\coverage\coverage.txt"
  44. # to disable deployment
  45. deploy: off