-
Notifications
You must be signed in to change notification settings - Fork 593
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
refactor: remove unnecessary deps from 08-wasm by reusing top level simapp binary #7445
base: main
Are you sure you want to change the base?
Changes from 11 commits
8445958
0fbe2f1
117f1ed
8330d9d
7312fac
71fb1b1
b4c7258
ebfa82a
e5616d9
30ca97b
4ddb0fb
32184df
af4fe10
1cd2408
f866ef1
836c330
1caf16b
73e6fbf
af2113c
74367d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would be nice if someone could double check all the workflow changes, especially release.yml There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should also add the install python step here? (unless I am not seeing something) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
FROM golang:1.22-alpine3.20 as builder | ||
ARG IBC_GO_VERSION | ||
|
||
ARG LIBWASM_VERSION | ||
ARG LIBWASM_CHECKSUM | ||
|
||
RUN test -n "${LIBWASM_VERSION}" | ||
RUN test -n "${LIBWASM_CHECKSUM}" | ||
|
||
RUN set -eux; apk add --no-cache git libusb-dev linux-headers gcc musl-dev make; | ||
|
||
ENV GOPATH="" | ||
|
||
# Grab the static library and copy it to location that will be found by the linker flag `-lwasmvm_muslc`. | ||
ADD https://github.com/CosmWasm/wasmvm/releases/download/${LIBWASM_VERSION}/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a | ||
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep ${LIBWASM_CHECKSUM} | ||
RUN cp /lib/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.a | ||
|
||
# ensure the ibc go version is being specified for this image. | ||
RUN test -n "${IBC_GO_VERSION}" | ||
|
||
|
@@ -24,7 +35,7 @@ COPY go.sum . | |
|
||
RUN go mod download | ||
|
||
RUN make build | ||
RUN cd simapp && GOOS=linux GOARCH=amd64 go build -mod=readonly -tags "netgo ledger muslc" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=sim -X github.com/cosmos/cosmos-sdk/version.AppName=simd -X github.com/cosmos/cosmos-sdk/version.Version= -X github.com/cosmos/cosmos-sdk/version.Commit= -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo ledger muslc," -w -s -linkmode=external -extldflags "-Wl,-z,muldefs -static"' -trimpath -o /go/build/ ./... | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did a quick peek into changing this, but ran into a little difficulties, so I'll let someone be my guest if they want to adjust it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can open an issue but personally fine with hardcoding it for now, seems like a nice to have someone can pick up in future. |
||
|
||
FROM alpine:3.18 | ||
ARG IBC_GO_VERSION | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should I simply delete this file now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,15 @@ RUN cp /lib/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.a | |
# Copy relevant files before go mod download. Replace directives to local paths break if local | ||
# files are not copied before go mod download. | ||
ADD internal internal | ||
ADD simapp simapp | ||
Check notice Code scanning / SonarCloud Prefer COPY over ADD for copying local resources Low
Replace this ADD instruction with a COPY instruction. See more on SonarQube Cloud
|
||
ADD testing testing | ||
ADD modules modules | ||
ADD LICENSE LICENSE | ||
|
||
COPY go.mod . | ||
COPY go.sum . | ||
|
||
WORKDIR /go/modules/light-clients/08-wasm | ||
#WORKDIR /go/modules/light-clients/08-wasm | ||
|
||
RUN go mod download | ||
|
||
|
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.
should I try to remove all the custom wasm workflows? I feel like now that we have a single place for a simapp, we should just be building a single simd. What do people think?
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.
yea! would be fine in follow up if you'd prefer.