-
Notifications
You must be signed in to change notification settings - Fork 221
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
use Go v1.20 #454
use Go v1.20 #454
Conversation
@@ -10,7 +10,7 @@ COPY go.sum ./ | |||
RUN go mod download | |||
|
|||
ADD . . | |||
RUN --mount=type=cache,target=/root/.cache/go-build CGO_CFLAGS="$CGO_CFLAGS" GOOS=linux go build -trimpath -ldflags "-s -X 'github.com/flashbots/mev-boost/config.Version=$VERSION'" -v -o mev-boost . | |||
RUN --mount=type=cache,target=/root/.cache/go-build CGO_CFLAGS="$CGO_CFLAGS" GOOS=linux go build -trimpath -ldflags "-s -X 'github.com/flashbots/mev-boost/config.Version=$VERSION' -linkmode external -extldflags '-static'" -v -o mev-boost . |
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.
Needed to compile fully static binary. Otherwise getting the following error when running the Docker image:
Error loading shared library libresolv.so.2: No such file or directory (needed by /app/mev-boost)
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 seems fine to me.
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19 | ||
go-version: ^1.20 |
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.
Just to be clear, this is the same as 1.20.x
(any patch version) right?
Had to check the documentation:
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.
yes! same as in go.mod and the Dockerfile 👍
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #454 +/- ##
=======================================
Coverage 66.66% 66.66%
=======================================
Files 8 8
Lines 1212 1212
=======================================
Hits 808 808
Misses 355 355
Partials 49 49
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
LGTM 👍
📝 Summary
Go v1.20.1 is the latest. Default to 1.20 for building and testing.
✅ I have run these commands
make lint
make test-race
go mod tidy