From b5aea3fb5fcce31599e3d7397d5413a934132231 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Fri, 8 Dec 2023 00:49:28 +0100 Subject: ci: introduce Makefile Add CI checks into ci/Makefile and update gh actions. Motivation is, that makefile can also be added as pre-commit hook for local development: > echo 'make -C ci' > .git/hooks/pre-commit; chmod +x .git/hooks/pre-commit --- ci/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ci/Makefile (limited to 'ci/Makefile') diff --git a/ci/Makefile b/ci/Makefile new file mode 100644 index 0000000..69d6c97 --- /dev/null +++ b/ci/Makefile @@ -0,0 +1,19 @@ +all: build build-examples check-fmt check-clippy check-tests check-examples + +build: + cargo build + +build-examples: + cargo build --examples + +check-fmt: + cargo fmt --check + +check-clippy: + cargo clippy -- -Dwarnings -Aclippy::new_without_default + +check-tests: + cargo test + +check-examples: + cargo test --examples -- cgit v1.2.3