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

chore: miscellaneous repository maintenance #1174

Merged
merged 29 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
964c43d
use renamed branch
rnbguy Apr 18, 2024
77dcf9a
conventionalcommits-org is down
rnbguy Apr 18, 2024
41323ec
add missing changelog entry
rnbguy Apr 18, 2024
30d16e7
rename to Makefile
rnbguy Apr 18, 2024
b74003a
use native concurrency option
rnbguy Apr 18, 2024
265e2aa
upgrade substrate deps
rnbguy Apr 18, 2024
f23ffa2
remove redundant nix use
rnbguy Apr 18, 2024
77384e8
correct cw-check workflow file
rnbguy Apr 18, 2024
8949347
use yml extension over yml
rnbguy Apr 18, 2024
2fb268b
delete nix script
rnbguy Apr 18, 2024
ce75f5b
rm merge group trigger and always trigger on main
rnbguy Apr 19, 2024
cbde77a
rm md link check from main
rnbguy Apr 19, 2024
9b3a129
forbid concurrent runs for cw and no-std checks
rnbguy Apr 19, 2024
d75b1c5
nit
rnbguy Apr 19, 2024
33402d2
use actions-rust-lang/setup-rust-toolchain over actions-rs/toolchain
rnbguy Apr 19, 2024
aa4d3e5
imp docker run
rnbguy Apr 19, 2024
51a4945
use cosmwasm/optimizer 0.15.1
rnbguy Apr 19, 2024
680c183
correct mount paths
rnbguy Apr 19, 2024
94bb813
validate checksum
rnbguy Apr 20, 2024
28e5f20
.yaml over .yml
rnbguy Apr 20, 2024
31c0fb1
install cargo binary before wasm compile to avoid docker mount permis…
rnbguy Apr 20, 2024
283a59c
fix permissions manually
rnbguy Apr 20, 2024
e76d963
conventionalcommits.org is up
rnbguy Apr 20, 2024
9f5960b
update upload cw client action
rnbguy Apr 22, 2024
7524d4d
correct download path
rnbguy Apr 22, 2024
8d2fc2f
update cargo lockfiles
rnbguy Apr 24, 2024
de12cb8
redundant Swatinem/rust-cache
rnbguy Apr 24, 2024
e83ec1d
update release workflow
rnbguy Apr 24, 2024
3bf544b
Merge branch 'main' into rano/chores
rnbguy Apr 24, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ibc-core-commitment-types] Fallible conversion for `ProofSpec`, `LeafOp` and
`InnerSpec`. ([\#1108](https://github.com/cosmos/ibc-rs/issues/1108))
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Code Quality Checks
on:
pull_request:
merge_group:
types: [checks_requested]

jobs:
code-quality:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Coverage
on:
pull_request:
paths:
- .codecov.yml
- .github/workflows/rust.yml
- .github/workflows/coverage.yml
- .codecov.yaml
- .github/workflows/rust.yaml
- .github/workflows/coverage.yaml
- Cargo.toml
- ci/**
- ibc/**
Expand All @@ -24,7 +24,7 @@ permissions:
contents: read

concurrency:
group: rust-ci-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
Expand All @@ -43,10 +43,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install cargo-nextest
Expand Down
59 changes: 40 additions & 19 deletions .github/workflows/cw-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,7 @@ name: CosmWasm Compilation Check
on:
pull_request:
paths:
- .github/workflows/cw-check.yml
- Cargo.toml
- Cargo.lock
- ci/cw-check/**
push:
tags:
- v[0-9]+.*
branches:
- "release/*"
- main
paths:
- .github/workflows/cw-check.yml
- .github/workflows/cw-check.yaml
- Cargo.toml
- Cargo.lock
- ci/cw-check/**
Expand All @@ -25,17 +14,49 @@ on:
- ibc-clients/**
- ibc-primitives/**
- ibc-derive/**
merge_group:
types: [checks_requested]
push:
tags:
- v[0-9]+.*
branches:
- "release/*"
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }}

jobs:
cw-check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run cw-check

# only for caching cargo build artifacts from `cosmwasm/optimizer`
- uses: actions-rust-lang/setup-rust-toolchain@v1

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

- name: Compile `cw-check`
run: |
docker run \
-v "$(pwd)":/code \
-v "$(pwd)"/target:/target \
-v "${HOME}/.cargo/registry":/usr/local/cargo/registry \
cosmwasm/optimizer:0.15.1 ./ci/cw-check

- name: Fix permissions
run: |
sudo chown -R $(id -u):$(id -g) "$(pwd)"/target
sudo chown -R $(id -u):$(id -g) "${HOME}/.cargo/registry"

- name: Install `cosmwasm-check` from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: cosmwasm-check

- name: Check compiled CosmWasm contract
working-directory: artifacts
run: |
cd ci/cw-check
nix-shell --run "cw-check"
sha256sum -c checksums.txt
cosmwasm-check cw_check.wasm
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ name: Check Markdown links
on:
schedule:
- cron: "0 0 * * *" # At 00:00
push:
branches: main
pull_request:
merge_group:
types: [checks_requested]

jobs:
md-link-check:
Expand Down
33 changes: 12 additions & 21 deletions .github/workflows/no-std.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: no_std check
on:
pull_request:
paths:
- .github/workflows/no-std.yml
- .github/workflows/no-std.yaml
- Cargo.toml
- Cargo.lock
- ci/no-std-check/**
Expand All @@ -15,33 +15,25 @@ on:
- ibc-primitives/**
- ibc-derive/**
push:
branches: main
paths:
- .github/workflows/no-std.yml
- Cargo.toml
- Cargo.lock
- ci/no-std-check/**
- ci/**
- ibc/**
- ibc-core/**
- ibc-apps/**
- ibc-data-types/**
- ibc-clients/**
- ibc-primitives/**
- ibc-derive/**
merge_group:
types: [checks_requested]
tags:
- v[0-9]+.*
branches:
- "release/*"
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }}

jobs:
check-no-std-panic-conflict:
name: Check no_std panic conflict
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true
- run: |
cd ci/no-std-check
make check-no-std
Expand All @@ -51,11 +43,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2024-02-24
target: wasm32-unknown-unknown
override: true
- run: |
cd ci/no-std-check
make check-substrate
59 changes: 18 additions & 41 deletions .github/workflows/rust.yml → .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Rust
on:
pull_request:
paths:
- .github/workflows/rust.yml
- .github/workflows/rust.yaml
- Cargo.toml
- ci/**
- ibc/**
Expand All @@ -15,22 +15,15 @@ on:
- ibc-testkit/**
- ibc-derive/**
push:
branches: main
paths:
- .github/workflows/rust.yml
- Cargo.toml
- ci/**
- ibc/**
- ibc-core/**
- ibc-apps/**
- ibc-data-types/**
- ibc-clients/**
- ibc-primitives/**
- ibc-query/**
- ibc-testkit/**
- ibc-derive/**
merge_group:
types: [checks_requested]
tags:
- v[0-9]+.*
branches:
- "release/*"
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }}

env:
CARGO_INCREMENTAL: 0
Expand All @@ -41,25 +34,16 @@ env:
RUSTUP_MAX_RETRIES: 10

jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }}

check-features:
if: ${{ github.event_name != 'pull_request' }}
name: Check features
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
Expand All @@ -70,11 +54,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly # Since fmt uses unstable features for organizing imports
components: rustfmt
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
Expand All @@ -84,11 +67,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/clippy-check@v1
with:
Expand All @@ -99,11 +81,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/clippy-check@v1
with:
Expand All @@ -114,10 +95,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
Expand All @@ -128,10 +108,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
Expand All @@ -143,10 +122,9 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -184,10 +162,9 @@ jobs:
version: "tags/v${{ env.CARGO_MSRV_VERSION }}"
file: "cargo-msrv-x86_64-${{ matrix.param.system }}-v${{ env.CARGO_MSRV_VERSION }}.tgz"

- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.MSRV }}
override: true
- uses: Swatinem/rust-cache@v1

- name: Install cargo-msrv
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/upload-cw-clients.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,17 @@ jobs:
- name: Upload compiled CosmWasm contract
uses: actions/upload-artifact@v4
with:
name: tendermint-cw-${{ github.sha }}
name: tendermint-cw-client
path: artifacts/ibc_client_tendermint_cw.wasm
# Retain the artifact for 1 week for PRs and 3 months for `main` branch
retention-days: ${{ github.event_name == 'pull_request' && 7 || 90 }}
overwrite: true

# # An example workflow to download the artifact:
# download-tendermint-cw-client:
# name: Download pre-compiled Tendermint CosmWasm client
# runs-on: ubuntu-latest
# steps:
# - uses: actions/download-artifact@v4
# with:
# name: tendermint-cw-${{ env.IBC_RS_COMMIT_HASH }}
# repository: cosmos/ibc-rs
# - run: ls -l ibc_client_tendermint_cw.wasm
# # An example workflow to download the artifact:
# - uses: actions/download-artifact@v4
# with:
# name: tendermint-cw-client
# repository: cosmos/ibc-rs
# run-id: ${{ env.UPLOAD_WASM_RUN_ID }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
# - run: ls ibc_client_tendermint_cw.wasm
Loading
Loading