-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.appveyor.yml
61 lines (51 loc) · 1.79 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Version format
version: "{build}"
image: Visual Studio 2015
# Environment variables
environment:
GOPATH: c:\gopath
GO111MODULE: on
GVM_GO_VERSION: 1.12.4
GVM_DL: https://github.com/andrewkroh/gvm/releases/download/v0.2.0/gvm-windows-amd64.exe
# Custom clone folder (variables are not expanded here).
clone_folder: c:\gopath\src\github.com\elastic\go-sysinfo
# Cache mingw install until appveyor.yml is modified.
cache:
- C:\ProgramData\chocolatey\bin -> .appveyor.yml
- C:\ProgramData\chocolatey\lib -> .appveyor.yml
- C:\Users\appveyor\.gvm -> .appveyor.yml
- C:\Windows\System32\gvm.exe -> .appveyor.yml
# Scripts that run after cloning repository
install:
- ps: >-
if(!(Test-Path "C:\Windows\System32\gvm.exe")) {
wget "$env:GVM_DL" -Outfile C:\Windows\System32\gvm.exe
}
- ps: gvm --format=powershell "$env:GVM_GO_VERSION" | Invoke-Expression
# AppVeyor has MinGW64. Make sure it's on the PATH.
- set PATH=C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1;%GOROOT%\bin;%PATH%
- set PATH=%GOPATH%\bin;%PATH%
- go version
- go env
- cmd /C "set ""GO111MODULE=off"" && go get github.com/elastic/go-licenser"
- python --version
before_build:
- go mod verify
- go-licenser -d
- go run .ci/scripts/check_format.go
- go run .ci/scripts/check_lint.go
build_script:
# Compile
- appveyor AddCompilationMessage "Starting Compile"
- cd c:\gopath\src\github.com\elastic\go-sysinfo
- go build
- appveyor AddCompilationMessage "Compile Success"
test_script:
# Unit tests
- ps: Add-AppveyorTest "Unit Tests" -Outcome Running
- go test -v ./...
- ps: Update-AppveyorTest "Unit Tests" -Outcome Passed
# To disable deployment
deploy: off
# Notifications should only be setup using the AppVeyor UI so that
# forks can be created without inheriting the settings.