-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (25 loc) · 898 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM mverleg/rust_nightly_musl_base:nodeps_2022-01-01
# Copy Cargo files to compile dependencies
COPY ./Cargo.toml ./Cargo.lock ./deny.toml ./
# Build dependencies (debug)
RUN sh ./build_dependencies_only.sh --features=jemalloc
# Check dependencies
RUN cargo --offline audit --deny warnings
RUN cargo --offline deny check advisories
RUN cargo --offline deny check licenses
RUN cargo --offline deny check bans
#RUN cargo --offline outdated --exit-code 1
#TODO @mark: ^turn back on when 2021 works
# Copy the actual code.
COPY ./build.rs ./grammar.lalrpop ./
COPY ./src ./src
RUN find . -name target -prune -o -type f &&\
touch -c build.rs src/main.rs src/lib.rs
# Build
RUN cargo build --features=jemalloc
# Test
RUN cargo --offline test --features=jemalloc
# Lint
RUN cargo --offline clippy --features=jemalloc --tests -- -D warnings
# Style
RUN cargo --offline fmt --all -- --check