Skip to content
Draft
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
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ trim_trailing_whitespace = false
# Use tabs for indentation (Makefiles require tabs)
[{Makefile,**.mk}]
indent_style = tab

[.github/workflows/*.{yml, yaml}]
indent_style = space
indent_size = 2
22 changes: 22 additions & 0 deletions .github/workflows/dusk_ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on: [pull_request]

name: Continuous integration

# Jobs run on core
jobs:
dusk_analysis:
name: Dusk Analyzer
uses: dusk-network/.github/.github/workflows/dusk-analysis.yml@main

#code_analysis:
# name: Code Analysis
# uses: dusk-network/.github/.github/workflows/code-analysis.yml@main
# with:
# clippy_default: false
# clippy_args: --features=rkyv/size_32

#test:
# name: Run tests
# uses: dusk-network/.github/.github/workflows/run-tests.yml@main
# with:
# test_flags: --features=rkyv-impl,size_32
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
COMPILER_VERSION=v0.2.0

all: contract
all: contract ## Build everything

test: contract test-contract
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}'

test: contract test-contract ## Run the tests
@cargo test --release --manifest-path=tests/Cargo.toml

contract: setup-compiler
contract: setup-compiler ## Compile the contract
@RUSTFLAGS="-C link-args=-zstack-size=65536" \
cargo +dusk build \
--release \
Expand All @@ -20,7 +25,7 @@ contract: setup-compiler
target/wasm64-unknown-unknown/release/% \
build/%

test-contract: setup-compiler
test-contract: setup-compiler ## Compile the test-contract
@RUSTFLAGS="-C link-args=-zstack-size=65536" \
cargo +dusk build \
--release \
Expand All @@ -35,10 +40,10 @@ test-contract: setup-compiler
target/wasm64-unknown-unknown/release/% \
build/%

setup-compiler:
setup-compiler: ## Run the setup-compiler script
@./scripts/setup-compiler.sh $(COMPILER_VERSION)

clean:
clean: ## Clean the build artifacts
@cargo clean
@rm -rf build

Expand Down
2 changes: 2 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
max_width = 80
wrap_comments = true
Loading