From 2ae3dbad21ebeb369140f4facde9c4f52bd36300 Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Thu, 18 Apr 2024 13:17:09 +0300 Subject: [PATCH] Replace config.yml for CI --- .circleci/config.yml | 53 +++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 68a0131..d3fa07a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,7 @@ workflows: jobs: contract_marketplace: docker: - - image: rust:1.75.0 + - image: rust:1.72.1 working_directory: ~/project/contracts/marketplace steps: - checkout: @@ -31,7 +31,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-marketplace-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-marketplace-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -53,11 +53,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-marketplace-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-marketplace-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }} contract_name-minter: docker: - - image: rust:1.75.0 + - image: rust:1.72.1 working_directory: ~/project/contracts/name-minter steps: - checkout: @@ -67,7 +67,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-name-minter-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-name-minter-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -89,11 +89,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-name-minter-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-name-minter-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }} contract_sg721-name: docker: - - image: rust:1.75.0 + - image: rust:1.72.1 working_directory: ~/project/contracts/sg721-name steps: - checkout: @@ -103,7 +103,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-sg721-name-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-sg721-name-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -125,11 +125,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-sg721-name-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-sg721-name-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }} package_sg-name: docker: - - image: rust:1.75.0 + - image: rust:1.72.1 working_directory: ~/project/package/sg-name steps: - checkout: @@ -139,7 +139,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-sg-name-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-sg-name-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -149,11 +149,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-sg-name-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-sg-name-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }} lint: docker: - - image: rust:1.75.0 + - image: rust:1.72.1 steps: - checkout - run: @@ -161,7 +161,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-lint-rust:1.75.0-{{ checksum "Cargo.lock" }} + - cargocache-v2-lint-rust:1.72.1-{{ checksum "Cargo.lock" }} - run: name: Add rustfmt component command: rustup component add rustfmt @@ -180,7 +180,7 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-lint-rust:1.75.0-{{ checksum "Cargo.lock" }} + key: cargocache-v2-lint-rust:1.72.1-{{ 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 @@ -188,7 +188,7 @@ jobs: # We also sanity-check the resultant wasm files. wasm-build: docker: - - image: rust:1.75.0 + - image: rust:1.72.1 steps: - checkout: path: ~/project @@ -197,7 +197,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-wasm-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-wasm-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown @@ -209,23 +209,6 @@ jobs: echo "Compiling `basename $C`..." (cd $C && cargo build --release --lib --target wasm32-unknown-unknown --locked) done - - run: - name: Install contract_check - # Uses --debug for compilation speed - command: cargo install --debug --version 1.1.5 --features iterator --example contract_check -- cosmwasm-vm - - save_cache: - paths: - - /usr/local/cargo/registry - - target - key: cargocache-wasm-rust:1.75.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,stargaze $W - done # This job roughly follows the instructions from https://circleci.com/blog/publishing-to-github-releases-via-circleci/ build_and_upload_contracts: @@ -271,4 +254,4 @@ jobs: -c "$CIRCLE_SHA1" \ -n "$TITLE" -b "$BODY" \ -delete \ - "$TAG" ./artifacts/ + "$TAG" ./artifacts/ \ No newline at end of file