Skip to content

Commit

Permalink
Have Makefile that does same commands as CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Rüth authored and janrueth committed Nov 25, 2023
1 parent d38412a commit 31ed396
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
FEATURES: "logging,tls12"

jobs:
build:
Expand All @@ -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 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)"

0 comments on commit 31ed396

Please sign in to comment.