forked from prysmaticlabs/prysm
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
144 lines (134 loc) · 4.35 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
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
language: go
go_import_path: github.com/prysmaticlabs/prysm
sudo: false
matrix:
include:
- os: linux
go: 1.10.x
env:
- lint
script:
-
go get github.com/alecthomas/gometalinter && gometalinter --install && gometalinter ./... --deadline=10m --exclude=client/internal/client_helper.go
- os: linux
env:
- todos
install: true # Skip installing go packages
script:
- ./scripts/check-todo.sh
- os: linux
env:
- coverage
script:
- ./scripts/coverage.sh
- bash <(curl -s https://codecov.io/bash)
- os: linux
env: V=0.17.1
before_install:
# Install Bazel
- |
echo "" >> WORKSPACE
echo "go_register_toolchains(go_version = \"host\")" >> WORKSPACE
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
OS=darwin
else
sysctl kernel.unprivileged_userns_clone=1
OS=linux
fi
URL="https://github.com/bazelbuild/bazel/releases/download/${V}/bazel-${V}-installer-${OS}-x86_64.sh"
wget -O install.sh "${URL}"
chmod +x install.sh
./install.sh --user
rm -f install.sh
# Decrypt service account (only works on prysmaticlabs branches)
- if [[ $encrypted_64ca747eb448_iv ]]; then
openssl aes-256-cbc -K $encrypted_64ca747eb448_key -iv $encrypted_64ca747eb448_iv
-in service-account.json.enc -out /tmp/service-account.json -d;
REMOTE_FLAGS=--config=remote-rw;
else
REMOTE_FLAGS=--config=remote;
fi
install: true # Skip install go packages.
script:
# Ensure everything builds.
- |
bazel \
--bazelrc=.travis-bazelrc \
build \
//... $REMOTE_FLAGS
# Run all tests.
- |
bazel \
--bazelrc=.travis-bazelrc \
test \
//... $REMOTE_FLAGS
# Check that BUILD files are formatted correctly.
- ./scripts/check_gazelle.sh
# Check that target visibility is correct.
- ./scripts/check_visibility.sh
# Shutdown must be last.
- bazel shutdown
- os: osx
env: V=0.17.1
before_install:
# Install Bazel
- |
echo "" >> WORKSPACE
echo "go_register_toolchains(go_version = \"host\")" >> WORKSPACE
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
OS=darwin
else
sysctl kernel.unprivileged_userns_clone=1
OS=linux
fi
URL="https://github.com/bazelbuild/bazel/releases/download/${V}/bazel-${V}-installer-${OS}-x86_64.sh"
wget -O install.sh "${URL}"
chmod +x install.sh
./install.sh --user
rm -f install.sh
# Decrypt service account (only works on prysmaticlabs branches)
- if [[ $encrypted_64ca747eb448_iv ]]; then
openssl aes-256-cbc -K $encrypted_64ca747eb448_key -iv $encrypted_64ca747eb448_iv
-in service-account.json.enc -out /tmp/service-account.json -d;
REMOTE_FLAGS=--config=remote-rw;
else
REMOTE_FLAGS=--config=remote;
fi
install: true # Skip install go packages.
script:
# Ensure everything builds.
- |
bazel \
--bazelrc=.travis-bazelrc \
build \
//... $REMOTE_FLAGS
# Run all tests.
- |
bazel \
--bazelrc=.travis-bazelrc \
test \
//... $REMOTE_FLAGS
# Shutdown must be last.
- bazel shutdown
- language: node_js
os: linux
env:
- solidity
node_js:
- "lts/*"
before_install:
- npm install -g solium
install: true # Skip npm install.
script:
# Check solidity linter.
- solium -d contracts/
notifications:
email: false
after_success:
- wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh success $WEBHOOK_URL
after_failure:
- wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL