Skip to content

Commit

Permalink
download libwasm in make build
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojtek committed Nov 10, 2023
1 parent e399605 commit f22be60
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: make build

- name: Test & Coverage report creation 🧪
run: make install test-unit stop-docker-test
run: make test-unit stop-docker-test

- name: Upload coverage 📤
if: "env.GIT_DIFF != ''"
Expand Down
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ RUN apk update && apk add --no-cache make git gcc libc-dev
WORKDIR /go/src/github.com/forbole/bdjuno
COPY . ./
RUN go mod download
ARG arch=x86_64
# we use the same arch in the CI as a workaround since we don't use the wasm in the indexer
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.3.0/libwasmvm_muslc.${arch}.a /lib/libwasmvm_muslc.${arch}.a
# Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc`
RUN cp /lib/libwasmvm_muslc.${arch}.a /lib/libwasmvm_muslc.a
RUN make build

FROM --platform=$TARGETPLATFORM alpine:latest
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ BUILD_FLAGS := -tags muslc -ldflags '$(LD_FLAGS)'
###############################################################################

build: go.sum
@wget https://github.com/CosmWasm/wasmvm/releases/download/v1.5.0/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.a
ifeq ($(OS),Windows_NT)
@echo "building bdjuno binary..."
@go build -mod=readonly $(BUILD_FLAGS) -o build/bdjuno.exe ./cmd/bdjuno
Expand Down

0 comments on commit f22be60

Please sign in to comment.