diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09c3df3..541e743 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5189d1e --- /dev/null +++ b/Makefile @@ -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)" \ No newline at end of file