Skip to content
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
10 changes: 1 addition & 9 deletions .github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,5 @@
},
"devDependencies": {
"@size-limit/preset-app": "^7.0.8"
},
"size-limit": [
{
"path": "target/wasm32-unknown-unknown/release/cw_template.wasm",
"running": false,
"brotli": false,
"gzip": false
}
]
}
}
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ jobs:

report-wasm-size:
runs-on: ubuntu-20.04
if: github.event_name == 'pull_request'
steps:
- name: Check out repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -193,6 +194,36 @@ jobs:
with:
github_token: ${{ secrets.OKP4_TOKEN }}

check_contracts:
runs-on: ubuntu-20.04
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
override: true

- name: Install cargo make
uses: davidB/rust-cargo-make@v1

- name: Test rust code
shell: bash
run: cargo make check_contracts

lint-branch-name:
runs-on: ubuntu-20.04
if: github.actor != 'dependabot[bot]' && github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened')
Expand Down
6 changes: 5 additions & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,13 @@ env = { RUSTFLAGS = "-C link-arg=-s" }
[tasks.check_contracts]
dependencies = ["wasm"]
script = '''
if [[ ! -f "$HOME/.cargo/bin/check_contract" ]]; then
CHECK_CONTRACT_PATH=$HOME/.cargo/bin/check_contract
echo "🧐 Check if check_contract is already installed in $CHECK_CONTRACT_PATH"
if ! ls $CHECK_CONTRACT_PATH* 1> /dev/null 2>&1; then
echo "🚚 Installing check_contract binary"
cargo install --debug --version 1.0.0 --features iterator --force --example check_contract -- cosmwasm-vm
else
echo "✅ Using $(check_contract --version)"
fi

for W in ./target/wasm32-unknown-unknown/release/*.wasm
Expand Down