2016-07-04 23:46:38 +02:00
|
|
|
# version format
|
|
|
|
version: "{build}"
|
|
|
|
|
2015-10-16 20:26:01 +02:00
|
|
|
# Operating system (build VM template)
|
2016-07-04 23:46:38 +02:00
|
|
|
os: Windows Server 2012 R2
|
2016-02-11 01:40:09 +01:00
|
|
|
|
2016-07-04 23:46:38 +02:00
|
|
|
# Platform.
|
2016-02-11 01:40:09 +01:00
|
|
|
platform: x64
|
2015-10-16 20:26:01 +02:00
|
|
|
|
|
|
|
clone_folder: c:\gopath\src\github.com\minio\minio
|
|
|
|
|
2016-09-11 06:05:00 +02:00
|
|
|
# Environment variables
|
2015-10-16 20:26:01 +02:00
|
|
|
environment:
|
|
|
|
GOPATH: c:\gopath
|
2017-10-07 02:00:15 +02:00
|
|
|
GOROOT: c:\go
|
2015-10-16 20:26:01 +02:00
|
|
|
|
|
|
|
# scripts that run after cloning repository
|
|
|
|
install:
|
2017-09-13 01:56:33 +02:00
|
|
|
- set PATH=%GOPATH%\bin;%GOROOT%\bin;%PATH%
|
2015-10-16 20:26:01 +02:00
|
|
|
- go version
|
|
|
|
- go env
|
2016-09-11 06:05:00 +02:00
|
|
|
- python --version
|
2015-10-16 20:26:01 +02:00
|
|
|
|
2016-09-11 06:05:00 +02:00
|
|
|
# To run your custom scripts instead of automatic MSBuild
|
2015-10-16 20:26:01 +02:00
|
|
|
build_script:
|
2016-09-11 06:05:00 +02:00
|
|
|
# Compile
|
2017-06-22 16:54:22 +02:00
|
|
|
# We need to disable firewall - https://github.com/appveyor/ci/issues/1579#issuecomment-309830648
|
|
|
|
- ps: Disable-NetFirewallRule -DisplayName 'File and Printer Sharing (SMB-Out)'
|
2016-09-11 06:05:00 +02:00
|
|
|
- appveyor AddCompilationMessage "Starting Compile"
|
|
|
|
- cd c:\gopath\src\github.com\minio\minio
|
2015-11-08 11:56:19 +01: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 06:05:00 +02:00
|
|
|
- appveyor AddCompilationMessage "Compile Success"
|
2015-10-16 20:26:01 +02:00
|
|
|
|
2016-09-11 06:05:00 +02: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-06-01 05:33:13 +02:00
|
|
|
- go test -v -timeout 17m -race github.com/minio/minio/cmd...
|
|
|
|
- go test -v -race github.com/minio/minio/pkg...
|
2017-11-08 00:18:59 +01:00
|
|
|
# FIXME(aead): enable codecov after issue https://github.com/golang/go/issues/18468 is solved.
|
|
|
|
# - go test -v -timeout 17m -coverprofile=build\coverage\coverage.txt -covermode=atomic github.com/minio/minio/cmd
|
2016-09-11 06:05:00 +02:00
|
|
|
- ps: Update-AppveyorTest "Unit Tests" -Outcome Passed
|
2016-08-05 01:48:50 +02:00
|
|
|
|
2016-09-11 06:05:00 +02:00
|
|
|
after_test:
|
2017-11-08 00:18:59 +01:00
|
|
|
# FIXME(aead): enable codecov after issue https://github.com/golang/go/issues/18468 is solved.
|
|
|
|
# - 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
|
2016-09-11 06:05:00 +02:00
|
|
|
# Upload coverage report.
|
2017-11-08 00:18:59 +01:00
|
|
|
# - "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
|
|
|
|
# - pip install codecov
|
|
|
|
# - codecov -X gcov -f "build\coverage\coverage.txt"
|
2015-10-16 20:26:01 +02:00
|
|
|
|
|
|
|
# to disable deployment
|
|
|
|
deploy: off
|