Skip to content

Commit

Permalink
deps: upgrade to go 1.20 and newer protobuf builder (#3811)
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat authored Jun 13, 2023
1 parent c1f737d commit 7893863
Show file tree
Hide file tree
Showing 12 changed files with 167 additions and 167 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/capability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ["amd64", "arm", "arm64"]
go-arch: ['amd64', 'arm', 'arm64']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'
- 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
18 changes: 9 additions & 9 deletions .github/workflows/e2e-compatibility-workflow-call.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
required: true
type: string
test-suite:
description: "Test suite to run"
description: 'Test suite to run'
required: true
type: string

Expand All @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: andstor/file-existence-action@v2
with:
files: ".github/compatibility-test-matrices/${{ inputs.test-file-directory }}/${{ inputs.test-suite }}.json"
files: '.github/compatibility-test-matrices/${{ inputs.test-file-directory }}/${{ inputs.test-suite }}.json'
- run: |
# use jq -c to compact the full json contents into a single line. This is required when using the json body
# to create the matrix in the following job.
Expand All @@ -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 All @@ -53,17 +53,17 @@ jobs:
# Note: this is significant as the standard behaviour when running e2es on PRs
# is that there is a set of env vars that are the same for each run. e.g. the same docker image is used
# for every test. With compatibility tests, each test may be running different combinations of images.
CHAIN_IMAGE: "${{ matrix.chain-image }}"
CHAIN_A_TAG: "${{ matrix.chain-a }}"
CHAIN_B_TAG: "${{ matrix.chain-b }}"
CHAIN_BINARY: "${{ matrix.chain-binary }}"
RELAYER_TYPE: "${{ matrix.relayer-type }}"
CHAIN_IMAGE: '${{ matrix.chain-image }}'
CHAIN_A_TAG: '${{ matrix.chain-a }}'
CHAIN_B_TAG: '${{ matrix.chain-b }}'
CHAIN_BINARY: '${{ matrix.chain-binary }}'
RELAYER_TYPE: '${{ matrix.relayer-type }}'
- name: Upload Diagnostics
uses: actions/upload-artifact@v3
# we only want to upload logs on test failures.
if: ${{ failure() }}
continue-on-error: true
with:
name: "${{ matrix.entrypoint }}-${{ matrix.test }}"
name: '${{ matrix.entrypoint }}-${{ matrix.test }}'
path: e2e/diagnostics
retention-days: 5
12 changes: 6 additions & 6 deletions .github/workflows/e2e-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
branches:
- main
paths-ignore:
- "docs/**"
- "**.md"
- "LICENSE"
- 'docs/**'
- '**.md'
- 'LICENSE'

jobs:
# dynamically build a matrix of test/test suite pairs to run
Expand All @@ -20,11 +20,11 @@ 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:
TEST_EXCLUSIONS: "TestInterTxTestSuite,TestIncentivizedInterTxTestSuite,TestUpgradeTestSuite"
TEST_EXCLUSIONS: 'TestInterTxTestSuite,TestIncentivizedInterTxTestSuite,TestUpgradeTestSuite'

e2e:
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
72 changes: 36 additions & 36 deletions .github/workflows/e2e-test-workflow-call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,68 @@ on:
workflow_call:
inputs:
test-entry-point:
description: "Test entry point"
description: 'Test entry point'
required: false
type: string
default: "" # empty string means run all tests
default: '' # empty string means run all tests
test:
description: "test name to run as standalone"
description: 'test name to run as standalone'
required: false
type: string
default: ""
default: ''
test-exclusions:
description: "Comma separated list of tests to skip"
description: 'Comma separated list of tests to skip'
required: false
type: string
default: "" # empty string means don't skip any test.
default: '' # empty string means don't skip any test.
chain-image:
description: "The image to use for chains"
description: 'The image to use for chains'
required: true
type: string
default: "ghcr.io/cosmos/ibc-go-simd"
default: 'ghcr.io/cosmos/ibc-go-simd'
chain-a-tag:
description: "The tag to use for chain A"
description: 'The tag to use for chain A'
required: true
type: string
default: main
chain-b-tag:
default: main
description: "The tag to use for chain B"
description: 'The tag to use for chain B'
required: true
type: string
chain-binary:
default: "simd"
description: "The chain binary"
default: 'simd'
description: 'The chain binary'
required: false
type: string
chain-upgrade-tag:
default: ""
description: "The image tag that the chain will be upgraded to"
default: ''
description: 'The image tag that the chain will be upgraded to'
required: false
type: string
# upgrade-plan-name is only required during upgrade tests, and is otherwise ignored.
upgrade-plan-name:
default: ""
description: "The upgrade plan name"
default: ''
description: 'The upgrade plan name'
required: false
type: string
relayer-type:
description: "The type of relayer to use"
description: 'The type of relayer to use'
required: false
default: "rly"
default: 'rly'
type: string
relayer-tag:
description: "The tag to use for the relayer"
description: 'The tag to use for the relayer'
required: false
default: "" # the tests themselves will choose a sensible default when unset.
default: '' # the tests themselves will choose a sensible default when unset.
type: string
build-and-push-docker-image:
description: "Flag to specify if the docker image should be built and pushed beforehand"
description: 'Flag to specify if the docker image should be built and pushed beforehand'
required: false
type: boolean
default: false
upload-logs:
description: "Specify flag to indicate that logs should be uploaded on failure"
description: 'Specify flag to indicate that logs should be uploaded on failure'
required: false
type: boolean
default: false
Expand Down Expand Up @@ -138,13 +138,13 @@ 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:
TEST_ENTRYPOINT: "${{ inputs.test-entry-point }}"
TEST_EXCLUSIONS: "${{ inputs.test-exclusions }}"
TEST_NAME: "${{ inputs.test }}"
TEST_ENTRYPOINT: '${{ inputs.test-entry-point }}'
TEST_EXCLUSIONS: '${{ inputs.test-exclusions }}'
TEST_NAME: '${{ inputs.test }}'

# e2e-tests runs the actual go test command to trigger the test.
# the tests themselves are configured via environment variables to specify
Expand All @@ -155,14 +155,14 @@ jobs:
- build-test-matrix
- docker-build
env:
CHAIN_IMAGE: "${{ inputs.chain-image }}"
CHAIN_A_TAG: "${{ inputs.chain-a-tag }}"
CHAIN_B_TAG: "${{ inputs.chain-b-tag }}"
RELAYER_TAG: "${{ inputs.relayer-tag }}"
RELAYER_TYPE: "${{ inputs.relayer-type }}"
CHAIN_BINARY: "${{ inputs.chain-binary }}"
CHAIN_UPGRADE_TAG: "${{ inputs.chain-upgrade-tag }}"
CHAIN_UPGRADE_PLAN: "${{ inputs.upgrade-plan-name }}"
CHAIN_IMAGE: '${{ inputs.chain-image }}'
CHAIN_A_TAG: '${{ inputs.chain-a-tag }}'
CHAIN_B_TAG: '${{ inputs.chain-b-tag }}'
RELAYER_TAG: '${{ inputs.relayer-tag }}'
RELAYER_TYPE: '${{ inputs.relayer-type }}'
CHAIN_BINARY: '${{ inputs.chain-binary }}'
CHAIN_UPGRADE_TAG: '${{ inputs.chain-upgrade-tag }}'
CHAIN_UPGRADE_PLAN: '${{ inputs.upgrade-plan-name }}'
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.build-test-matrix.outputs.matrix) }}
Expand All @@ -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 All @@ -183,6 +183,6 @@ jobs:
if: ${{ failure() && inputs.upload-logs }}
continue-on-error: true
with:
name: "${{ matrix.entrypoint }}-${{ matrix.test }}"
name: '${{ matrix.entrypoint }}-${{ matrix.test }}'
path: e2e/diagnostics
retention-days: 5
132 changes: 66 additions & 66 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,73 +10,73 @@ on:
# trigger workflow if PR is marked ready for review.
- ready_for_review
paths-ignore:
- "docs/**"
- "**.md"
- "LICENSE"
- 'docs/**'
- '**.md'
- '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'
Loading

0 comments on commit 7893863

Please sign in to comment.