-
Notifications
You must be signed in to change notification settings - Fork 80
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
Allow sharing the Go cache directory for crossbuilds #178
base: master
Are you sure you want to change the base?
Allow sharing the Go cache directory for crossbuilds #178
Conversation
Signed-off-by: Simon Pasquier <[email protected]>
Signed-off-by: Simon Pasquier <[email protected]>
Signed-off-by: Simon Pasquier <[email protected]>
@simonpasquier I am massively rewriting cmd/crossbuild.go in #177 |
Signed-off-by: Simon Pasquier <[email protected]>
@sylr yes I know but I'm not sure it's the right direction... |
Signed-off-by: Simon Pasquier <[email protected]>
Signed-off-by: Simon Pasquier <[email protected]>
Signed-off-by: Simon Pasquier <[email protected]>
I've managed to make it work (though a few things need to be cleaned up). The |
When does the build cache prove effective ? if "our" go sources are modified from one commit to another will it still improve things ? |
@@ -23,14 +23,24 @@ jobs: | |||
- run: git diff --exit-code | |||
|
|||
build: | |||
executor: golang | |||
machine: | |||
image: ubuntu-1604:201903-01 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we use 1804?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not listed in the docs.
@simonpasquier As I rewrote crossbuild entirely to not use docker anymore in #177 (I created a |
- restore_cache: | ||
keys: | ||
- v01-gocache-{{ checksum "go.mod" }} | ||
- v01-gocache- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the v01-gocache-
key ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's for testing
Obviously it would need to be tested on Circle CI but this is what I get with my local machine when crossbuilding different versions of
So the difference between a fresh cache and an outdated cache isn't huge. Note that it assumes that |
OK, thank you for this. I also did some tests on my side and running crossbuild on prometheus on my mac generated 6GB of data in the cache dir, do you roughtly have the same number ? |
I've reached 8.5GB of build cache after the runs I've described. |
How's this going? It's approved, but there's a lot of un-resolved threads. |
Ping, should we finish this up? |
Ping @simonpasquier, can you rebase this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a rebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can revive and merge this @simonpasquier.
LGTM.
@@ -23,14 +23,24 @@ jobs: | |||
- run: git diff --exit-code | |||
|
|||
build: | |||
executor: golang | |||
machine: | |||
image: ubuntu-1604:201903-01 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image: ubuntu-1604:201903-01 | |
image: ubuntu-2204:2024.04.4 |
No description provided.