File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ VERSION 0.6
12FROM rustlang/rust:nightly-buster-slim
23WORKDIR /rustexample
34
5+ all :
6+ BUILD +build
7+ BUILD +check
8+
49install-chef :
10+ ENV CARGO_UNSTABLE_SPARSE_REGISTRY= true
511 RUN cargo install --debug cargo-chef
612
713prepare-cache :
@@ -14,17 +20,25 @@ prepare-cache:
1420build-cache :
1521 FROM +install-chef
1622 COPY +prepare-cache/recipe.json ./
23+ RUN cargo chef cook --release
1724 RUN cargo chef cook
1825 SAVE ARTIFACT target
1926 SAVE ARTIFACT $CARGO_HOME cargo_home
2027
2128build :
2229 COPY --dir src Cargo.lock Cargo.toml .
2330 COPY +build-cache/cargo_home $CARGO_HOME
31+ ENV CARGO_UNSTABLE_SPARSE_REGISTRY= true
2432 RUN cargo build --release
2533 RUN strip target/release/highlight-assertions
2634 SAVE ARTIFACT target/release/highlight-assertions AS LOCAL earthly-artifacts/highlight-assertions
2735
36+ check :
37+ COPY --dir src Cargo.lock Cargo.toml .
38+ COPY +build-cache/cargo_home $CARGO_HOME
39+ ENV CARGO_UNSTABLE_SPARSE_REGISTRY= true
40+ RUN cargo fmt --check
41+ RUN cargo clippy
2842# docker:
2943 # FROM debian:buster-slim
3044 # COPY +build/example-rust example-rust
You can’t perform that action at this time.
0 commit comments