Skip to content

Commit

Permalink
Improve build performance (hyperledger-archives#1579)
Browse files Browse the repository at this point in the history
* Use lerna bootstrap instead of npm install

* Remove upgrade of Docker

* Combine npm/pip installs into one line
  • Loading branch information
Simon Stone authored Jul 17, 2017
1 parent f8bc6ea commit 860e859
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 30 deletions.
30 changes: 2 additions & 28 deletions .travis/before-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,16 @@
set -ev
set -o pipefail

# Download specific version of docker-compose
export DOCKER_COMPOSE_VERSION=1.11.2
sudo rm /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
echo "Docker-compose version: "
docker-compose --version

# Update docker
sudo apt-get update
sudo apt-get remove docker docker-engine
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
echo "Docker version: "
docker --version

# Install using pip as apt-get pulls the wrong version on Travis' trusty image
# python requests 2.9.2 is essential prereq for linkchecker

sudo pip install linkchecker
sudo pip install linkchecker --upgrade
sudo pip install requests==2.9.2
pip install linkchecker requests==2.9.2
linkchecker --version

# Grab the parent (root) directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

npm install -g npm@4
npm install -g @alrra/travis-scripts

npm install -g asciify
npm install -g npm@4 lerna@2 @alrra/travis-scripts asciify


echo "ABORT_BUILD=false" > ${DIR}/build.cfg
Expand Down
4 changes: 2 additions & 2 deletions .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ fi
#exit 0;
#fi


# Use lerna bootstrap and not npm install; it's a lot faster in Travis.
cd ${DIR}
npm install 2>&1 | tee
lerna bootstrap 2>&1 | tee

0 comments on commit 860e859

Please sign in to comment.