Add ability to use incremental caching for rust builds in Earthfile
This commit is contained in:
parent
a3da7e3db0
commit
a25e0418c4
3 changed files with 8 additions and 3 deletions
1
.earthlyignore
Normal file
1
.earthlyignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
target/
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ FROM {{ base_image }}:{{ image_version }}
|
|||
|
||||
ARG RECIPE={{ recipe }}
|
||||
|
||||
|
||||
# Copy the bling from ublue-os/bling into tmp, to be installed later by the bling module
|
||||
# Feel free to remove these lines if you want to speed up image builds and don't want any bling
|
||||
COPY --from=ghcr.io/ublue-os/bling:latest /rpms /tmp/bling/rpms
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue