Skip to content

Commit

Permalink
Merge branch 'main' into farhad/prevent-create-expired-client
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad-Shabani committed Aug 7, 2024
2 parents 2c6b8e8 + ccf6ce6 commit 5a283f8
Show file tree
Hide file tree
Showing 42 changed files with 3,373 additions and 198 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ibc-client-cw] Rename `path` to `merkle_path` in `cw-context` for verify
(non)membership ([\#1291](https://github.com/cosmos/ibc-rs/issues/1291))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [cosmwasm] Move CosmWasm implementations to a separate workspace under
`cosmwasm` directory to simplify dependency management and decouple `ibc-rs`
MSRV from `cosmwasm`. ([\#1295](https://github.com/cosmos/ibc-rs/issue/1295))
27 changes: 0 additions & 27 deletions .github/workflows/code-quality.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ on:
- .codecov.yaml
- .github/workflows/rust.yaml
- .github/workflows/coverage.yaml
- Cargo.toml
- '*.toml'
- ci/**
- cosmwasm/**
- ibc/**
- ibc-core/**
- ibc-apps/**
Expand All @@ -16,6 +17,7 @@ on:
- ibc-query/**
- ibc-testkit/**
- ibc-derive/**
- tests-integration/**
push:
branches:
- main
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/cw-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ on:
pull_request:
paths:
- .github/workflows/cw-check.yaml
- Cargo.toml
- '*.toml'
- Cargo.lock
- ci/cw-check/**
- ci/**
- ibc/**
- ibc-core/**
- ibc-apps/**
Expand Down Expand Up @@ -43,7 +42,7 @@ jobs:
-v "$(pwd)":/code \
-v "$(pwd)"/target:/target \
-v "${HOME}/.cargo/registry":/usr/local/cargo/registry \
cosmwasm/optimizer:0.15.1 ./ci/cw-check
cosmwasm/optimizer:0.16.0 ./ci/cw-check
- name: Fix permissions
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/no-std.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ on:
pull_request:
paths:
- .github/workflows/no-std.yaml
- Cargo.toml
- '*.toml'
- Cargo.lock
- ci/no-std-check/**
- ci/**
- ibc/**
- ibc-core/**
- ibc-apps/**
Expand Down
105 changes: 40 additions & 65 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ on:
pull_request:
paths:
- .github/workflows/rust.yaml
- Cargo.toml
- '*.toml'
- ci/**
- cosmwasm/**
- ibc/**
- ibc-core/**
- ibc-apps/**
Expand All @@ -14,6 +15,7 @@ on:
- ibc-query/**
- ibc-testkit/**
- ibc-derive/**
- tests-integration/**
push:
tags:
- v[0-9]+.*
Expand All @@ -34,105 +36,78 @@ env:
RUSTUP_MAX_RETRIES: 10

jobs:
check-features:
name: Check features
check-lints:
name: Check Lints
runs-on: ubuntu-latest
timeout-minutes: 60
env:
RIPGREP_VERSION: 14.1.0
FD_VERSION: 9.0.0
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Run cargo hack
run: make check-features

nightly_fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly # Since fmt uses unstable features for organizing imports
components: rustfmt
- uses: actions-rs/cargo@v1
- name: Install Rust nightly toolchain with rustfmt
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
command: fmt
args: --all -- --check

clippy_all_features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
toolchain: nightly
components: rustfmt
- name: Install Rust stable toolchain with clippy
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: clippy
components: clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets

clippy_no_default_features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Taplo
uses: baptiste0928/cargo-install@v3
with:
toolchain: stable
components: clippy
- uses: actions-rs/clippy-check@v1
crate: taplo-cli
- name: Run Lint Checks (fmt, clippy, taplo)
run: make lint
- name: Spell Check with Typos
uses: crate-ci/typos@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --no-default-features --lib
config: ./.github/typos.toml

doc_all_features:
check-docs:
name: Check Documentations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: doc
args: --all-features --release
components: rust-docs
- name: Run cargo docs
run: make check-docs

doc_no_default_features:
check-features:
name: Check Features
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: doc
args: --no-default-features --release
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Run cargo hack
run: make check-features

test-stable:
tests:
name: Run Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast --no-run
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast --workspace -- --nocapture
- uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --no-fail-fast --no-run
- name: Run cargo test
run: make test

test-msrv:
name: Test MSRV for `ibc` libraries
timeout-minutes: 30
env:
CARGO_MSRV_VERSION: 0.16.0-beta.23
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/upload-cw-clients.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,25 @@ on:
paths:
- .github/workflows/upload-cw-clients.yaml
- Cargo.toml
- ci/**
- cosmwasm/**
- ibc/**
- ibc-core/**
- ibc-apps/**
- ibc-data-types/**
- ibc-clients/**
- ibc-primitives/**
- ibc-query/**
- ibc-testkit/**
- ibc-derive/**
push:
branches: main
paths:
- .github/workflows/upload-cw-clients.yaml
- Cargo.toml
- ci/**
- cosmwasm/**
- ibc/**
- ibc-core/**
- ibc-apps/**
- ibc-data-types/**
- ibc-clients/**
- ibc-primitives/**
- ibc-query/**
- ibc-testkit/**
- ibc-derive/**

Expand All @@ -43,11 +39,6 @@ jobs:

- uses: actions-rust-lang/setup-rust-toolchain@v1

# `cosmwasm/optimizer` requires `Cargo.lock`. but currently,
# `Cargo.lock` is not committed, because `ibc-rs` is treated as library.
- name: Produce `Cargo.lock` file
run: cargo update -p ibc-client-tendermint-cw

- name: Create mount directories
run: mkdir -p "${HOME}/.cargo/registry" "$(pwd)"/target

Expand All @@ -57,7 +48,7 @@ jobs:
-v "$(pwd)":/code \
-v "$(pwd)"/target:/target \
-v "${HOME}/.cargo/registry":/usr/local/cargo/registry \
cosmwasm/optimizer:0.16.0 ./ibc-clients/ics07-tendermint/cw-contract
cosmwasm/optimizer:0.16.0 ./cosmwasm/ibc-clients/ics07-tendermint
- name: Fix permissions
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mc.log
/Cargo.lock

# Ignore CosmWasm artifacts
/cw-contracts
cw-contracts/

# Ignore dotenv
.env
13 changes: 2 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ members = [
"ibc-clients/ics07-tendermint/types",
"ibc-clients/ics07-tendermint",
"ibc-clients/ics08-wasm/types",
"ibc-clients/cw-context",
"ibc-clients/ics07-tendermint/cw-contract",
"ibc-clients",
"ibc-apps/ics20-transfer/types",
"ibc-apps/ics20-transfer",
Expand Down Expand Up @@ -87,9 +85,8 @@ ibc-core-handler = { version = "0.53.0", path = "./ibc-core/ics25-handler", d
ibc-core-router = { version = "0.53.0", path = "./ibc-core/ics26-routing", default-features = false }
ibc-query = { version = "0.53.0", path = "./ibc-query", default-features = false }

ibc-client-cw = { version = "0.53.0", path = "./ibc-clients/cw-context", default-features = false }
ibc-client-tendermint = { version = "0.53.0", path = "./ibc-clients/ics07-tendermint", default-features = false }
ibc-client-tendermint-cw = { version = "0.53.0", path = "./ibc-clients/ics07-tendermint/cw-contract", default-features = false }
ibc-client-cw = { version = "0.53.0", path = "./ibc-clients/cw-context", default-features = false }
ibc-client-tendermint = { version = "0.53.0", path = "./ibc-clients/ics07-tendermint", default-features = false }

ibc-app-transfer = { version = "0.53.0", path = "./ibc-apps/ics20-transfer", default-features = false }
ibc-app-nft-transfer = { version = "0.53.0", path = "./ibc-apps/ics721-nft-transfer", default-features = false }
Expand Down Expand Up @@ -118,12 +115,6 @@ tendermint-proto = { version = "0.37.0", default-features = fals
tendermint-rpc = { version = "0.37.0", default-features = false }
tendermint-testgen = { version = "0.37.0", default-features = false }

# cosmwasm dependencies
cosmwasm-schema = { version = "2.1.0" }
cosmwasm-std = { version = "2.1.0" }
cosmwasm-vm = { version = "2.1.0" }
cw-storage-plus = { version = "2.0.0" }

# parity dependencies
parity-scale-codec = { version = "3.6.12", default-features = false, features = [ "derive" ] }
scale-info = { version = "2.11.3", default-features = false }
Loading

0 comments on commit 5a283f8

Please sign in to comment.