Add Makefile for running CI jobs locally.

This commit is contained in:
Tom Alexander
2024-09-28 22:32:20 -04:00
parent efe37f020a
commit c20927b726
9 changed files with 85 additions and 69 deletions

View File

@@ -1,5 +1,5 @@
FROM rustlang/rust:nightly-alpine3.20 AS builder
#openssl-dev
RUN apk add --no-cache musl-dev pkgconfig libressl3.8-libssl libressl-dev
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache
RUN rustup component add rustfmt

View File

@@ -21,6 +21,7 @@ help:
build: ## Build the docker image.
> docker build --tag $(IMAGE_NAME) --target=$(TARGET) --file Dockerfile .
> docker volume create webhook-bridge-cargo-registry
> docker volume create webhook-bridge-rust-target
.PHONY: shell
shell: ## Launch an interactive shell inside the docker image with the source repository mounted at /source.
@@ -31,3 +32,4 @@ shell: build
clean:
> docker rmi $(IMAGE_NAME)
> docker volume rm webhook-bridge-cargo-registry
> docker volume rm webhook-bridge-rust-target