From aa72571bb90dc60239f03f3467e481acb29924af Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Fri, 13 Dec 2024 22:06:30 +0100 Subject: ci: run with debug and release in the default target --- ci/Makefile | 28 ++++++++++++++++++---------- 1 file 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 -- cgit v1.2.3