diff --git a/.github/workflows/sei-build.yml b/.github/workflows/sei-build.yml index cfda66f..29a4c49 100644 --- a/.github/workflows/sei-build.yml +++ b/.github/workflows/sei-build.yml @@ -63,6 +63,7 @@ jobs: repo_tag: "1.0.6beta" - version: "2.0.34beta" repo_tag: "2.0.34beta-atlantic-2" + go_version: "1.18" - version: "2.0.37beta" repo_tag: "2.0.37beta" - version: "2.0.39beta" diff --git a/alpine.Dockerfile b/alpine.Dockerfile index bab0636..fe57f9f 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -4,8 +4,8 @@ ARG GO_VERSION="1.20" FROM golang:${GO_VERSION}-alpine as base # NOTE: add libusb-dev to run with LEDGER_ENABLED=true -RUN set -eu &&\ - apk update &&\ +RUN set -eu && \ + apk update && \ apk add --no-cache \ ca-certificates \ linux-headers \ @@ -65,6 +65,7 @@ ARG BUILD_TAGS="netgo,ledger,muslc" ARG BUILD_TAGS="" ARG LDFLAGS='-w -s -linkmode external -extldflags "-Wl,-z,muldefs -static"' #ARG LDFLAGS="-extldflags '-L/go/src/mimalloc/build -lmimalloc -Wl,-z,muldefs -static'" +ARG CHECK_STATICALLY="true" ENV APP_NAME=${APP_NAME} \ BUILD_COMMAND=${BUILD_COMMAND} \ @@ -85,8 +86,10 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ # verify static binary RUN set -x && \ file ${GOPATH}/bin/${BIN_NAME} && \ - echo "Ensuring binary is statically linked ..." && \ - (file ${GOPATH}/bin/${BIN_NAME} | grep "statically linked") + if [ "${CHECK_STATICALLY}" = "true" ]; then \ + echo "Ensuring binary is statically linked ..." && \ + (file ${GOPATH}/bin/${BIN_NAME} | grep "statically linked"); \ + fi ################################################################################ FROM --platform=${BUILDPLATFORM} alpine:latest as prod diff --git a/builds/sei.1.0.6beta.alpine.sh b/builds/sei.1.0.6beta.alpine.sh deleted file mode 100755 index 2ed5822..0000000 --- a/builds/sei.1.0.6beta.alpine.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -x - -BASEDIR=$(dirname "$0") -DOCKER_DIR="${BASEDIR}/.." -IMAGE="alpine" -NAME="sei" -REPO="sei-protocol/sei-chain" -TAG="1.0.6beta" -GO_VERSION="1.19" - -cd "${DOCKER_DIR}" -docker buildx build "." -f "${IMAGE}.Dockerfile" \ - --load \ - --progress plain \ - --tag "terraformlabs/${NAME}:${TAG}" \ - --platform "linux/amd64" \ - --build-arg "OS=linux" \ - --build-arg "ARCH=amd64" \ - --build-arg "APP_NAME=${NAME}" \ - --build-arg "BIN_NAME=${NAME}d" \ - --build-arg "BUILD_COMMAND=make install" \ - --build-arg "BUILD_TAGS=netgo ledger muslc" \ - --build-arg "COSMOS_BUILD_OPTIONS=" \ - --build-arg "GIT_TAG=${TAG}" \ - --build-arg "GIT_REPO=${REPO}" \ - --build-arg "GO_VERSION=${GO_VERSION}" \ - --build-arg "MIMALLOC_VERSION=" \ - --build-arg "LDFLAGS=-w -s -linkmode=external -extldflags \"-Wl,-z,muldefs -static\"" \ - $@