Add ability to use incremental caching for rust builds in Earthfile

This commit is contained in:
Gerald Pinder 2023-12-27 16:36:16 -05:00
parent a3da7e3db0
commit a25e0418c4
3 changed files with 8 additions and 3 deletions

View file

@ -1,4 +1,5 @@
VERSION 0.7
VERSION --global-cache 0.7
IMPORT github.com/earthly/lib/rust AS rust
ARG FEDORA_MAJOR_VERSION=38
@ -16,10 +17,12 @@ iso-generator:
install:
FROM rust
COPY . /app
DO rust+INIT --keep_fingerprints=true
COPY --keep-ts . /app
WORKDIR /app
RUN cargo build --release
DO rust+CARGO --args="build --release" --output="release/[^\./]+"
SAVE ARTIFACT target/release/ublue