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
18 changes: 18 additions & 0 deletions .github/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "contracts",
"version": "1.0.0",
"scripts": {
"build": "cargo make wasm"
},
"devDependencies": {
"@size-limit/preset-app": "^7.0.8"
},
"size-limit": [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To do in another PR, but this configuration (size-limit) can be removed now from the package.json and use the .size-limit configuration file (available in main branch for the CI now).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Could be please push a new PR with the needed changes? Thanks. 😌

{
"path": "target/wasm32-unknown-unknown/release/cw_template.wasm",
"running": false,
"brotli": false,
"gzip": false
}
]
}
21 changes: 1 addition & 20 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,26 +186,7 @@ jobs:

- name: Prepare size limit
run: |
cat << EOF > package.json
{
"name": "contracts",
"version": "1.0.0",
"scripts": {
"build": "cargo make wasm"
},
"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
}
]
}
EOF
cp .github/package.json package.json

- name: Report wasm size limit
uses: andresz1/size-limit-action@v1
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,3 @@ jobs:

- name: Test rust code
run: cargo make test-coverage

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
run: cargo make check_contracts
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_contract task is no longer called from the CI, is the desired behavior ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 Nope. But it should be part of the linter workflow I guess...

8 changes: 6 additions & 2 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ env = { RUSTFLAGS = "-C link-arg=-s" }
[tasks.check_contracts]
dependencies = ["wasm"]
script = '''
if [[ ! -e ~/.cargo/bin/check_contract ]]; then cargo install --debug --version 1.0.0 --features iterator --force --example check_contract -- cosmwasm-vm ; fi
if [[ ! -f "$HOME/.cargo/bin/check_contract" ]]; then
echo "🚚 Installing check_contract binary"
cargo install --debug --version 1.0.0 --features iterator --force --example check_contract -- cosmwasm-vm
fi

for W in ./target/wasm32-unknown-unknown/release/*.wasm
do
echo -n "Checking `basename $W`... "
echo -n "🔎 Checking `basename $W`... "
check_contract $W
done
'''
Expand Down