Skip to content

Commit

Permalink
[CORE-538] Upgrade to go1.21 in preparation of Cosmos 0.50 (#586)
Browse files Browse the repository at this point in the history
* [CORE-538] Upgrade to go1.21 in preparation of Cosmos 0.50
  • Loading branch information
lcwik authored Oct 12, 2023
1 parent 06e009a commit 8fecaed
Show file tree
Hide file tree
Showing 11 changed files with 382 additions and 296 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/protocol-container-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
- name: Build images
run: DOCKER_BUILDKIT=1 make test-container-build
- name: Run container tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protocol-exchange-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
name: Setup Golang
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
-
name: Display go version
run: go version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protocol-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
- name: Run golangci-lint
run: make lint
2 changes: 1 addition & 1 deletion .github/workflows/protocol-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: install go
uses: actions/setup-go@v3
with:
go-version: '1.19'
go-version: '1.21'
check-latest: true
- name: Create Directory
run: mkdir ./build
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/protocol-sim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
- name: Display go version
run: go version
- run: make build
Expand All @@ -39,7 +39,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
- name: Display go version
run: go version
- name: Install runsim
Expand All @@ -59,7 +59,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
- name: Display go version
run: go version
- uses: actions/[email protected]
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
- name: Display go version
run: go version
- uses: actions/[email protected]
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
- name: Display go version
run: go version
- uses: actions/[email protected]
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
- name: Display go version
run: go version
- uses: actions/[email protected]
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/protocol-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
name: Setup Golang
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
-
name: Ensure `go.mod` is up to date
run: go mod tidy && git diff --exit-code
Expand All @@ -52,7 +52,7 @@ jobs:
name: Setup Golang
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
-
name: Ensure `go.mod` is up to date
run: go mod tidy && git diff --exit-code
Expand All @@ -69,7 +69,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
- uses: actions/checkout@v3
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
- name: start localnet
run: |
DOCKER_BUILDKIT=1 make localnet-startd
Expand Down
2 changes: 1 addition & 1 deletion protocol/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: install go
uses: actions/setup-go@v3
with:
go-version: '1.19'
go-version: '1.21'
check-latest: true
- name: Create Directory
run: mkdir ./build
Expand Down
8 changes: 4 additions & 4 deletions protocol/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NB: This is a digest for a multi-arch manifest list, you will want to get this by running
# `docker buildx imagetools inspect golang:1.19-alpine`
ARG GOLANG_1_19_ALPINE_DIGEST="4147c2ad24a347e53a8a361b663dcf82fca4157a3f9a5136d696a4e53dd22b65"
# `docker buildx imagetools inspect golang:1.21-alpine`
ARG GOLANG_1_21_ALPINE_DIGEST="926f7f7e1ab8509b4e91d5ec6d5916ebb45155b0c8920291ba9f361d65385806"

# This Dockerfile is a stateless build of the `dydxprotocold` binary as a Docker container.
# It does not include any configuration, state, or genesis information.
Expand All @@ -9,7 +9,7 @@ ARG GOLANG_1_19_ALPINE_DIGEST="4147c2ad24a347e53a8a361b663dcf82fca4157a3f9a5136d
# Builder
# --------------------------------------------------------

FROM golang@sha256:${GOLANG_1_19_ALPINE_DIGEST} as builder
FROM golang@sha256:${GOLANG_1_21_ALPINE_DIGEST} as builder
ARG VERSION
ARG COMMIT

Expand Down Expand Up @@ -45,7 +45,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
# Runner
# --------------------------------------------------------

FROM golang@sha256:${GOLANG_1_19_ALPINE_DIGEST}
FROM golang@sha256:${GOLANG_1_21_ALPINE_DIGEST}

RUN apk add --no-cache bash

Expand Down
2 changes: 1 addition & 1 deletion protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TODO(CORE-512): add info/resources around V4. [Doc](https://www.notion.so/dydx/V

### Installation

1. Install Go `1.19` [here](https://go.dev/dl/).
1. Install Go `1.21` [here](https://go.dev/dl/).
2. Install Docker Desktop [here](https://www.docker.com/products/docker-desktop/)
3. Run `make install` to install project dependencies.

Expand Down
Loading

0 comments on commit 8fecaed

Please sign in to comment.