Skip to content

Commit

Permalink
Add cw20-staking to CI and proper release profile
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Aug 26, 2020
1 parent e2687d8 commit 1deba52
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ workflows:
- contract_cw1_whitelist
- contract_cw20_base
- contract_cw20_escrow
- contract_cw20_staking
- package_cw0
- package_cw1
- package_cw2
Expand Down Expand Up @@ -187,6 +188,47 @@ jobs:
- target
key: cargocache-cw20-escrow-rust:1.44.1-{{ checksum "~/project/Cargo.lock" }}

contract_cw20_staking:
docker:
- image: rust:1.44.1
working_directory: ~/project/contracts/cw20-staking
steps:
- checkout:
path: ~/project
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-cw20-staking-rust:1.44.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Add wasm32 target
command: rustup target add wasm32-unknown-unknown
- run:
name: Unit Tests
env: RUST_BACKTRACE=1
command: cargo unit-test --locked
- run:
name: Build Wasm
command: cargo wasm --locked
- run:
name: Build and run schema generator
command: cargo schema --locked
- run:
name: Ensure checked-in schemas are up-to-date
command: |
CHANGES_IN_REPO=$(git status --porcelain)
if [[ -n "$CHANGES_IN_REPO" ]]; then
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
git status && git --no-pager diff
exit 1
fi
- save_cache:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-cw20-staking-rust:1.44.1-{{ checksum "~/project/Cargo.lock" }}

package_cw0:
docker:
- image: rust:1.44.1
Expand Down
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ debug-assertions = false
codegen-units = 1
incremental = false

[profile.release.package.cw20-staking]
opt-level = 3
debug = false
debug-assertions = false
codegen-units = 1
incremental = false

[profile.release]
rpath = false
lto = true
Expand Down

0 comments on commit 1deba52

Please sign in to comment.