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

Update v0.47 migration to v2 compatible #267

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions .github/workflows/ci-v47-migration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: ci
on:
push:
branches: [ v0.47-migration-v2 ]
pull_request:
branches: [ v0.47-migration-v2 ]
schedule:
- cron: '0 1 * * 1' # At 01:00 on Monday
workflow_dispatch:

jobs:
ci:
strategy:
fail-fast: false
matrix:
ci_step: [
"lint",
"test",
"integration tests coreum-modules",
# "integration tests coreum-ibc", FIXME(v47-restore CI)
# "integration tests coreum-upgrade",
"integration tests faucet",
]
include:
- ci_step: "lint"
command: "crust lint/crust"
go-cache: true
wasm-cache: false
linter-cache: true
docker-cache: false
- ci_step: "test"
command: "crust test/crust"
go-cache: true
wasm-cache: false
linter-cache: false
docker-cache: false
- ci_step: "integration tests coreum-modules"
command: "crust build/integration-tests/coreum/modules images && crust znet test --test-groups=coreum-modules --timeout-commit 0.5s"
go-cache: true
wasm-cache: true
linter-cache: false
docker-cache: true
# - ci_step: "integration tests coreum-ibc" FIXME(v47-restore CI)
# command: "crust build/integration-tests/coreum/ibc images && crust znet test --test-groups=coreum-ibc --timeout-commit 1s"
# go-cache: true
# wasm-cache: false
# linter-cache: false
# docker-cache: true
# - ci_step: "integration tests coreum-upgrade"
# command: "crust build/integration-tests/coreum/upgrade build/integration-tests/coreum/modules build/integration-tests/coreum/ibc images && crust znet test --cored-version=v1.0.0 --test-groups=coreum-upgrade,coreum-modules,coreum-ibc --timeout-commit 1s"
# go-cache: true
# wasm-cache: true
# linter-cache: false
# docker-cache: true
- ci_step: "integration tests faucet"
command: "crust build/integration-tests/faucet images && crust znet test --test-groups=faucet --timeout-commit 1s"
go-cache: true
wasm-cache: false
linter-cache: false
docker-cache: true

runs-on: ubuntu-22.04
steps:
- name: Go version used to build crust tool
run: go version
- name: Checkout crust
uses: actions/checkout@v3
with:
persist-credentials: false
path: crust
- name: Checkout coreum
uses: actions/checkout@v3
with:
repository: CoreumFoundation/coreum
path: coreum
ref: v0.47-migration-v2
- name: Checkout faucet
uses: actions/checkout@v3
with:
repository: CoreumFoundation/faucet
path: faucet
- name: Set up crust
run: echo "$(pwd)/crust/bin" >> $GITHUB_PATH
- name: Setup go cache
uses: actions/cache@v3
if: ${{ matrix.go-cache }}
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Setup WASM cache
uses: actions/cache@v3
if: ${{ matrix.wasm-cache }}
with:
path: ~/.cache/crust/wasm
key: ${{ runner.os }}-wasm-cache-${{ hashFiles('**/Cargo.lock') }}
- name: Setup linter cache
uses: actions/cache@v3
if: ${{ matrix.linter-cache }}
with:
path: ~/.cache/golangci-lint
key: ${{ runner.os }}-linter-cache
- name: Get Date
id: get-year-week
run: |
echo "date=$(/bin/date -u "+%Y-%U")" >> $GITHUB_OUTPUT
shell: bash
- name: Set docker cache
uses: satackey/[email protected]
if: ${{ matrix.docker-cache }}
continue-on-error: true
with:
key: ${{ runner.os }}-docker-v2-${{ steps.get-year-week.outputs.date }} # year-week key
- name: Set crust binaries cache
uses: actions/cache@v3
continue-on-error: true
with:
path: ~/.cache/crust/bin
key: ${{ runner.os }}-bin-${{ steps.get-year-week.outputs.date }} # year-week key
- name: Run ${{ matrix.ci_step }}
run: ${{ matrix.command }}
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
3 changes: 2 additions & 1 deletion build/coreum/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ func Tidy(ctx context.Context, deps build.DepsFunc) error {

// Lint lints coreum repo.
func Lint(ctx context.Context, deps build.DepsFunc) error {
deps(ensureRepo, Generate, CompileAllSmartContracts)
// FIXME(v47-generators) fix generator and add Generate to lint
deps(ensureRepo, CompileAllSmartContracts)
return golang.Lint(ctx, repoPath, deps)
}

Expand Down
16 changes: 5 additions & 11 deletions build/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@ module github.com/CoreumFoundation/crust/build
// Build tool installs newer go, but the tool itself must be built using a preexisting version.
go 1.19

replace (
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.26
google.golang.org/grpc => google.golang.org/grpc v1.33.2
)

require (
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20230627094203-821c6a4eebab
github.com/CoreumFoundation/coreum/v2 v2.0.0
github.com/CoreumFoundation/coreum/v2 v2.0.3-0.20230810074019-b41dba895971
github.com/pkg/errors v0.9.1
github.com/samber/lo v1.37.0
github.com/stretchr/testify v1.8.1
github.com/samber/lo v1.38.1
github.com/stretchr/testify v1.8.4
go.uber.org/zap v1.23.0
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
golang.org/x/mod v0.6.0
)

require (
Expand All @@ -27,6 +21,6 @@ require (
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/goleak v1.1.12 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
29 changes: 12 additions & 17 deletions build/go.sum
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20230627094203-821c6a4eebab h1:XPcSzlQ06tor/py1LkEM9FX70LIeDWB++vLuAO6eAYI=
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20230627094203-821c6a4eebab/go.mod h1:VD93vCHkxYaT/RhOesXTFgd/GQDW54tr0BqGi5JU1c0=
github.com/CoreumFoundation/coreum/v2 v2.0.0 h1:0CZk5olLsOowc0s5C3ab5LzVrKRg9bjmNN8BsHZVGGw=
github.com/CoreumFoundation/coreum/v2 v2.0.0/go.mod h1:RQEqopi/udeg5GuvzwKQCm4WCuX6JkPqFgrCRYsR5ws=
github.com/CoreumFoundation/coreum/v2 v2.0.3-0.20230810074019-b41dba895971 h1:yJN1IGXinoiEAkAIz/8hCGynONkUkp+F2f0U1L2+OFw=
github.com/CoreumFoundation/coreum/v2 v2.0.3-0.20230810074019-b41dba895971/go.mod h1:MzFJLuwpp1bXxPzVJzjpOOe4hsGi5ZVoFk9DpsaLQ4g=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
Expand All @@ -47,12 +42,12 @@ go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY=
go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg=
golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU=
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I=
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand Down
26 changes: 13 additions & 13 deletions build/tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,22 @@ var tools = map[Name]Tool{
},

// https://github.com/ignite/cli/releases/
// v0.23.0 is the last version based on Cosmos v0.45.x
// v0.27.1 is the last version based on Cosmos v0.47.x
Ignite: {
Version: "0.23.0",
Version: "0.27.1",
Local: true,
Sources: Sources{
PlatformLinuxAMD64: {
URL: "https://github.com/ignite/cli/releases/download/v0.23.0/ignite_0.23.0_linux_amd64.tar.gz",
Hash: "sha256:915a96eb366fbf9c353af32d0ddb01796a30b86343ac77d613cc8a8af3dd395a",
URL: "https://github.com/ignite/cli/releases/download/v0.27.1/ignite_0.27.1_linux_amd64.tar.gz",
Hash: "sha256:040a898521d1bd7d6521d2d85151ae8c8821c19492a8c0d0cb21c5cddcf56df0",
},
PlatformDarwinAMD64: {
URL: "https://github.com/ignite/cli/releases/download/v0.23.0/ignite_0.23.0_darwin_amd64.tar.gz",
Hash: "sha256:b9ca67a70f4d1b43609c4289a7e83dc2174754d35f30fb43f1518c0434361c4e",
URL: "https://github.com/ignite/cli/releases/download/v0.27.1/ignite_0.27.1_darwin_amd64.tar.gz",
Hash: "sha256:e836ff1a854594cdb9a1c6fc13fff057eaf364da97a1cbeb1fa24285036eb131",
},
PlatformDarwinARM64: {
URL: "https://github.com/ignite/cli/releases/download/v0.23.0/ignite_0.23.0_darwin_arm64.tar.gz",
Hash: "sha256:daefd4ac83e3bb384cf97a2ff8cc6e81427f74e2c81c567fd0507fce647146ec",
URL: "https://github.com/ignite/cli/releases/download/v0.27.1/ignite_0.27.1_darwin_arm64.tar.gz",
Hash: "sha256:376f1a25d134b1f7a8fc31d58f4185fca50a81efbfd57e041d435fb2ee2ee6ed",
},
},
Binaries: map[string]string{
Expand Down Expand Up @@ -142,18 +142,18 @@ var tools = map[Name]Tool{
// https://github.com/CosmWasm/wasmvm/releases
// Check compatibility with wasmd beore upgrading: https://github.com/CosmWasm/wasmd
LibWASMMuslC: {
Version: "v1.1.2",
Version: "v1.3.0",
Sources: Sources{
PlatformDockerAMD64: {
URL: "https://github.com/CosmWasm/wasmvm/releases/download/v1.1.2/libwasmvm_muslc.x86_64.a",
Hash: "sha256:e0a0955815a23c139d42781f1cc70beffa916aa74fe649e5c69ee7e95ff13b6b",
URL: "https://github.com/CosmWasm/wasmvm/releases/download/v1.3.0/libwasmvm_muslc.x86_64.a",
Hash: "sha256:b4aad4480f9b4c46635b4943beedbb72c929eab1d1b9467fe3b43e6dbf617e32",
Binaries: map[string]string{
"lib/libwasmvm_muslc.a": "libwasmvm_muslc.x86_64.a",
},
},
PlatformDockerARM64: {
URL: "https://github.com/CosmWasm/wasmvm/releases/download/v1.1.2/libwasmvm_muslc.aarch64.a",
Hash: "sha256:77b41e65f6c3327d910a7f9284538570727e380ab49bc3c88c8d4053811d5209",
URL: "https://github.com/CosmWasm/wasmvm/releases/download/v1.3.0/libwasmvm_muslc.aarch64.a",
Hash: "sha256:b1610f9c8ad8bdebf5b8f819f71d238466f83521c74a2deb799078932e862722",
Binaries: map[string]string{
"lib/libwasmvm_muslc.a": "libwasmvm_muslc.aarch64.a",
},
Expand Down
Loading
Loading