Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up incremental build #789

Merged
merged 3 commits into from
Jan 6, 2016
Merged

Speed up incremental build #789

merged 3 commits into from
Jan 6, 2016

Conversation

tomwilkie
Copy link
Contributor

  • Pass -i to go build to speed up builds (forces go build to install dependancies, thanks @bboreham)
  • Share scope/pkg into build container as /go/pkg (cached intermediate packages are installed here)
  • Ignore files in ./vendor for Makefile dependancies
  • Don't send two copies of the docker tarball to the docker daemon when building container
  • Add make shell target to get a shell in the build container
  • Don't install python-pip in the build container, just python-requests
  • Update to go 1.5.2

@tomwilkie
Copy link
Contributor Author

With this change, incremental builds take ~30s. Full build is 7mins.

$ make clean
$ make
...
real    6m54.132s
user    0m0.536s
sys     0m3.712s
$ # some very minor change
$ make
...
real    0m31.620s
user    0m0.124s
sys     0m2.352s

@tomwilkie
Copy link
Contributor Author

For reference, on master incremental builds take almost 2mins:

$ make clean
$ make
$ # some very minor change
$ make
...
real    1m49.625s
user    0m0.996s
sys     0m5.480s

@@ -12,12 +12,14 @@ SCOPE_BACKEND_BUILD_IMAGE=$(DOCKERHUB_USER)/scope-backend-build
SCOPE_BACKEND_BUILD_UPTODATE=.scope_backend_build.uptodate
SCOPE_VERSION=$(shell git rev-parse --short HEAD)
DOCKER_VERSION=1.6.2
DOCKER_DISTRIB=docker/docker-$(DOCKER_VERSION).tgz
DOCKER_DISTRIB=docker-$(DOCKER_VERSION).tgz

This comment was marked as abuse.

@paulbellamy
Copy link
Contributor

If you can think of a better place to put the docker tarball that would be great, otherwise LGTM.

tomwilkie added a commit that referenced this pull request Jan 6, 2016
@tomwilkie tomwilkie merged commit 2f03faf into master Jan 6, 2016
@tomwilkie tomwilkie deleted the faster-go-build branch January 6, 2016 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants