From e9a294b14ecd26a1d32a62c587a6918ff03d4fe8 Mon Sep 17 00:00:00 2001 From: Javad Date: Mon, 11 Nov 2024 08:50:04 +0330 Subject: [PATCH 1/4] chore: add build args for cross compilation --- Dockerfile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8785d8845..064ee80cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,20 @@ FROM golang:1.23.3-alpine3.19 as builder -RUN apk add --no-cache git gmp-dev build-base g++ openssl-dev -ADD . /pactus +WORKDIR /pactus -# Building pactus-daemon -RUN cd /pactus && \ - CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o ./build/pactus-daemon ./cmd/daemon && \ - CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o ./build/pactus-wallet ./cmd/wallet && \ - CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o ./build/pactus-shell ./cmd/shell +# Install dependencies +RUN apk add --no-cache git gmp-dev build-base openssl-dev +# Copy source code +COPY . . -## Copy binary files from builder into second container -FROM alpine:3.19 +# Build pactus-daemon, pactus-wallet, and pactus-shell +RUN GOOS={$TARGETOS} GOARCH={$TARGETARCH} CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o ./build/pactus-daemon ./cmd/daemon && \ + GOOS={$TARGETOS} GOARCH={$TARGETARCH} CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o ./build/pactus-wallet ./cmd/wallet && \ + GOOS={$TARGETOS} GOARCH={$TARGETARCH} CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o ./build/pactus-shell ./cmd/shell + +# Final stage +FROM alpine:${ALPINE_VERSION} COPY --from=builder /pactus/build/pactus-daemon /usr/bin COPY --from=builder /pactus/build/pactus-wallet /usr/bin From 17b7a04a53586d2c4d7cf2278a30fbcf78ebdcb6 Mon Sep 17 00:00:00 2001 From: Javad Date: Mon, 11 Nov 2024 22:43:35 +0330 Subject: [PATCH 2/4] fix: add reg image ja7adr to test --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6ff3d0a26..3d27a6dab 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -8,7 +8,7 @@ on: - main env: - REGISTRY_IMAGE: pactus/pactus + REGISTRY_IMAGE: ja7adr/pactus jobs: build: From ef39b114b0888d078098e9b55b75e0059ca66aac Mon Sep 17 00:00:00 2001 From: Javad Date: Wed, 20 Nov 2024 10:57:56 +0330 Subject: [PATCH 3/4] fix: change icon last block height in gui --- cmd/gtk/assets/ui/widget_node.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/gtk/assets/ui/widget_node.ui b/cmd/gtk/assets/ui/widget_node.ui index 39b205ada..5380aee2b 100644 --- a/cmd/gtk/assets/ui/widget_node.ui +++ b/cmd/gtk/assets/ui/widget_node.ui @@ -100,7 +100,7 @@ start True True - 🥡 Last Block Height: + ⛓️ Last Block Height: 0 From 6d9bd989ea83bb815be37e30036a7fc58abdb4fe Mon Sep 17 00:00:00 2001 From: Javad Date: Sun, 24 Nov 2024 09:04:04 +0330 Subject: [PATCH 4/4] fix: revert changes docker ci --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3d27a6dab..6ff3d0a26 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -8,7 +8,7 @@ on: - main env: - REGISTRY_IMAGE: ja7adr/pactus + REGISTRY_IMAGE: pactus/pactus jobs: build: