prysm-pulse/.travis.yml
Preston Van Loon 68eba02cc2 Remove most of the remaining geth code and set up bazel (#235)
* Remove most of the remaining geth code and set up bazel for this

* chmod +x

* Add flake check

* better flake detection


Former-commit-id: 5c332ecbf2923943f646f1fe40befa95be883329 [formerly 99590fc354514584700e5ce8d7d30a8a7d541f29]
Former-commit-id: e5f919b553fe698e98090965d34eb721990b5693
2018-07-07 13:23:19 -04:00

61 lines
2.1 KiB
YAML

language: go
go_import_path: github.com/prysmaticlabs/geth-sharding
sudo: false
matrix:
include:
- os: linux
go: 1.10.x
env:
- lint
script:
-
go get github.com/alecthomas/gometalinter && gometalinter --install && gometalinter
- os: linux
env: V=0.15.0
before_install:
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
OS=darwin
else
sysctl kernel.unprivileged_userns_clone=1
OS=linux
fi
if [[ "${V}" == "HEAD" ]]; then
# Determine last successful build number. This may change while we are
# downloading, so it's important to determine ahead of time, in case
# we need to resume the download.
CI_BASE="http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/PLATFORM_NAME=${OS}-x86_64/"
CI_INDEX_URL="${CI_BASE}/lastSuccessfulBuild/"
wget -q -O build-index.html "${CI_INDEX_URL}"
CI_BUILD=$(grep '<title>' build-index.html | sed -e 's/^.*#\([0-9]*\).*$/\1/')
# Determine the artifact name. This is normally, bazel--installer.sh,
# but it may be, for example, bazel-0.5rc2-installer.sh before a release.
CI_ARTIFACT=$(grep -o 'bazel-[^\"-]*-installer.sh' build-index.html | head -n 1)
URL="${CI_BASE}/${CI_BUILD}/artifact/output/ci/${CI_ARTIFACT}"
rm build-index.html
else
URL="https://github.com/bazelbuild/bazel/releases/download/${V}/bazel-${V}-installer-${OS}-x86_64.sh"
fi
wget -O install.sh "${URL}"
chmod +x install.sh
./install.sh --user
rm -f install.sh
install: true # Skip install go packages.
script:
# Run all tests.
- |
bazel \
--bazelrc=.travis-bazelrc \
test \
//...
# Check that BUILD files are formatted correctly.
- ./check_gazelle.sh
# Shutdown must be last.
- bazel shutdown
notifications:
email: false