1
1
build :
2
- image : arduino/golang-linux-32
3
- commands :
4
- - apt-get update && apt-get install libgtk-3-dev libappindicator3-dev
5
- - GOOS=linux GOARCH=386 CC=gcc CXX=gcc CGO_ENABLED=1 go build -o artifacts/linux-386/arduino-create-agent
6
- - cp config.ini artifacts/linux-386
7
- build :
8
- image : arduino/golang-cross
9
- auth_config :
10
- username : $$DOCKER_USERNAME
11
- password : $$DOCKER_PASSWORD
12
- email : $$DOCKER_EMAIL
13
- commands :
14
- - apt-get update && apt-get install libgtk-3-dev libappindicator3-dev zip
15
- # Linux amd64
16
- - GOOS=linux GOARCH=amd64 CC=gcc CXX=gcc CGO_ENABLED=1 go build -o artifacts/linux-amd64/arduino-create-agent
17
- - cp config.ini artifacts/linux-amd64
18
- # Darwin amd64
19
- - GOOS=darwin GOARCH=amd64 CC=o64-clang CXX=o64-clang CGO_ENABLED=1 go build -o artifacts/osx/arduino-create-agent
20
- - cp config.ini artifacts/osx
21
- # Windows 386
22
- - GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-gcc CGO_ENABLED=1 go build -o artifacts/windows/arduino-create-agent.exe -ldflags -H=windowsgui
23
- - cp config.ini artifacts/windows
24
- - zip -r arduino-create-agent.zip artifacts/*
2
+ crosscompilation :
3
+ image : arduino/golang-cross
4
+ auth_config :
5
+ username : $$DOCKER_USERNAME
6
+ password : $$DOCKER_PASSWORD
7
+ email : $$DOCKER_EMAIL
8
+ commands :
9
+ - go get github.com/kardianos/govendor
10
+ - govendor vet +local
11
+ - govendor test +local
12
+ # Linux amd64
13
+ - GOOS=linux GOARCH=amd64 CC=gcc CXX=gcc CGO_ENABLED=1 go build -o artifacts/linux-amd64/arduino-create-agent
14
+ - cp config.ini artifacts/linux-amd64
15
+ # Darwin amd64
16
+ - GOOS=darwin GOARCH=amd64 CC=o64-clang CXX=o64-clang CGO_ENABLED=1 go build -o artifacts/osx/arduino-create-agent
17
+ - cp config.ini artifacts/osx
18
+ # Windows 386
19
+ - GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-gcc CGO_ENABLED=1 go build -o artifacts/windows/arduino-create-agent.exe -ldflags -H=windowsgui
20
+ - cp config.ini artifacts/windows
21
+ - zip -r arduino-create-agent.zip artifacts/*
22
+ linux32 :
23
+ image : arduino/golang-linux-32
24
+ commands :
25
+ - GOOS=linux GOARCH=386 CC=gcc CXX=gcc CGO_ENABLED=1 go build -o artifacts/linux-386/arduino-create-agent
26
+ - cp config.ini artifacts/linux-386
25
27
notify :
26
28
slack :
27
29
webhook_url : $$SLACK_WEBHOOK
28
30
channel : $$SLACK_CHANNEL
29
31
username : drone
32
+ when :
33
+ event : pull_request
34
+ template : |
35
+ {{#success build.status}}
36
+ [{{ repo.name}}] Congrats {{ build.author }}! Your PR works: {{ build.link_url}}
37
+ {{else}}
38
+ [{{ repo.name}}] Damn {{ build.author }}! Something went wrong with your PR: {{ build.link_url}}
39
+ {{/success}}
30
40
publish :
31
41
github_release :
32
42
api_key : $$GITHUB_API_KEY
@@ -35,4 +45,17 @@ publish:
35
45
checksum :
36
46
- md5
37
47
when :
38
- branch : [master, devel, test]
48
+ event : tag
49
+ notify :
50
+ slack :
51
+ webhook_url : $$SLACK_WEBHOOK
52
+ channel : $$SLACK_CHANNEL
53
+ username : drone
54
+ when :
55
+ event : tag
56
+ template : |
57
+ {{#success build.status}}
58
+ [{{ repo.name}}/{{ build.branch }}] A new release is available: {{ build.link_url}}
59
+ {{else}}
60
+ [{{ repo.name}}/{{ build.branch }}] Something went wrong while building a new release: {{ build.link_url}}
61
+ {{/success}}
0 commit comments