Have Makefile that does same commands as CI

This commit is contained in:
Jan Rüth 2023-11-25 15:27:50 +01:00 committed by Jan
commit 31ed3963a6
2 changed files with 23 additions and 4 deletions

View file

@ -9,6 +9,7 @@ on:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
FEATURES: "logging,tls12"
jobs:
build:
@ -19,10 +20,10 @@ jobs:
- name: Install dependencies
run: sudo apt-get install -y cmake clang
- name: Check fmt
run: cargo fmt --all --check
run: make fmt
- name: Lint
run: cargo clippy --workspace --all-targets -F "logging,tls12"
run: make lint
- name: Tests usual
run: cargo test --all-targets -F "logging,tls12"
run: make test
- name: Build usual
run: cargo build --all-targets -F "logging,tls12"
run: make build

18
Makefile Normal file
View file

@ -0,0 +1,18 @@
FEATURES ?= logging,tls12
.PHONY: fmt
fmt:
cargo fmt --all --check
.PHONY: lint
lint:
cargo clippy --workspace --all-targets -F "$(FEATURES)"
.PHONY: test
test:
cargo test --all-targets -F "$(FEATURES)"
.PHONY: build
build:
cargo build --all-targets -F "$(FEATURES)"