12 lines
571 B
Docker
12 lines
571 B
Docker
FROM rust:1.91.1-bookworm
|
|
WORKDIR /build
|
|
RUN apt-get update && apt-get install -y --no-install-recommends pkg-config libx11-dev libxkbcommon-dev libwayland-dev libudev-dev libegl1-mesa-dev libgbm-dev \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& rustup component add rustfmt clippy
|
|
ENV CARGO_BUILD_JOBS=1 CARGO_PROFILE_DEV_DEBUG=0 CARGO_PROFILE_TEST_DEBUG=0
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY src ./src
|
|
COPY examples ./examples
|
|
COPY vendor ./vendor
|
|
CMD ["sh", "-eu", "-c", "cargo fmt --check && cargo test --locked && cargo clippy --all-targets --locked -- -D warnings"]
|