Skip to content

Commit

Permalink
chore: miscellaneous repository maintenance (#1174)
Browse files Browse the repository at this point in the history
* use renamed branch

* conventionalcommits-org is down

* add missing changelog entry

* rename to Makefile

* use native concurrency option

* upgrade substrate deps

* remove redundant nix use

* correct cw-check workflow file

* use yml extension over yml

* delete nix script

* rm merge group trigger and always trigger on main

* rm md link check from main

* forbid concurrent runs for cw and no-std checks

* nit

* use actions-rust-lang/setup-rust-toolchain over actions-rs/toolchain

* imp docker run

* use cosmwasm/optimizer 0.15.1

* correct mount paths

* validate checksum

* .yaml over .yml

https://yaml.org/faq.html

* install cargo binary before wasm compile to avoid docker mount permission

* fix permissions manually

* conventionalcommits.org is up

* update upload cw client action

* correct download path

* update cargo lockfiles

* redundant Swatinem/rust-cache

actions-rust-lang/setup-rust-toolchain@v1 uses it already

* update release workflow
  • Loading branch information
rnbguy authored Apr 24, 2024
1 parent 91d9b4f commit d03594c
Show file tree
Hide file tree
Showing 16 changed files with 371 additions and 689 deletions.
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
22 changes: 14 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install cargo-release
run: cargo install cargo-release
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Install `cargo-release` from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-release
- name: Publish crates (dry run)
run: make check-release

Expand All @@ -41,10 +44,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install cargo-release
run: cargo install cargo-release
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Install `cargo-release` from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-release
- name: Publish crates
run: yes | make release
env:
Expand Down
Loading

0 comments on commit d03594c

Please sign in to comment.