-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
94 lines (84 loc) · 3.84 KB
/
.drone.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
kind: pipeline
name: default
steps:
- name: tags
image: golang:1.14-stretch
commands:
- git fetch --tags
- name: build-tools
image: golang:1.14-stretch
commands:
- go mod download
- go build ./tools/dictlookup
- go build ./tools/dictparse
- go build ./tools/dictverify
- name: build-server
image: golang:1.14-stretch
commands:
- go build .
depends_on:
- tags
- name: test
image: golang:1.14-stretch
commands:
- go test -v ./...
- name: dictionary-parse
image: golang:1.14-stretch
commands:
- ./dictparse ./data/dictionary.txt ./dict
depends_on:
- build-tools
- name: dictionary-test
image: golang:1.14-stretch
commands:
- ./dictverify ./dict
depends_on:
- build-tools
- dictionary-parse
- name: dictionary-download-v5
image: golang:1.14-stretch
commands:
- wget -O./dict.v5 https://github.com/pgaskin/dictserver/releases/download/v1.3.1/dict
- name: dictionary-test-v5
image: golang:1.14-stretch
commands:
- ./dictverify ./dict.v5
depends_on:
- build-tools
- dictionary-download-v5
- name: build-cross
image: golang:1.14-stretch
commands:
- mkdir build
- cp ./dict ./build/
- GOOS=linux GOARCH=amd64 go build -o "./build/dictlookup_linux-x64" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictlookup"
- GOOS=linux GOARCH=amd64 go build -o "./build/dictparse_linux-x64" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictparse"
- GOOS=linux GOARCH=amd64 go build -o "./build/dictverify_linux-x64" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictverify"
- GOOS=linux GOARCH=amd64 go build -o "./build/dictserver_linux-x64" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "."
- GOOS=linux GOARCH=arm go build -o "./build/dictlookup_linux-arm" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictlookup"
- GOOS=linux GOARCH=arm go build -o "./build/dictparse_linux-arm" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictparse"
- GOOS=linux GOARCH=arm go build -o "./build/dictverify_linux-arm" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictverify"
- GOOS=linux GOARCH=arm go build -o "./build/dictserver_linux-arm" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "."
- GOOS=windows GOARCH=amd64 go build -o "./build/dictlookup_windows.exe" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictlookup"
- GOOS=windows GOARCH=amd64 go build -o "./build/dictparse_windows.exe" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictparse"
- GOOS=windows GOARCH=amd64 go build -o "./build/dictverify_windows.exe" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictverify"
- GOOS=windows GOARCH=amd64 go build -o "./build/dictserver_windows.exe" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "."
- GOOS=darwin GOARCH=amd64 go build -o "./build/dictlookup_darwin-x64" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictlookup"
- GOOS=darwin GOARCH=amd64 go build -o "./build/dictparse_darwin-x64" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictparse"
- GOOS=darwin GOARCH=amd64 go build -o "./build/dictverify_darwin-x64" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "./tools/dictverify"
- GOOS=darwin GOARCH=amd64 go build -o "./build/dictserver_darwin-x64" -ldflags "-s -w -X main.version=$(git describe --tags --always)" "."
depends_on:
- tags
- dictionary-parse
- name: release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files: build/*
when:
event: tag
depends_on:
- dictionary-test
- dictionary-test-v5
- build-cross