forked from ruflin/filebeat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
203 lines (193 loc) · 5.8 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# Version format
version: "{build}"
# Operating system (build VM template)
os: Windows Server 2012 R2
# Environment variables
environment:
GOROOT: c:\go
GOPATH: c:\gopath
PROJ: github.com\elastic\filebeat
# Custom clone folder (variables are not expanded here).
clone_folder: c:\gopath\src\github.com\elastic\filebeat
# Scripts that run after cloning repository
install:
- set PATH=%GOROOT%\bin;%PATH%
- set PATH=%GOPATH%\bin;%PATH%
- set GOPATH=%GOPATH%\src\%PROJ%\Godeps\_workspace;%GOPATH%
- go version
- go env
- python --version
- appveyor DownloadFile https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py
- python get-pip.py
- set PATH=C:\Python27\Scripts;%PATH%
- pip install jinja2 nose nose-timer
# To run your custom scripts instead of automatic MSBuild
build_script:
# Compile
- appveyor AddCompilationMessage "Starting Compile"
- go build
- appveyor AddCompilationMessage "Compile Success" -FileName "filebeat.exe"
# To run your custom scripts instead of automatic tests
test_script:
# Unit tests
- ps: Add-AppveyorTest "Unit Tests" -Outcome Running
- go test ./...
- ps: Update-AppveyorTest "Unit Tests" -Outcome Passed
# System tests
- ps: Add-AppveyorTest "System tests" -Outcome Running
- go test -race -c -cover -covermode=atomic -coverpkg ./...
- ps: cd tests/system
- nosetests --with-timer
- ps: Update-AppveyorTest "System tests" -Outcome Passed
# After testing, cross-compile and publish artifacts.
after_test:
- cd c:\gopath\src\github.com\elastic\filebeat
- appveyor AddCompilationMessage "Starting cross-compile"
- set GOOS=linux
- set GOARCH=386
- set GOARM=
- set GO386=
- go build -o bin/filebeat-linux-386
- ps: Push-AppveyorArtifact bin/filebeat-linux-386
- set GOOS=linux
- set GOARCH=386
- set GOARM=
- set GO386=387
- go build -o bin/filebeat-linux-386-387
- ps: Push-AppveyorArtifact bin/filebeat-linux-386-387
- set GOOS=linux
- set GOARCH=arm
- set GOARM=5
- set GO386=
- go build -o bin/filebeat-linux-arm-arm5
- ps: Push-AppveyorArtifact bin/filebeat-linux-arm-arm5
- set GOOS=linux
- set GOARCH=amd64
- set GOARM=
- set GO386=
- go build -o bin/filebeat-linux-amd64
- ps: Push-AppveyorArtifact bin/filebeat-linux-amd64
- set GOOS=linux
- set GOARCH=arm
- set GOARM=
- set GO386=
- go build -o bin/filebeat-linux-arm
- ps: Push-AppveyorArtifact bin/filebeat-linux-arm
- set GOOS=linux
- set GOARCH=arm64
- set GOARM=
- set GO386=
- go build -o bin/filebeat-linux-arm64
- ps: Push-AppveyorArtifact bin/filebeat-linux-arm64
- set GOOS=linux
- set GOARCH=ppc64
- set GOARM=
- set GO386=
- go build -o bin/filebeat-linux-ppc64
- ps: Push-AppveyorArtifact bin/filebeat-linux-ppc64
- set GOOS=linux
- set GOARCH=ppc64le
- set GOARM=
- set GO386=
- go build -o bin/filebeat-linux-ppc64le
- ps: Push-AppveyorArtifact bin/filebeat-linux-ppc64le
- set GOOS=darwin
- set GOARCH=386
- set GOARM=
- set GO386=
- go build -o bin/filebeat-darwin-386
- ps: Push-AppveyorArtifact bin/filebeat-darwin-386
- set GOOS=darwin
- set GOARCH=amd64
- set GOARM=
- set GO386=
- go build -o bin/filebeat-darwin-amd64
- ps: Push-AppveyorArtifact bin/filebeat-darwin-amd64
- set GOOS=dragonfly
- set GOARCH=amd64
- set GOARM=
- set GO386=
- go build -o bin/filebeat-dragonfly-amd64
- ps: Push-AppveyorArtifact bin/filebeat-dragonfly-amd64
- set GOOS=freebsd
- set GOARCH=386
- set GOARM=
- set GO386=
- go build -o bin/filebeat-freebsd-386
- ps: Push-AppveyorArtifact bin/filebeat-freebsd-386
- set GOOS=freebsd
- set GOARCH=amd64
- set GOARM=
- set GO386=
- go build -o bin/filebeat-freebsd-amd64
- ps: Push-AppveyorArtifact bin/filebeat-freebsd-amd64
- set GOOS=freebsd
- set GOARCH=arm
- set GOARM=
- set GO386=
- go build -o bin/filebeat-freebsd-arm
- ps: Push-AppveyorArtifact bin/filebeat-freebsd-arm
- set GOOS=netbsd
- set GOARCH=386
- set GOARM=
- set GO386=
- go build -o bin/filebeat-netbsd-386
- ps: Push-AppveyorArtifact bin/filebeat-netbsd-386
- set GOOS=netbsd
- set GOARCH=amd64
- set GOARM=
- set GO386=
- go build -o bin/filebeat-netbsd-amd64
- ps: Push-AppveyorArtifact bin/filebeat-netbsd-amd64
- set GOOS=netbsd
- set GOARCH=arm
- set GOARM=
- set GO386=
- go build -o bin/filebeat-netbsd-arm
- ps: Push-AppveyorArtifact bin/filebeat-netbsd-arm
- set GOOS=openbsd
- set GOARCH=386
- set GOARM=
- set GO386=
- go build -o bin/filebeat-openbsd-386
- ps: Push-AppveyorArtifact bin/filebeat-openbsd-386
- set GOOS=openbsd
- set GOARCH=amd64
- set GOARM=
- set GO386=
- go build -o bin/filebeat-openbsd-amd64
- ps: Push-AppveyorArtifact bin/filebeat-openbsd-amd64
- set GOOS=openbsd
- set GOARCH=arm
- set GOARM=
- set GO386=
- go build -o bin/filebeat-openbsd-arm
- ps: Push-AppveyorArtifact bin/filebeat-openbsd-arm
- set GOOS=solaris
- set GOARCH=amd64
- set GOARM=
- set GO386=
- go build -o bin/filebeat-solaris-amd64
- ps: Push-AppveyorArtifact bin/filebeat-solaris-amd64
- set GOOS=windows
- set GOARCH=386
- set GOARM=
- set GO386=
- go build -o bin/filebeat-windows-386.exe
- ps: Push-AppveyorArtifact bin/filebeat-windows-386.exe
- set GOOS=windows
- set GOARCH=amd64
- set GOARM=
- set GO386=
- go build -o bin/filebeat-windows-amd64.exe
- ps: Push-AppveyorArtifact bin/filebeat-windows-amd64.exe
- appveyor AddCompilationMessage "Cross-compile success"
# Executes for both successful and failed builds
on_finish:
- cd c:\gopath\src\github.com\elastic\filebeat
- 7z a -r system-tests-output.zip build\system-tests\run
- ps: Push-AppveyorArtifact system-tests-output.zip
# To disable deployment
deploy: off
# Notifications should only be setup using the AppVeyor UI so that
# forks can be created without inheriting the settings.