mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-03 14:47:16 +00:00
Speed up CircleCI builds
To achieve faster feedback cycles for our feature PRs this change reduces the average buildtime from 35 to ~6min by utilising their new 2.0 offering based on docker and nomad. We make use of parallel build steps wherever possible so that the duration is determined by the slowest test suite (p2p). This is an intermediate step until we move our CI/CD completely on-premise for more control and added security.
This commit is contained in:
+2
-1
@@ -1,5 +1,5 @@
|
||||
#! /bin/bash
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
#- kvstore over socket, curl
|
||||
#- counter over socket, curl
|
||||
@@ -8,6 +8,7 @@ set -e
|
||||
|
||||
# TODO: install everything
|
||||
|
||||
export PATH="$GOBIN:$PATH"
|
||||
export TMHOME=$HOME/.tendermint_app
|
||||
|
||||
function kvstore_over_socket(){
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#! /bin/bash
|
||||
set -eux
|
||||
|
||||
# Get the directory of where this script is.
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
LOGS_DIR="$DIR/../logs"
|
||||
echo
|
||||
echo "* [$(date +"%T")] cleaning up $LOGS_DIR"
|
||||
rm -rf "$LOGS_DIR"
|
||||
mkdir -p "$LOGS_DIR"
|
||||
|
||||
set +e
|
||||
echo
|
||||
echo "* [$(date +"%T")] removing run_test container"
|
||||
docker rm -vf run_test
|
||||
set -e
|
||||
|
||||
echo
|
||||
echo "* [$(date +"%T")] starting rsyslog container"
|
||||
docker rm -f rsyslog || true
|
||||
docker run -d -v "$LOGS_DIR:/var/log/" -p 127.0.0.1:5514:514/udp --name rsyslog voxxit/rsyslog
|
||||
|
||||
set +u
|
||||
if [[ "$SKIP_BUILD" == "" ]]; then
|
||||
echo
|
||||
echo "* [$(date +"%T")] building docker image"
|
||||
bash "$DIR/../docker/build.sh"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "* [$(date +"%T")] running p2p tests on a local docker network"
|
||||
bash "$DIR/../p2p/test.sh" tester
|
||||
@@ -10,6 +10,7 @@ RUN apt-get update && \
|
||||
|
||||
# Setup tendermint repo
|
||||
ENV REPO $GOPATH/src/github.com/tendermint/tendermint
|
||||
ENV GOBIN $GOPATH/bin
|
||||
WORKDIR $REPO
|
||||
|
||||
# Install the vendored dependencies before copying code
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#! /bin/bash
|
||||
|
||||
export PATH="$GOBIN:$PATH"
|
||||
export TMHOME=$HOME/.tendermint_persist
|
||||
|
||||
rm -rf "$TMHOME"
|
||||
|
||||
+4
-1
@@ -1,5 +1,7 @@
|
||||
#! /bin/bash
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
export PATH="$GOBIN:$PATH"
|
||||
|
||||
# Get the parent directory of where this script is.
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
@@ -18,6 +20,7 @@ for lib in "${LIBS[@]}"; do
|
||||
|
||||
echo "Testing $lib ..."
|
||||
cd "$GOPATH/src/github.com/tendermint/$lib"
|
||||
make get_tools
|
||||
make get_vendor_deps
|
||||
make test
|
||||
if [[ "$?" != 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user