Skip to content

Commit

Permalink
Integrate cw4-group into CI and publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Oct 17, 2020
1 parent 84e3744 commit a695cfb
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 27 deletions.
36 changes: 36 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ workflows:
- contract_cw1_subkeys
- contract_cw1_whitelist
- contract_cw3_fixed_multisig
- contract_cw4_group
- contract_cw20_atomic_swap
- contract_cw20_base
- contract_cw20_escrow
Expand Down Expand Up @@ -174,6 +175,41 @@ jobs:
- target
key: cargocache-cw3-fixed-multisig-rust:1.47.0-{{ checksum "~/project/Cargo.lock" }}

contract_cw4_group:
docker:
- image: rust:1.47.0
working_directory: ~/project/contracts/cw4-group
steps:
- checkout:
path: ~/project
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-cw4-group-rust:1.47.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
env: RUST_BACKTRACE=1
command: cargo unit-test --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-cw4-group-rust:1.47.0-{{ checksum "~/project/Cargo.lock" }}

contract_cw20_base:
docker:
- image: rust:1.47.0
Expand Down
2 changes: 1 addition & 1 deletion CONTRACTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ to `workflows.test.jobs`)
1. Add to the `ALL_CONTRACTS` variable in `scripts/publish.sh`

1. Set the `version` variable in `Cargo.toml` to the same version as `packages/cw20`.
For example, "0.2.1" rather than the default "0.1.0"
For example, "0.3.1" rather than the default "0.1.0"

1. Edit the root `Cargo.toml` file and add a `profile.release.package.CONTRACT_NAME`
section, just like `profile.release.package.cw1-subkeys`, but with your
Expand Down
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 7 additions & 24 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,45 @@
members = ["packages/*", "contracts/*"]

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

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

[profile.release.package.cw3-fixed-multisig]
opt-level = 3
debug = false
debug-assertions = false
codegen-units = 1
incremental = false

[profile.release.package.cw4-group]
codegen-units = 1
incremental = false

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

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

[profile.release.package.cw20-escrow]
opt-level = 3
debug = false
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.package.cw721-base]
opt-level = 3
debug = false
debug-assertions = false
codegen-units = 1
incremental = false

[profile.release]
rpath = false
lto = true
overflow-checks = true
opt-level = 3
debug = false
debug-assertions = false
2 changes: 1 addition & 1 deletion contracts/cw4-group/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cw4-group"
version = "0.1.0"
version = "0.3.1"
authors = ["Ethan Frey <ethanfrey@users.noreply.github.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BASE_PACKAGES="cw0 storage-plus"
ALL_PACKAGES="cw1 cw2 cw3 cw4 cw20 cw721"

# these are imported by other contracts
BASE_CONTRACTS="cw1-whitelist cw20-base cw721-base"
BASE_CONTRACTS="cw1-whitelist cw4-group cw20-base cw721-base"
ALL_CONTRACTS="cw1-subkeys cw3-fixed-multisig cw20-atomic-swap cw20-escrow cw20-staking"

SLEEP_TIME=30
Expand Down

0 comments on commit a695cfb

Please sign in to comment.