From 21351cc1ced863b9af7c8a69f923036bc919b3b1 Mon Sep 17 00:00:00 2001 From: aeryz Date: Wed, 16 Nov 2022 17:16:30 +0100 Subject: [PATCH] Add `no_std` target to CI Signed-off-by: aeryz --- .circleci/config.yml | 11 +++++++---- packages/std/src/ibc.rs | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 271f70ddc6..2b4ec30acf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -260,9 +260,12 @@ jobs: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown && rustup target list --installed - run: - name: Build library for native target (no_std) + name: Add no_std target + command: rustup target add thumbv7em-none-eabi && rustup target list --installed + - run: + name: Build library for no_std target working_directory: ~/project/packages/std - command: cargo build --locked --no-default-features + command: cargo build --locked --no-default-features --target thumbv7em-none-eabi - run: name: Build library for native target (only "std" feature) working_directory: ~/project/packages/std @@ -276,9 +279,9 @@ jobs: working_directory: ~/project/packages/std command: cargo test --locked --no-default-features --features std - run: - name: Build library for native target (all features "no_std") + name: Build library for no_std target (all features "no_std") working_directory: ~/project/packages/std - command: cargo build --locked --no-default-features --features abort,iterator,staking,stargate,std,cosmwasm_1_1 + command: cargo build --locked --no-default-features --features abort,iterator,staking,stargate,cosmwasm_1_1 --target thumbv7em-none-eabi - run: name: Build library for native target (all features) working_directory: ~/project/packages/std diff --git a/packages/std/src/ibc.rs b/packages/std/src/ibc.rs index 0ac175ad34..06c6eef4e3 100644 --- a/packages/std/src/ibc.rs +++ b/packages/std/src/ibc.rs @@ -9,6 +9,7 @@ use serde::{Deserialize, Serialize}; use crate::addresses::Addr; use crate::binary::Binary; use crate::coin::Coin; +#[cfg(feature = "std")] use crate::errors::StdResult; use crate::results::{Attribute, CosmosMsg, Empty, Event, SubMsg}; #[cfg(feature = "std")]