Skip to content

Commit

Permalink
Merge pull request #5 from FirmaChain/v0.4.0-release
Browse files Browse the repository at this point in the history
v0.4.0 release
  • Loading branch information
haryunio authored Dec 5, 2024
2 parents ac86456 + 22338e7 commit e2ab40a
Show file tree
Hide file tree
Showing 59 changed files with 2,021 additions and 1,793 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.21

- name: Build
run: go build -v ./...
Expand All @@ -31,7 +31,10 @@ jobs:
uses: golangci/[email protected]

- name: codecov-action
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.txt
fail_ci_if_error: true # optional (default = false)
fail_ci_if_error: false # optional (default = false)

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ EXPOSE 1317 9090 26656 26657

# Run firmachind by default
# ex) docker run firmachain
CMD ["/usr/local/bin/firmachaind"]
CMD ["/usr/local/bin/firmachaind"]
9 changes: 9 additions & 0 deletions Dockerfile.proto-gen
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM tendermintdev/sdk-proto-gen:v0.7

ENV GOLANG_VERSION=1.21.0
ENV PATH=/usr/local/go/bin:$PATH

RUN wget -q "https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz" && \
tar -C /usr/local -xzf "go${GOLANG_VERSION}.linux-amd64.tar.gz" && \
rm "go${GOLANG_VERSION}.linux-amd64.tar.gz" && \
go version
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,32 @@ go.sum: go.mod

test:
@go test -mod=readonly $(PACKAGES)

###############################################################################
### Proto ###
###############################################################################

# Variables for the image and version
protoVer=v0.7
protoImageName=tendermintdev/sdk-proto-gen-go-1.21-image
GOLANG_VERSION=1.21.0
containerProtoGen=firmachain-proto-gen-$(protoVer)-go-${GOLANG_VERSION}

# Target to build the image if it doesn't exist
build-proto-image:
@if [ -z "$$(docker images -q $(protoImageName))" ]; then \
echo "Building Docker image with Go $(GOLANG_VERSION)..."; \
docker build -t $(protoImageName) -f Dockerfile.proto-gen .; \
else \
echo "Image $(protoImageName) already exists."; \
fi

# Generate Protobuf files using the image
proto-gen: build-proto-image
@echo "Generating Protobuf files..."
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then \
docker start -a $(containerProtoGen); \
else \
docker run --name $(containerProtoGen) -v $(CURDIR):/firmachain --workdir /firmachain $(protoImageName) \
sh ./scripts/protocgen.sh; \
fi
Loading

0 comments on commit e2ab40a

Please sign in to comment.