Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fish-sammy authored Sep 27, 2024
2 parents f93dbcd + 29bb3e9 commit decb2a6
Show file tree
Hide file tree
Showing 25 changed files with 128 additions and 159 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docker-image-and-binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
go-version:
- 1.21
- 1.23
os: [ubuntu-22.04, macos-latest]
arch: [amd64, arm64]
exclude:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-go-generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v2
with:
go-version: 1.21
go-version: 1.23

- name: Install Python
uses: actions/setup-python@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-internal-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v2
with:
go-version: 1.21
go-version: 1.23

- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-proto-generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v2
with:
go-version: 1.21
go-version: 1.23

- name: Checkout code
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v2
with:
go-version: 1.21
go-version: 1.23

- name: Checkout code
uses: actions/checkout@v4

- name: Install golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/[email protected]
run: make prereqs

- name: Go Lint
run: make lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v4
with:
go-version: 1.21
go-version: 1.23

- name: Run test and coverage
run: |
Expand Down
30 changes: 22 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
# syntax=docker/dockerfile:experimental

FROM golang:1.21-alpine3.18 as build
FROM alpine:3.18 as build

ARG GO_VERSION=1.23.1
ARG ARCH=x86_64
ARG WASM=true
ARG IBC_WASM_HOOKS=false

# Install necessary packages
RUN apk add --no-cache --update \
ca-certificates \
git \
make \
build-base \
linux-headers
curl \
git \
make \
tar \
build-base \
ca-certificates \
linux-headers

# Download and install Go
RUN curl -fsSL https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz -o golang.tar.gz \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz

# Set Go paths
ENV GOROOT=/usr/local/go
ENV GOPATH=/go
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH

WORKDIR axelar

Expand All @@ -31,14 +45,14 @@ RUN if [[ "${WASM}" == "true" ]]; then \

COPY . .

RUN make MUSLC="${WASM}" WASM="${WASM}" IBC_WASM_HOOKS="${IBC_WASM_HOOKS}" build
RUN make ARCH="${ARCH}" MUSLC="${WASM}" WASM="${WASM}" IBC_WASM_HOOKS="${IBC_WASM_HOOKS}" build

FROM alpine:3.18

ARG USER_ID=1000
ARG GROUP_ID=1001
RUN apk add --no-cache jq bash
COPY --from=build /go/axelar/bin/* /usr/local/bin/
COPY --from=build /axelar/bin/* /usr/local/bin/
RUN addgroup -S -g ${GROUP_ID} axelard && adduser -S -u ${USER_ID} axelard -G axelard
USER axelard
COPY ./entrypoint.sh /entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.binaries
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21
FROM golang:1.23

RUN apt update && apt install \
ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:experimental

FROM golang:1.21 as debug
FROM golang:1.23 as debug
RUN groupadd -r -g 1001 axelard && useradd -m -r -u 1000 -g axelard axelard

WORKDIR /axelar
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile.protocgen
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

FROM tendermintdev/sdk-proto-gen:v0.2 as build

# Remove the outdated Go installation
RUN rm -rf /usr/local/go

COPY --from=golang:1.23-alpine /usr/local/go/ /usr/local/go/

RUN apk add --no-cache --update \
git \
ca-certificates \
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ docker-image-debug:
# Install all generate prerequisites
.Phony: prereqs
prereqs:
@which goimports &>/dev/null || go install golang.org/x/tools/cmd/goimports
@which stringer &>/dev/null || go install golang.org/x/tools/cmd/stringer
@which moq &>/dev/null || go install github.com/matryer/moq
@which statik &>/dev/null || go install github.com/rakyll/statik
@which mdformat &>/dev/null || pip3 install mdformat
@which protoc &>/dev/null || echo "Please install protoc for grpc (https://grpc.io/docs/languages/go/quickstart/)"
@which golangci-lint &>/dev/null || go install github.com/golangci/golangci-lint/cmd/[email protected]
go install golang.org/x/tools/cmd/goimports
go install golang.org/x/tools/cmd/stringer
go install github.com/matryer/moq
go install github.com/rakyll/statik
go install github.com/golangci/golangci-lint/cmd/[email protected]

# Run all the code generators in the project
.PHONY: generate
Expand Down
36 changes: 18 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/axelarnetwork/axelar-core

go 1.21
go 1.23

require (
github.com/CosmWasm/wasmd v0.33.0
Expand All @@ -11,36 +11,35 @@ require (
github.com/btcsuite/btcd/btcec/v2 v2.3.2
github.com/cosmos/cosmos-sdk v0.45.16
github.com/cosmos/ibc-go/v4 v4.6.0
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
github.com/ethereum/go-ethereum v1.10.26
github.com/go-errors/errors v1.4.2
github.com/go-errors/errors v1.5.1
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.3
github.com/gorilla/mux v1.8.0
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/matryer/moq v0.3.4
github.com/miguelmota/go-ethereum-hdwallet v0.1.1
github.com/matryer/moq v0.5.0
github.com/miguelmota/go-ethereum-hdwallet v0.1.2
github.com/mitchellh/mapstructure v1.5.0
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.5
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.15.0
github.com/rakyll/statik v0.1.7
github.com/regen-network/cosmos-proto v0.3.1
github.com/rs/zerolog v1.29.1
github.com/spf13/cast v1.5.1
github.com/rs/zerolog v1.33.0
github.com/spf13/cast v1.7.0
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.15.0
github.com/stoewer/go-strcase v1.3.0
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.9.0
github.com/tendermint/tendermint v0.34.27
github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b
golang.org/x/crypto v0.25.0
golang.org/x/crypto v0.27.0
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1
golang.org/x/mod v0.19.0
golang.org/x/sync v0.7.0
golang.org/x/text v0.16.0
golang.org/x/tools v0.23.0
golang.org/x/mod v0.21.0
golang.org/x/sync v0.8.0
golang.org/x/text v0.18.0
golang.org/x/tools v0.25.0
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529
google.golang.org/grpc v1.58.3
Expand Down Expand Up @@ -86,6 +85,7 @@ require (
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set v1.8.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
github.com/dgraph-io/badger/v3 v3.2103.2 // indirect
Expand Down Expand Up @@ -135,7 +135,7 @@ require (
github.com/linxGnu/grocksdb v1.7.10 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
Expand Down Expand Up @@ -171,9 +171,9 @@ require (
github.com/zondax/ledger-go v0.14.1 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.24.0 // indirect
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading

0 comments on commit decb2a6

Please sign in to comment.