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 builds by using local go/zip instead of dockerized ones. #506

Merged
merged 1 commit into from
Jan 24, 2019

Conversation

jkowalski
Copy link
Contributor

@jkowalski jkowalski commented Jan 24, 2019

This adds LOCAL_GO and LOCAL_ZIP which cause locally-installed Go toolkit and zip tool to be used when building binaries, greatly speeding up incremental rebuilds on a Mac where docker filesystem driver is very slow.

Before:

$ time make -j4 build-controller-binary build-agones-sdk-binary

real    1m11.369s
user    0m0.325s
sys     0m0.273s

After:

$ time make -j4 build-controller-binary build-agones-sdk-binary LOCAL_GO=1 LOCAL_ZIP=1

real    0m4.605s
user    0m3.480s
sys     0m4.527s

Note that when using LOCAL_GO, agones.dev must be checked out in a GOPATH and Go compiler must be installed at appropriate version.
Use at your own risk!

This pretty fixes #453 as the incremental build times are finally good.

This adds LOCAL_GO and LOCAL_ZIP which cause locally-installed Go toolkit and zip tool to be used when building binaries, greatly speeding up incremental rebuilds on a Mac where docker filesystem driver is very slow.

Before:

```
$ time make -j4 build-controller-binary build-agones-sdk-binary

real    1m11.369s
user    0m0.325s
sys     0m0.273s
```

After:

```
$ time make -j4 build-controller-binary build-agones-sdk-binary LOCAL_GO=1 LOCAL_ZIP=1

real    0m4.605s
user    0m3.480s
sys     0m4.527s
```

Note that when using LOCAL_GO, agones.dev must be checked out in a GOPATH and Go compiler must be installed at appropriate version.
Use at your own risk!
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 3ff24c97-7ffd-489e-ad18-d204e22fb3a2

The following development artifacts have been built, and will exist for the next 30 days:

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/506/head:pr_506 && git checkout pr_506
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.8.0-ebebdb6

Copy link
Collaborator

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on my mac jet from 4m to 1m

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 4889a759-aa27-4e96-94e9-b2b2c3110401

The following development artifacts have been built, and will exist for the next 30 days:

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/506/head:pr_506 && git checkout pr_506
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.8.0-a1a9ea5

@jkowalski
Copy link
Contributor Author

nice speedup, although not as dramatic as what I can see, can you merge?

@cyriltovena cyriltovena merged commit c3bbe54 into googleforgames:master Jan 24, 2019
@markmandel markmandel added the area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. label Jan 25, 2019
@markmandel markmandel added this to the 0.8.0 milestone Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve build speed by refactoring Makefile
4 participants