From 8ad05d75d2396c994599b6e39b98ff7d6a2f2839 Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Tue, 8 Nov 2022 13:22:26 +0100 Subject: [PATCH 1/4] Update rust-optimizer to latest in CI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cfd9caf8..3c7b4eac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -263,7 +263,7 @@ jobs: - run: name: Build development contracts command: | - docker run --volumes-from with_code cosmwasm/workspace-optimizer:0.12.6 + docker run --volumes-from with_code cosmwasm/workspace-optimizer:0.12.9 docker cp with_code:/code/artifacts ./artifacts - run: name: Show data From 1ce44c80b7534b1434076f47c6ef173442f1e508 Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Tue, 8 Nov 2022 13:23:36 +0100 Subject: [PATCH 2/4] Update clippy to latest --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3c7b4eac..811b83f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -164,8 +164,8 @@ jobs: lint: docker: - - image: rust:1.58.1 - steps: + - image: rust:1.65.0 + step0: - checkout - run: name: Version information From bb518788f91503695df8e32aece5cfdf8c1730ed Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Tue, 8 Nov 2022 13:32:02 +0100 Subject: [PATCH 3/4] Update rustc to 1.65.0 in CI --- .circleci/config.yml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 811b83f9..8a072673 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,7 +29,7 @@ workflows: jobs: contract_tgrade_trusted_circle: docker: - - image: rust:1.58.1 + - image: rust:1.65.0 working_directory: ~/project/contracts/tgrade-trusted-circle steps: - checkout: @@ -39,7 +39,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-tgrade-trusted-circle-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + - cargocache-tgrade-trusted-circle-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -52,11 +52,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-tgrade-trusted-circle-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-tgrade-trusted-circle-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} contract_tgrade_oc_proposals: docker: - - image: rust:1.58.1 + - image: rust:1.65.0 working_directory: ~/project/contracts/tgrade-oc-proposals steps: - checkout: @@ -66,7 +66,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-tgrade-oc-proposals-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + - cargocache-tgrade-oc-proposals-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -79,11 +79,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-tgrade-oc-proposals-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-tgrade-oc-proposals-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} contract_tgrade_ap_voting: docker: - - image: rust:1.58.1 + - image: rust:1.65.0 working_directory: ~/project/contracts/tgrade-ap-voting steps: - checkout: @@ -93,7 +93,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-tgrade-ap-voting-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + - cargocache-tgrade-ap-voting-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -106,11 +106,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-tgrade-ap-voting-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-tgrade-ap-voting-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} contract_tgrade_tc_payments: docker: - - image: rust:1.58.1 + - image: rust:1.65.0 working_directory: ~/project/contracts/tgrade-tc-payments steps: - checkout: @@ -120,7 +120,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-tgrade-tc-payments-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + - cargocache-tgrade-tc-payments-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -133,11 +133,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-tgrade-tc-payments-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-tgrade-tc-payments-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} contract_tgrade_dispute_multisig: docker: - - image: rust:1.58.1 + - image: rust:1.65.0 working_directory: ~/project/contracts/tgrade-dispute-multisig steps: - checkout: @@ -147,7 +147,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-tgrade-dispute-multisig-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + - cargocache-tgrade-dispute-multisig-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -160,7 +160,7 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-tgrade-dispute-multisig-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-tgrade-dispute-multisig-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} lint: docker: @@ -172,7 +172,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-lint-rust:1.58.1-{{ checksum "Cargo.lock" }} + - cargocache-v2-lint-rust:1.65.0-{{ checksum "Cargo.lock" }} - run: name: Add rustfmt component command: rustup component add rustfmt @@ -192,7 +192,7 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-lint-rust:1.58.1-{{ checksum "Cargo.lock" }} + key: cargocache-v2-lint-rust:1.65.0-{{ checksum "Cargo.lock" }} # This runs one time on the top level to ensure all contracts compile properly into wasm. # We don't run the wasm build per contract build, and then reuse a lot of the same dependencies, so this speeds up CI time @@ -200,7 +200,7 @@ jobs: # We also sanity-check the resultant wasm files. wasm-build: docker: - - image: rust:1.58.1 + - image: rust:1.65.0 steps: - checkout: path: ~/project @@ -209,7 +209,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-wasm-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + - cargocache-wasm-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown @@ -229,7 +229,7 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-wasm-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-wasm-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Check wasm contracts command: | @@ -284,7 +284,7 @@ jobs: "$TAG" ./artifacts/ build_and_upload_schemas: docker: - - image: rust:1.58.1 + - image: rust:1.65.0 working_directory: ~/project steps: - checkout: From 60f04d9a039a6a4256d07da1790d2d894b9b28e5 Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Tue, 8 Nov 2022 13:35:50 +0100 Subject: [PATCH 4/4] Replace check_contract by cosmwasm-check --- .circleci/config.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8a072673..8d83ac4a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -222,9 +222,9 @@ jobs: (cd $C && cargo build --release --target wasm32-unknown-unknown --locked --lib) done - run: - name: Install check_contract + name: Install cosmwasm-check # Uses --debug for compilation speed. - command: cargo install --debug --features iterator --example check_contract --version 1.0.0 -- cosmwasm-vm + command: cargo install --debug --version 1.1.5 cosmwasm-check - save_cache: paths: - /usr/local/cargo/registry @@ -232,12 +232,7 @@ jobs: key: cargocache-wasm-rust:1.65.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Check wasm contracts - command: | - for W in ./target/wasm32-unknown-unknown/release/*.wasm - do - echo -n "Checking $(basename $W) ... " - check_contract --supported-features iterator,staking,stargate,tgrade $W - done + command: cosmwasm-check --supported-features iterator,staking,stargate,tgrade ./target/wasm32-unknown-unknown/release/*.wasm # This job roughly follows the instructions from https://circleci.com/blog/publishing-to-github-releases-via-circleci/ build_and_upload_contracts: docker: