2015-07-28 22:16:16 +00:00
|
|
|
language: go
|
2018-07-20 21:31:26 +00:00
|
|
|
go_import_path: github.com/prysmaticlabs/prysm
|
2015-07-28 22:16:16 +00:00
|
|
|
sudo: false
|
2018-01-13 22:31:28 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
2018-05-02 06:17:17 +00:00
|
|
|
go: 1.10.x
|
2018-01-13 22:31:28 +00:00
|
|
|
env:
|
|
|
|
- lint
|
|
|
|
script:
|
2018-07-07 17:23:19 +00:00
|
|
|
-
|
2018-07-29 01:18:56 +00:00
|
|
|
go get github.com/alecthomas/gometalinter && gometalinter --install && gometalinter ./... --deadline=10m --exclude=client/internal/client_helper.go
|
2018-08-07 03:58:21 +00:00
|
|
|
- os: linux
|
|
|
|
env:
|
|
|
|
- coverage
|
|
|
|
script:
|
2018-09-02 02:25:06 +00:00
|
|
|
- ./scripts/coverage.sh
|
2018-08-07 03:58:21 +00:00
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2018-07-07 17:23:19 +00:00
|
|
|
- os: linux
|
2018-09-10 02:50:04 +00:00
|
|
|
env: V=0.16.0
|
2018-07-07 17:23:19 +00:00
|
|
|
before_install:
|
2018-07-07 20:01:58 +00:00
|
|
|
# Install Bazel
|
2018-09-10 02:50:04 +00:00
|
|
|
- |
|
2018-07-07 17:23:19 +00:00
|
|
|
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
|
|
|
|
OS=darwin
|
|
|
|
else
|
|
|
|
sysctl kernel.unprivileged_userns_clone=1
|
|
|
|
OS=linux
|
|
|
|
fi
|
2018-09-10 02:50:04 +00:00
|
|
|
URL="https://github.com/bazelbuild/bazel/releases/download/${V}/bazel-${V}-installer-${OS}-x86_64.sh"
|
2018-07-07 17:23:19 +00:00
|
|
|
wget -O install.sh "${URL}"
|
|
|
|
chmod +x install.sh
|
|
|
|
./install.sh --user
|
|
|
|
rm -f install.sh
|
2018-07-08 19:22:41 +00:00
|
|
|
# Decrypt service account (only works on prysmaticlabs branches)
|
2018-07-15 17:28:38 +00:00
|
|
|
# TODO(#282): enable remote caching / execution
|
|
|
|
#- 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;
|
|
|
|
# fi
|
2018-07-07 17:23:19 +00:00
|
|
|
|
|
|
|
install: true # Skip install go packages.
|
|
|
|
|
|
|
|
script:
|
2018-08-06 15:12:55 +00:00
|
|
|
# Ensure everything builds.
|
2018-07-22 17:31:43 +00:00
|
|
|
- |
|
|
|
|
bazel \
|
|
|
|
--bazelrc=.travis-bazelrc \
|
|
|
|
build \
|
|
|
|
//...
|
2018-07-07 17:23:19 +00:00
|
|
|
# Run all tests.
|
|
|
|
- |
|
|
|
|
bazel \
|
|
|
|
--bazelrc=.travis-bazelrc \
|
|
|
|
test \
|
2018-07-08 21:23:24 +00:00
|
|
|
//... $REMOTE_FLAGS
|
2018-07-07 17:23:19 +00:00
|
|
|
|
2018-07-26 05:13:07 +00:00
|
|
|
# Check that BUILD files are formatted correctly.
|
2018-09-02 02:25:06 +00:00
|
|
|
- ./scripts/check_gazelle.sh
|
2018-07-07 17:23:19 +00:00
|
|
|
|
2018-08-06 15:12:55 +00:00
|
|
|
# Check that target visibility is correct.
|
2018-09-02 02:25:06 +00:00
|
|
|
- ./scripts/check_visibility.sh
|
2018-07-26 05:13:07 +00:00
|
|
|
|
2018-07-07 17:23:19 +00:00
|
|
|
# Shutdown must be last.
|
2018-08-06 15:12:55 +00:00
|
|
|
- bazel shutdown
|
2018-09-10 02:50:04 +00:00
|
|
|
- os: osx
|
|
|
|
env: V=0.16.0
|
|
|
|
before_install:
|
|
|
|
# Install Bazel
|
|
|
|
- |
|
|
|
|
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)
|
|
|
|
# TODO(#282): enable remote caching / execution
|
|
|
|
#- 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;
|
|
|
|
# fi
|
2018-08-06 15:12:55 +00:00
|
|
|
|
2018-09-10 02:50:04 +00:00
|
|
|
install: true # Skip install go packages.
|
2018-08-06 15:12:55 +00:00
|
|
|
|
2018-09-10 02:50:04 +00:00
|
|
|
script:
|
|
|
|
# Ensure everything builds.
|
|
|
|
- |
|
|
|
|
bazel \
|
|
|
|
--bazelrc=.travis-bazelrc \
|
|
|
|
build \
|
|
|
|
//...
|
|
|
|
# Run all tests.
|
|
|
|
- |
|
|
|
|
bazel \
|
|
|
|
--bazelrc=.travis-bazelrc \
|
|
|
|
test \
|
|
|
|
//... $REMOTE_FLAGS
|
2018-08-07 18:46:11 +00:00
|
|
|
|
2018-09-10 02:50:04 +00:00
|
|
|
# Shutdown must be last.
|
|
|
|
- bazel shutdown
|
2018-08-06 15:12:55 +00:00
|
|
|
- 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/
|
2018-09-10 02:50:04 +00:00
|
|
|
|
|
|
|
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
|