Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitys7 committed Sep 6, 2024
2 parents 81b9849 + c9f14a2 commit 9f88ecd
Show file tree
Hide file tree
Showing 65 changed files with 4,295 additions and 207 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ jobs:
- name: Publish to GitHub Packages
uses: docker/build-push-action@v4
with:
file: consumer.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
tags: |
ghcr.io/osmosis-labs/meshconsumerd:latest
- name: Publish to GitHub Packages
uses: docker/build-push-action@v4
with:
file: provider.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/osmosis-labs/meshproviderd:latest
8 changes: 4 additions & 4 deletions Dockerfile → consumer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ COPY . /code
# then log output of file /code/bin/meshd
# then ensure static linking
RUN cd demo/ && LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \
&& file /code/demo/build/meshd \
&& file /code/demo/build/meshconsumerd \
&& echo "Ensuring binary is statically linked ..." \
&& (file /code/demo/build/meshd | grep "statically linked")
&& (file /code/demo/build/meshconsumerd | grep "statically linked")

# --------------------------------------------------------
FROM alpine:3.17

COPY --from=go-builder /code/demo/build/meshd /usr/bin/meshd
COPY --from=go-builder /code/demo/build/meshconsumerd /usr/bin/meshconsumerd

# Install dependencies used for Starship
RUN apk add --no-cache curl make bash jq sed
Expand All @@ -38,4 +38,4 @@ WORKDIR /opt
# rest server, tendermint p2p, tendermint rpc
EXPOSE 1317 26656 26657

CMD ["/usr/bin/meshd", "version"]
CMD ["/usr/bin/meshconsumerd", "version"]
19 changes: 13 additions & 6 deletions demo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,30 @@ ifeq ($(OS),Windows_NT)
$(error mesh demo server not supported)
exit 1
else
go build -mod=readonly $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APPNAME) ./cmd/meshd
go build -mod=readonly $(BUILD_FLAGS) -o $(BUILD_DIR)/meshconsumerd ./cmd/meshconsumerd
go build -mod=readonly $(BUILD_FLAGS) -o $(BUILD_DIR)/meshproviderd ./cmd/meshproviderd
endif

build-vendored:
go build -mod=vendor $(BUILD_FLAGS) -o $(BUILD_DIR)/$(APPNAME) ./cmd/meshd
go build -mod=vendor $(BUILD_FLAGS) -o $(BUILD_DIR)/meshconsumerd ./cmd/meshconsumerd
go build -mod=vendor $(BUILD_FLAGS) -o $(BUILD_DIR)/meshproviderd ./cmd/meshproviderd

build-linux-static:
go mod vendor # quick hack to make local dependencies work in Docker
mkdir -p $(BUILD_DIR)
docker build --tag osmosis/meshd:local ./
docker create --name meshd_temp osmosis/meshd:local
docker cp meshd_temp:/usr/bin/meshd $(BUILD_DIR)/
docker build --tag osmosis/meshconsumerd:local -f consumer.Dockerfile ./
docker build --tag osmosis/meshproviderd:local -f provider.Dockerfile ./
docker create --name meshd_temp osmosis/meshconsumerd:local
docker cp meshd_temp:/usr/bin/meshconsumerd $(BUILD_DIR)/
docker rm -f meshd_temp
docker create --name meshd_temp osmosis/meshproviderd:local
docker cp meshd_temp:/usr/bin/meshproviderd $(BUILD_DIR)/
docker rm -f meshd_temp
rm -rf vendor/

install:
go install -mod=readonly $(BUILD_FLAGS) ./cmd/meshd
go install -mod=readonly $(BUILD_FLAGS) ./cmd/meshconsumerd
go install -mod=readonly $(BUILD_FLAGS) ./cmd/meshproviderd

########################################
### Testing
Expand Down
Loading

0 comments on commit 9f88ecd

Please sign in to comment.