diff options
-rw-r--r-- | ci/Makefile | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/ci/Makefile b/ci/Makefile index b433ed2..9f06816 100644 --- a/ci/Makefile +++ b/ci/Makefile @@ -1,10 +1,18 @@ +default: debug release + +debug: + $(MAKE) all + +release: + $(MAKE) all CARGO_FLAGS=--release + all: build build-examples check-fmt check-clippy check-tests check-examples check-readme run-examples build: - cargo build + cargo build $(CARGO_FLAGS) build-examples: - cargo build --examples + cargo build $(CARGO_FLAGS) --examples check-fmt: cargo fmt --check @@ -13,19 +21,19 @@ check-clippy: cargo clippy -- -Dwarnings -Aclippy::new_without_default check-tests: - cargo test + cargo test $(CARGO_FLAGS) check-examples: - cargo test --examples + cargo test $(CARGO_FLAGS) --examples check-readme: awk '/^```rust$$/,/^```$$/ { if (!($$1 ~ "^```")) { print } }' ../README.md > ../examples/readme.rs - cargo run --example readme + cargo run $(CARGO_FLAGS) --example readme rm -f ../examples/readme.rs run-examples: - cargo run --example fib - cargo run --example add - cargo run --example tiny_vm - cargo run --example tiny_vm jit - cargo run --example bf + cargo run $(CARGO_FLAGS) --example fib + cargo run $(CARGO_FLAGS) --example add + cargo run $(CARGO_FLAGS) --example tiny_vm + cargo run $(CARGO_FLAGS) --example tiny_vm jit + cargo run $(CARGO_FLAGS) --example bf |