Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contract-types to CI #1236

Merged
merged 4 commits into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SUBDIRS := alice bob transfer stake governance license
SUBDIRS := stake-types transfer-types alice bob transfer stake governance license

all: $(SUBDIRS) ## Build all the contracts

Expand Down
28 changes: 28 additions & 0 deletions contracts/stake-types/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
all: ## Build the transfer contract
@cargo build --release

help: ## Display this help screen
@grep -h \
-E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

check: wasm ## Run the Rust check on the project features
@cargo check --target wasm32-unknown-unknown
@cargo check

test: ## Perform the contract tests defined in the host module
@cargo test --release

wasm: ## Build the WASM files
@RUSTFLAGS="$(RUSTFLAGS) --remap-path-prefix $(HOME)= -C link-args=-zstack-size=65536" \
cargo +dusk build \
--release \
--color=always \
-Z build-std=core,alloc \
--target wasm64-unknown-unknown

clippy: ## Run clippy
@cargo clippy --all-features --release -- -D warnings
@cargo clippy -Z build-std=core,alloc --release --target wasm32-unknown-unknown -- -D warnings

.PHONY: all check test wasm help
2 changes: 1 addition & 1 deletion contracts/transfer-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dusk-bls12_381 = { version = "0.12", default-features = false, features = ["rkyv
dusk-jubjub = { version = "0.13", default-features = false, features = ["rkyv-impl"] }
dusk-poseidon = { version = "0.31", default-features = false, features = ["rkyv-impl", "alloc"] }
phoenix-core = { version = "0.21", default-features = false, features = ["rkyv-impl", "alloc"] }
rkyv = { version = "0.7", default-features = false }
rkyv = { version = "0.7", default-features = false, features = ["size_32"] }
bytecheck = { version = "0.6", default-features = false }
28 changes: 28 additions & 0 deletions contracts/transfer-types/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
all: ## Build the transfer contract
@cargo build --release

help: ## Display this help screen
@grep -h \
-E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

check: wasm ## Run the Rust check on the project features
@cargo check --target wasm32-unknown-unknown
@cargo check

test: ## Perform the contract tests defined in the host module
@cargo test --release

wasm: ## Build the WASM files
@RUSTFLAGS="$(RUSTFLAGS) --remap-path-prefix $(HOME)= -C link-args=-zstack-size=65536" \
cargo +dusk build \
--release \
--color=always \
-Z build-std=core,alloc \
--target wasm64-unknown-unknown

clippy: ## Run clippy
@cargo clippy --all-features --release -- -D warnings
@cargo clippy -Z build-std=core,alloc --release --target wasm32-unknown-unknown -- -D warnings

.PHONY: all check test wasm help