2016-07-04 17:46:38 -04:00
|
|
|
# version format
|
|
|
|
version: "{build}"
|
|
|
|
|
2015-10-16 14:26:01 -04:00
|
|
|
# Operating system (build VM template)
|
2016-07-04 17:46:38 -04:00
|
|
|
os: Windows Server 2012 R2
|
2016-02-10 19:40:09 -05:00
|
|
|
|
2016-07-04 17:46:38 -04:00
|
|
|
# Platform.
|
2016-02-10 19:40:09 -05:00
|
|
|
platform: x64
|
2015-10-16 14:26:01 -04:00
|
|
|
|
|
|
|
clone_folder: c:\gopath\src\github.com\minio\minio
|
|
|
|
|
2016-09-11 00:05:00 -04:00
|
|
|
# Environment variables
|
2015-10-16 14:26:01 -04:00
|
|
|
environment:
|
|
|
|
GOPATH: c:\gopath
|
|
|
|
|
|
|
|
# scripts that run after cloning repository
|
|
|
|
install:
|
|
|
|
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
|
|
|
|
- go version
|
|
|
|
- go env
|
2016-09-11 00:05:00 -04:00
|
|
|
- python --version
|
2015-10-16 14:26:01 -04:00
|
|
|
|
2016-09-11 00:05:00 -04:00
|
|
|
# To run your custom scripts instead of automatic MSBuild
|
2015-10-16 14:26:01 -04:00
|
|
|
build_script:
|
2016-09-11 00:05:00 -04:00
|
|
|
# Compile
|
|
|
|
- appveyor AddCompilationMessage "Starting Compile"
|
|
|
|
- cd c:\gopath\src\github.com\minio\minio
|
2015-11-08 05:56:19 -05:00
|
|
|
- go run buildscripts/gen-ldflags.go > temp.txt
|
|
|
|
- set /p BUILD_LDFLAGS=<temp.txt
|
|
|
|
- go build -ldflags="%BUILD_LDFLAGS%" -o %GOPATH%\bin\minio.exe
|
2016-09-11 00:05:00 -04:00
|
|
|
- appveyor AddCompilationMessage "Compile Success"
|
2015-10-16 14:26:01 -04:00
|
|
|
|
2016-09-11 00:05:00 -04:00
|
|
|
# To run your custom scripts instead of automatic tests
|
|
|
|
test_script:
|
|
|
|
# Unit tests
|
|
|
|
- ps: Add-AppveyorTest "Unit Tests" -Outcome Running
|
|
|
|
- mkdir build\coverage
|
2017-02-07 15:51:43 -05:00
|
|
|
- go test -timeout 20m -v -race github.com/minio/minio/cmd...
|
2017-01-27 15:31:02 -05:00
|
|
|
- go test -v -race github.com/minio/minio/pkg...
|
2017-02-07 15:51:43 -05:00
|
|
|
- go test -timeout 15m -coverprofile=build\coverage\coverage.txt -covermode=atomic github.com/minio/minio/cmd
|
2016-09-11 00:05:00 -04:00
|
|
|
- ps: Update-AppveyorTest "Unit Tests" -Outcome Passed
|
2016-08-04 19:48:50 -04:00
|
|
|
|
2016-09-11 00:05:00 -04:00
|
|
|
after_test:
|
|
|
|
- go tool cover -html=build\coverage\coverage.txt -o build\coverage\coverage.html
|
|
|
|
- ps: Push-AppveyorArtifact build\coverage\coverage.txt
|
|
|
|
- ps: Push-AppveyorArtifact build\coverage\coverage.html
|
|
|
|
# Upload coverage report.
|
|
|
|
- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
|
|
|
|
- pip install codecov
|
|
|
|
- codecov -X gcov -f "build\coverage\coverage.txt"
|
2015-10-16 14:26:01 -04:00
|
|
|
|
|
|
|
# to disable deployment
|
|
|
|
deploy: off
|