Skip to content

Commit

Permalink
Improved docker rust cache
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Dec 7, 2023
1 parent 64d64a8 commit 8b1e55c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
VERSION --try --global-cache 0.7
PROJECT ontola/atomic-server
IMPORT ./browser AS browser
IMPORT github.com/earthly/lib/rust:2.2.11 AS rust
# IMPORT github.com/earthly/lib/rust:2.2.11 AS rust
IMPORT github.com/earthly/lib/rust:nacho/with_docker AS rust
FROM rust:1.73.0-buster
WORKDIR /code

Expand Down Expand Up @@ -45,10 +46,8 @@ source:
cross-build:
FROM +source
ARG --required TARGET
# This does not yet cache properly
# https://github.com/earthly/lib/issues/34
WITH DOCKER
RUN cross build --target $TARGET --release
DO rust+CARGO --args="cross" --$with_docker="--load ghcr.io/cross-rs/$TARGET:v0.2.5"
END
SAVE ARTIFACT ./target/$TARGET/release/atomic-server AS LOCAL artifact/bin/atomic-server-$TARGET

Expand Down

0 comments on commit 8b1e55c

Please sign in to comment.