-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
102 lines (96 loc) · 3.1 KB
/
.travis.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
language: go
os:
- linux
arch:
- ppc64le
go:
- "1.13.11"
- "1.13.x"
- "1.14.x"
- "1.15.x"
- "1.x"
notifications:
irc:
if: repo = namecoin/certinject
channels:
- "irc.oftc.net#namecoin-dev"
on_success: never
jobs:
allow_failures:
- stage: lint
include:
- os: linux
arch: ppc64le
stage: lint-new
language: go
go: "1.15.x"
script:
# lint new changes
- go get -v -d -t ./...
- bash testdata/golangci-linter.bash --new-from-rev=HEAD~ # new changes
- os: linux
arch: ppc64le
stage: lint-mandatory
language: go
go: "1.15.x"
script:
# lint with mandatory linters only. Add more like this:
# --disable=foo,bar
- go get -v -d -t ./...
- bash testdata/golangci-linter.bash --disable=exhaustive,gci,godot,gofumpt
- os: linux
arch: ppc64le
stage: lint
language: go
go: "1.15.x"
script:
# lint stage
- go get -v -d -t ./...
- bash testdata/golangci-linter.bash # all, allowed to fail
- os: linux
arch: ppc64le
stage: deploy
language: go
go: "1.x"
script:
# lint stage
- export GO111MODULE=off
- export GOOS=windows
- go get -v -d -u -t ./...
- go generate ./...
- go get -v -t ./...
- go build -o certinject.exe ./cmd/certinject
before_deploy:
- export RELEASES_NAME=$(date +%F)-$(echo $TRAVIS_COMMIT | cut -c-8)
- 'git clone "https://NamecoinBot:[email protected]/namecoin/nightly-certinject.git"'
- cd nightly-certinject
- git config --local user.name "NamecoinBot"
- git config --local user.email "[email protected]"
- export TRAVIS_TAG=$RELEASES_NAME
- git tag $TRAVIS_TAG
- git push origin $TRAVIS_TAG
- cd ..
deploy:
provider: releases
repo: namecoin/nightly-certinject
file: certinject.exe
edge: true
on:
repo: namecoin/certinject
tags: false
stages:
- lint-new
- lint-mandatory
- lint
- test
- deploy
# 'test' stage
script:
- bash testdata/travis.bash
env:
global:
# RELEASES_TOKEN for automatic releases
- secure: "WZZecuvmgOAFnOtJnQfLeAY4oRlIiZVl3g2pABTBI0x1nsu8oTotQImHnQsgkM30mWo03vUZOjuBj2dtm41JQJH2AcDVJrnpDg8IqF3c6iMMUkhODZCDmdLlqe1KWNJTcHrEGMMac5la/q4EZGh0FDcXXKq0dHZLYkkm5AJFy19DNS6Tcf2xv3hwnwTt/eFqw8EipOn+z06jPoVS3YdfmK1MQLnDk5V7jcjgW+3ttxoMB9iNFqKA1hW89vOed84vVbp0dRhSffKKf4s3jmljXTAuD0lI1Mi/eiKbQ2lgCNiQqimF1G9Mys2D+j5OVyJmedq6X6i96CrcsjF/7ps3/m6UucNNykIU07uGq6HnIPUXElvWU1jXYchPAEevmjInHlPvKeboMzsynbl2z1IQlvRgOkxsPQ1oj6EN+u1L17KTp24dNzqEoITd1HHqgLJQFuheC8NiVULAVXRxHKdAfck4V+Pm+pLLtP1QYwy73JPJt5NSK0qHHMDFrMQFH37kEtRtKdNLFyeAVnxYIPnMaXqmKK3UKnPFzL5RgHskKjCjw5ZeEmou+VplEpEAesZl5OkDFMV4/76X0h+g1HBd1uRj26lYsdguAjp7mMP130j3nYDzcRhWNYcy1RMQS9zanIneOceuv7kIdDWkt9ZZigBstV8jT99w30shAClw5kI="
# Go versions before go1.13.x will grab master branch unless we use GO111MODULE=on
# (go1.10.x still needs the workaround in testdata/travis.bash)
- GO111MODULE="on"