Skip to content

Commit

Permalink
Add cw2 package to circle ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Aug 12, 2020
1 parent 1f16735 commit d3856aa
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
49 changes: 41 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ workflows:
- contract_cw20_base
- contract_cw20_escrow
- package_cw1
- package_cw2
- package_cw20
- lint

Expand Down Expand Up @@ -176,10 +177,10 @@ jobs:
- target
key: cargocache-cw20-escrow-rust:1.44.1-{{ checksum "~/project/Cargo.lock" }}

package_cw20:
package_cw1:
docker:
- image: rust:1.44.1
working_directory: ~/project/packages/cw20
working_directory: ~/project/packages/cw1
steps:
- checkout:
path: ~/project
Expand All @@ -188,7 +189,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-cw20:1.44.1-{{ checksum "~/project/Cargo.lock" }}
- cargocache-v2-cw1:1.44.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Add wasm32 target
command: rustup target add wasm32-unknown-unknown && rustup target list --installed
Expand Down Expand Up @@ -217,12 +218,12 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-v2-cw20:1.44.1-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-v2-cw1:1.44.1-{{ checksum "~/project/Cargo.lock" }}

package_cw1:
package_cw2:
docker:
- image: rust:1.44.1
working_directory: ~/project/packages/cw1
working_directory: ~/project/packages/cw2
steps:
- checkout:
path: ~/project
Expand All @@ -231,7 +232,39 @@ jobs:
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-cw1:1.44.1-{{ checksum "~/project/Cargo.lock" }}
- cargocache-v2-cw2:1.44.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Add wasm32 target
command: rustup target add wasm32-unknown-unknown && rustup target list --installed
- run:
name: Build library for native target
command: cargo build --locked
- run:
name: Build library for wasm target
command: cargo wasm --locked
- run:
name: Run unit tests
command: cargo test --locked
# note: there are no schemas to generate
- save_cache:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-v2-cw2:1.44.1-{{ checksum "~/project/Cargo.lock" }}

package_cw20:
docker:
- image: rust:1.44.1
working_directory: ~/project/packages/cw20
steps:
- checkout:
path: ~/project
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-cw20:1.44.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Add wasm32 target
command: rustup target add wasm32-unknown-unknown && rustup target list --installed
Expand Down Expand Up @@ -260,7 +293,7 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-v2-cw1:1.44.1-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-v2-cw20:1.44.1-{{ checksum "~/project/Cargo.lock" }}

lint:
docker:
Expand Down
1 change: 0 additions & 1 deletion packages/cw2/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
schema = "run --example schema"

0 comments on commit d3856aa

Please sign in to comment.