Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to go 1.20 and newer protobuf builder to reduce v50 changeset #3811

Merged
merged 14 commits into from
Jun 13, 2023
Merged
10 changes: 5 additions & 5 deletions .github/workflows/capability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Capability Module
on:
pull_request:
paths:
- '.github/workflows/capability.yml'
- 'modules/capability/**'
- 'proto/capability/**'
- ".github/workflows/capability.yml"
- "modules/capability/**"
- "proto/capability/**"

jobs:
build:
Expand All @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
faddat marked this conversation as resolved.
Show resolved Hide resolved
- name: Build capability-module
run: |
cd modules/capability
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- name: Go Test
run: |
cd modules/capability
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-compatibility-workflow-call.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
workflow_call:
inputs:
test-file-directory:
description: 'Directory containing compatibility matrices'
description: "Directory containing compatibility matrices"
required: true
type: string
test-suite:
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
repository: cosmos/ibc-go
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- name: Run e2e Test
run: |
cd e2e
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- id: set-matrix
run: echo "matrix=$(go run cmd/build_test_matrix/main.go)" >> $GITHUB_OUTPUT
env:
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- name: Run e2e Test
run: |
cd e2e
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test-workflow-call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
repository: cosmos/ibc-go
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- id: set-matrix
run: echo "matrix=$(go run cmd/build_test_matrix/main.go)" >> $GITHUB_OUTPUT
env:
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
repository: cosmos/ibc-go
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- name: Run e2e Test
id: e2e_test
run: |
Expand Down
126 changes: 63 additions & 63 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,68 +15,68 @@ on:
- "LICENSE"

jobs:
# determine-image-tag will either output the PR number e.g. pr-1234 or the string main.
# this will be used to tag the images that are built during the workflow.
determine-image-tag:
if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
outputs:
simd-tag: ${{ steps.get-tag.outputs.simd-tag }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.18
- id: get-tag
run: |
if [ -z "${{ github.event.pull_request.number }}" ]
then
echo "simd-tag=main" >> $GITHUB_OUTPUT
else
tag="pr-${{ github.event.pull_request.number }}"
echo "Using tag $tag"
echo "simd-tag=$tag" >> $GITHUB_OUTPUT
fi
# determine-image-tag will either output the PR number e.g. pr-1234 or the string main.
# this will be used to tag the images that are built during the workflow.
determine-image-tag:
if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
outputs:
simd-tag: ${{ steps.get-tag.outputs.simd-tag }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- id: get-tag
run: |
if [ -z "${{ github.event.pull_request.number }}" ]
then
echo "simd-tag=main" >> $GITHUB_OUTPUT
else
tag="pr-${{ github.event.pull_request.number }}"
echo "Using tag $tag"
echo "simd-tag=$tag" >> $GITHUB_OUTPUT
fi

# build-e2e ensures that all test code compiles.
build-e2e:
if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Build e2e
run: |
cd e2e
find ./tests -type d | while IFS= read -r dir
do
if ls "${dir}"/*.go >/dev/null 2>&1; then
GOARCH=arm64 go test -c "$dir" 2>/dev/null
fi
done
# build-e2e ensures that all test code compiles.
build-e2e:
if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Build e2e
run: |
cd e2e
find ./tests -type d | while IFS= read -r dir
do
if ls "${dir}"/*.go >/dev/null 2>&1; then
GOARCH=arm64 go test -c "$dir" 2>/dev/null
fi
done

e2e:
# we will be running this job if the PR has not yet been marked for review, and we push additional changes.
# we skip the job in this case.
if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
needs:
- determine-image-tag # we are required to have a docker tag before we can build any images.
- build-e2e # don't attempt any tests unless the e2e code compiles successfully.
uses: ./.github/workflows/e2e-test-workflow-call.yml
# unless we explicitly tell the workflow to inherit secrets, required secrets such as GITHUB_TOKEN will not be
# provided to the workflow. This would cause privileged operations to fail.
secrets: inherit
with:
# with each test, we build an image from the current code.
build-and-push-docker-image: true
# if the test fails, we upload logs so that we can download them from the UI.
upload-logs: true
chain-image: ghcr.io/cosmos/ibc-go-simd
# with regular tests, both images are the same.
chain-a-tag: "${{ needs.determine-image-tag.outputs.simd-tag }}"
chain-b-tag: "${{ needs.determine-image-tag.outputs.simd-tag }}"
chain-binary: "simd"
# on regular PRs we won't run interchain account or upgrade tests.
test-exclusions: "TestInterTxTestSuite,TestIncentivizedInterTxTestSuite,TestUpgradeTestSuite"
e2e:
# we will be running this job if the PR has not yet been marked for review, and we push additional changes.
# we skip the job in this case.
if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
needs:
- determine-image-tag # we are required to have a docker tag before we can build any images.
- build-e2e # don't attempt any tests unless the e2e code compiles successfully.
uses: ./.github/workflows/e2e-test-workflow-call.yml
# unless we explicitly tell the workflow to inherit secrets, required secrets such as GITHUB_TOKEN will not be
# provided to the workflow. This would cause privileged operations to fail.
secrets: inherit
with:
# with each test, we build an image from the current code.
build-and-push-docker-image: true
# if the test fails, we upload logs so that we can download them from the UI.
upload-logs: true
chain-image: ghcr.io/cosmos/ibc-go-simd
# with regular tests, both images are the same.
chain-a-tag: "${{ needs.determine-image-tag.outputs.simd-tag }}"
chain-b-tag: "${{ needs.determine-image-tag.outputs.simd-tag }}"
chain-binary: "simd"
# on regular PRs we won't run interchain account or upgrade tests.
test-exclusions: "TestInterTxTestSuite,TestIncentivizedInterTxTestSuite,TestUpgradeTestSuite"
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.6.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: "1.20"

- name: Release
uses: goreleaser/goreleaser-action@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- name: Display go version
run: go version
- name: install tparse
Expand All @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19 as builder
FROM golang:1.20 as builder

ARG IBC_GO_VERSION

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ docs-lint-changed:
### Protobuf ###
###############################################################################

protoVer=0.11.6
protoVer=0.13.2
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

Expand Down
2 changes: 1 addition & 1 deletion e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/cosmos/ibc-go/e2e

go 1.19
go 1.20

require (
cosmossdk.io/errors v1.0.0-beta.7
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.19
go 1.20

module github.com/cosmos/ibc-go/v7

Expand Down