-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.appveyor.yml
48 lines (42 loc) · 2.03 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
image: ubuntu
version: "{build}"
environment:
GO111MODULE: on
install:
- go mod download
build_script:
- mkdir bin gotdict webster1913
- CGO_ENABLED=1 go build -o ./bin/dictgen ./cmd/dictgen
- CGO_ENABLED=0 go build -o ./bin/gotdict-convert ./examples/gotdict-convert
- CGO_ENABLED=0 go build -o ./bin/webster1913-convert ./examples/webster1913-convert
- curl -#Lo ./webster1913/webster1913.txt http://www.gutenberg.org/ebooks/29765.txt.utf-8
- curl -#Lo - https://github.com/wjdp/gotdict/archive/6b4d6cdbb1f5d899d418783ab842f487aafa79ec.tar.gz | tar -xzf - --strip-components=1 -C ./gotdict
- ./bin/gotdict-convert -o ./gotdict/gotdict.df -g ./gotdict --images
- ./bin/gotdict-convert -o ./gotdict/gotdict.noimg.df -g ./gotdict
- ./bin/webster1913-convert -o ./webster1913/webster1913.df ./webster1913/webster1913.txt
- ./bin/dictgen -Ibase64 -o ./gotdict/dicthtml-gt.zip ./gotdict/gotdict.df
- ./bin/dictgen -Iremove -o ./gotdict/dicthtml-gt.noimg.zip ./gotdict/gotdict.noimg.df
- ./bin/dictgen -Iremove -o ./webster1913/dicthtml-wb.zip ./webster1913/webster1913.df
test_script:
- go test -v -cover ./...
- mkdir tmp
- CGO_ENABLED=1 go build -o ./bin/dictutil ./cmd/dictutil
- ./bin/dictutil u -o ./tmp/1 ./gotdict/dicthtml-gt.zip
- ./bin/dictutil u -o ./tmp/2 ./gotdict/dicthtml-gt.noimg.zip
- ./bin/dictutil u -o ./tmp/3 ./webster1913/dicthtml-wb.zip
- ./bin/dictutil p -o ./tmp/1.zip ./tmp/1
- ./bin/dictutil p -o ./tmp/2.zip ./tmp/2
- ./bin/dictutil p -o ./tmp/3.zip ./tmp/3
- sha1sum ./gotdict/dicthtml-gt.zip ./gotdict/dicthtml-gt.noimg.zip ./webster1913/dicthtml-wb.zip
- sha1sum ./tmp/1.zip ./tmp/2.zip ./tmp/3.zip
- cmp ./tmp/1.zip ./gotdict/dicthtml-gt.zip
- cmp ./tmp/2.zip ./gotdict/dicthtml-gt.noimg.zip
- cmp ./tmp/3.zip ./webster1913/dicthtml-wb.zip
artifacts:
- path: gotdict/gotdict.df
- path: gotdict/gotdict.noimg.df
- path: gotdict/dicthtml-gt.zip
- path: gotdict/dicthtml-gt.noimg.zip
- path: webster1913/webster1913.df
- path: webster1913/dicthtml-wb.zip
deploy: off